HOLO_DISPLAY_DEC example

Arthur Paulino 2017-12-31 11:59:47 -03:00
parent 2cde816be0
commit d3d3866043

@ -19,25 +19,40 @@ Note that the Hologram Projector will clear itself at the end of the tick, it is
### Usage examples
```assembly
; Display 0x000A
; Displaying the hexadecimal 0x000A
HWID_HOLO EQU 0x9
HOLO_DISPLAY_HEX EQU 1
.data
HEX EQU 0X000A
.text
MOV A, HOLO_DISPLAY_HEX
MOV B, 0x000A
MOV B, HEX
HWI HWID_HOLO
BRK
```
```assembly
; Display "hello!"
; Displaying the string "hello!"
HWID_HOLO EQU 0x9
HOLO_DISPLAY_STRING EQU 2
.data
string: DW "hello!", 0
STRING: DW "hello!", 0
.text
MOV A, HOLO_DISPLAY_STRING
MOV X, string
MOV X, STRING
HWI HWID_HOLO
BRK
```
```assembly
; Displaying the decimal 42
HWID_HOLO EQU 0x9
HOLO_DISPLAY_DEC EQU 3
.data
DECIMAL EQU 42
.text
MOV A, HOLO_DISPLAY_DEC
MOV B, DECIMAL
HWI HWID_HOLO
BRK
```