From d3d386604378866f610d7f4a4b1ca5c7f343e3d5 Mon Sep 17 00:00:00 2001 From: Arthur Paulino Date: Sun, 31 Dec 2017 11:59:47 -0300 Subject: [PATCH] HOLO_DISPLAY_DEC example --- Hardware:-Hologram-Projector.md | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/Hardware:-Hologram-Projector.md b/Hardware:-Hologram-Projector.md index 248781e..1b74c93 100644 --- a/Hardware:-Hologram-Projector.md +++ b/Hardware:-Hologram-Projector.md @@ -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 ``` \ No newline at end of file