remove duplicate mov's

This commit is contained in:
Tibo Ulens 2021-10-08 13:48:51 +02:00
parent b9839299f2
commit f42ac8bafd

View file

@ -55,9 +55,9 @@ mov dl, WIDTH ; right col number (80)
int 0x10 int 0x10
;; Set cursor to bottom of screen ;; Set cursor to bottom of screen
;; dh already contains HEIGHT
mov ah, 0x02 ; set cursor position mov ah, 0x02 ; set cursor position
mov bh, 0x00 ; page number mov bh, 0x00 ; page number
mov dh, HEIGHT ; row (bottommost row)
mov dl, 0x00 ; col (leftmost col) mov dl, 0x00 ; col (leftmost col)
int 0x10 int 0x10
@ -71,8 +71,9 @@ int 0x10
cmp al, 0x00 ; null cmp al, 0x00 ; null
je .virtual_kbd_loop_init je .virtual_kbd_loop_init
mov ah, 0x01 ;; print character to serial port
mov dx, 0x00 mov ah, 0x01 ; transmit char
mov dx, 0x00 ; COM1
int 0x14 int 0x14
cmp al, 0x08 ; backspace cmp al, 0x08 ; backspace
@ -142,9 +143,9 @@ newline:
int 0x10 int 0x10
;; Move cursor to beginning of screen ;; Move cursor to beginning of screen
;; dh already contains HEIGHT
mov ah, 0x02 ; set cursors position mov ah, 0x02 ; set cursors position
mov bh, 0x00 ; page number mov bh, 0x00 ; page number
mov dh, HEIGHT ; row
mov dl, 0x00 ; col mov dl, 0x00 ; col
int 0x10 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 ;; 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 ;; fill the binary with zeroes until it is 510 bytes in size
;; (magic number will use up the remaining 2) ;; (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 dw 0xAA55 ;; Magic number to mark sector as bootable