mirror of
https://github.com/simon987/Much-Assembly-Required.git
synced 2025-09-17 04:16:53 +00:00
HOLO_DISPLAY_DEC example
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
|
### Usage examples
|
||||||
```assembly
|
```assembly
|
||||||
; Display 0x000A
|
; Displaying the hexadecimal 0x000A
|
||||||
HWID_HOLO EQU 0x9
|
HWID_HOLO EQU 0x9
|
||||||
HOLO_DISPLAY_HEX EQU 1
|
HOLO_DISPLAY_HEX EQU 1
|
||||||
|
.data
|
||||||
|
HEX EQU 0X000A
|
||||||
.text
|
.text
|
||||||
MOV A, HOLO_DISPLAY_HEX
|
MOV A, HOLO_DISPLAY_HEX
|
||||||
MOV B, 0x000A
|
MOV B, HEX
|
||||||
HWI HWID_HOLO
|
HWI HWID_HOLO
|
||||||
BRK
|
BRK
|
||||||
```
|
```
|
||||||
|
|
||||||
```assembly
|
```assembly
|
||||||
; Display "hello!"
|
; Displaying the string "hello!"
|
||||||
HWID_HOLO EQU 0x9
|
HWID_HOLO EQU 0x9
|
||||||
HOLO_DISPLAY_STRING EQU 2
|
HOLO_DISPLAY_STRING EQU 2
|
||||||
.data
|
.data
|
||||||
string: DW "hello!", 0
|
STRING: DW "hello!", 0
|
||||||
.text
|
.text
|
||||||
MOV A, HOLO_DISPLAY_STRING
|
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
|
HWI HWID_HOLO
|
||||||
BRK
|
BRK
|
||||||
```
|
```
|
Loading…
x
Reference in New Issue
Block a user