From 2aaae86c8a1df2205dbd45e3575928a1392815f9 Mon Sep 17 00:00:00 2001 From: redfast00 Date: Tue, 6 Aug 2019 17:36:37 +0200 Subject: [PATCH] Implement color changing --- messages.asm | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/messages.asm b/messages.asm index 9a77527..2d2c35b 100644 --- a/messages.asm +++ b/messages.asm @@ -43,6 +43,18 @@ int 0x10 ;; Read character mov ah, 0x00 int 0x16 + ;; Read character is in al + sub al, 'a' + mov bl, al + shl bl, 0x4 + + ;; Read character + mov ah, 0x00 + int 0x16 + ;; Read character is in al + sub al, 'a' + or al, bl + mov [color_mode], al jmp .loop @@ -116,7 +128,7 @@ int 0x10 halt: hlt -color_mode: db 0x05 +color_mode: db 0x02 times 510 - ($ - $$) db 0 dw 0xAA55