From c72bbd070539223aa04f6cb0418dc5d355b74065 Mon Sep 17 00:00:00 2001 From: Arthur Paulino Date: Sun, 7 Jan 2018 18:12:35 -0300 Subject: [PATCH] using the new INC instruction --- Learn-by-Examples.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Learn-by-Examples.md b/Learn-by-Examples.md index a46a84e..4913f58 100644 --- a/Learn-by-Examples.md +++ b/Learn-by-Examples.md @@ -75,7 +75,7 @@ HOLO_DISPLAY_COLOR EQU 4 MOV A, HOLO_DISPLAY_DEC ; MOV the constant HOLO_DISPLAY_DEC into register A MOV B, [DISPLAYED_DECIMAL] ; MOV the value that DISPLAYED_DECIMAL is pointing at into register B HWI HWID_HOLO ; ... - ADD [DISPLAYED_DECIMAL], 1 ; adds 1 to the value pointed by DISPLAYED_DECIMAL + INC [DISPLAYED_DECIMAL] ; adds 1 to the value pointed by DISPLAYED_DECIMAL BRK ; halt execution until next tick ``` ```assembly @@ -110,6 +110,6 @@ HOLO_DISPLAY_COLOR EQU 4 MOV A, HOLO_DISPLAY_DEC ; MOV the constant HOLO_DISPLAY_DEC into register A MOV B, [DISPLAYED_DECIMAL] ; MOV the value that DISPLAYED_DECIMAL is pointing at into register B HWI HWID_HOLO ; ... - ADD [DISPLAYED_DECIMAL], 1 ; adds 1 to the value pointed by DISPLAYED_DECIMAL + INC [DISPLAYED_DECIMAL] ; adds 1 to the value pointed by DISPLAYED_DECIMAL BRK ; halt execution until next tick ``` \ No newline at end of file