1
0
mirror of https://github.com/mre/mos6502.git synced 2024-11-28 22:51:26 +00:00

refactoring

This commit is contained in:
GooseDB 2019-10-13 01:22:57 +03:00
parent 7f7b9d87a2
commit 6a0163138a

View File

@ -3,16 +3,16 @@ use mos6502::address::Address;
use mos6502::cpu; use mos6502::cpu;
fn main() { fn main() {
println!("Enter two numbers (< 128) to know their GCD:");
let mut input = String::new(); let mut input = String::new();
std::io::stdin().read_line(&mut input).unwrap(); std::io::stdin().read_line(&mut input).unwrap();
let nums = input
let zero_page_data = input
.trim() .trim()
.split(' ') .split(' ')
.map(|s| s.parse::<u8>().unwrap()) .map(|s| s.parse::<u8>().unwrap())
.collect::<Vec<u8>>(); .collect::<Vec<u8>>();
let (first, second) = (nums[0], nums[1]);
let zero_page_data = [first, second];
let program = [ let program = [
// (F)irst | (S)econd // (F)irst | (S)econd
// .algo // .algo