mirror of
https://github.com/simon987/Much-Assembly-Required.git
synced 2025-04-20 02:56:44 +00:00
using the new INC instruction
parent
ed138c7090
commit
c72bbd0705
@ -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
|
||||
```
|
Loading…
x
Reference in New Issue
Block a user