From f42ac8bafd461de4d6cbffeafb9387bbf67f7820 Mon Sep 17 00:00:00 2001 From: Tibo Ulens Date: Fri, 8 Oct 2021 13:48:51 +0200 Subject: [PATCH] remove duplicate mov's --- messages.asm | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/messages.asm b/messages.asm index 7eb7a7b..cde24a9 100644 --- a/messages.asm +++ b/messages.asm @@ -55,9 +55,9 @@ mov dl, WIDTH ; right col number (80) int 0x10 ;; Set cursor to bottom of screen +;; dh already contains HEIGHT mov ah, 0x02 ; set cursor position mov bh, 0x00 ; page number -mov dh, HEIGHT ; row (bottommost row) mov dl, 0x00 ; col (leftmost col) int 0x10 @@ -71,8 +71,9 @@ int 0x10 cmp al, 0x00 ; null je .virtual_kbd_loop_init - mov ah, 0x01 - mov dx, 0x00 + ;; print character to serial port + mov ah, 0x01 ; transmit char + mov dx, 0x00 ; COM1 int 0x14 cmp al, 0x08 ; backspace @@ -142,9 +143,9 @@ newline: int 0x10 ;; Move cursor to beginning of screen + ;; dh already contains HEIGHT mov ah, 0x02 ; set cursors position mov bh, 0x00 ; page number - mov dh, HEIGHT ; row mov dl, 0x00 ; col int 0x10 @@ -316,5 +317,5 @@ is_from_virtual_kbd: db 0x00 ;; Magic number must be in the last 2 bytes of the sector so ;; fill the binary with zeroes until it is 510 bytes in size ;; (magic number will use up the remaining 2) -times 510 - ($ - $$) db 0 +;times 510 - ($ - $$) db 0 dw 0xAA55 ;; Magic number to mark sector as bootable