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

remove user input from readme example

This commit is contained in:
GooseDB 2019-10-22 18:53:13 +03:00
parent d4c11e8f7c
commit e0d5004aa6

View File

@ -17,15 +17,8 @@ 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();
std::io::stdin().read_line(&mut input).unwrap();
let zero_page_data = input let zero_page_data = [56, 49];
.trim()
.split(' ')
.map(|s| s.parse::<u8>().unwrap())
.collect::<Vec<u8>>();
let program = [ let program = [
// (F)irst | (S)econd // (F)irst | (S)econd
@ -57,6 +50,7 @@ fn main() {
cpu.run(); cpu.run();
println!("GCD is {:?}", cpu.registers.accumulator); assert_eq!(7, cpu.registers.accumulator);
} }
``` ```