From 3830ccca27a11cfb8e076f9a1dc0689d5b0c5b12 Mon Sep 17 00:00:00 2001 From: Matthias Endler Date: Wed, 7 Apr 2021 14:01:45 +0200 Subject: [PATCH] Add comments --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 2c4e46a..a9ccc21 100644 --- a/README.md +++ b/README.md @@ -9,11 +9,12 @@ It builds on stable Rust and supports `#[no_std]` targets. ## Usage example ```rust -extern crate mos6502; use mos6502::address::Address; use mos6502::cpu; fn main() { + // Calculate the greatest common divisor of 56 and 49 + // using Euclid's algorithm. let zero_page_data = [56, 49]; let program = [ @@ -46,6 +47,7 @@ fn main() { cpu.run(); + // The expected GCD is 7 assert_eq!(7, cpu.registers.accumulator); } ```