Use 286 shifts and rotates

This commit is contained in:
Juhani Krekelä 2023-03-18 14:31:35 +02:00
parent 8e47898c7a
commit f465c642c4
1 changed files with 3 additions and 6 deletions

View File

@ -100,8 +100,7 @@ mainloop:
mov bx, [mouse_x]
shr bx, 1
mov cx, [mouse_y]
shr cx, 1
shr cx, 1
shr cx, 2
cmp [mouse_column], bl
jne .update_cursor
cmp [mouse_row], cl
@ -155,8 +154,7 @@ flip_mouse_cursor:
; Swap foreground and background colours
inc bx
mov al, [es:bx]
mov cl, 4
ror al, cl
ror al, 4
mov [es:bx], al
popa
@ -404,8 +402,7 @@ hexprint16:
hexprint8:
push ax
push cx
mov cl, 4
shr al, cl
shr al, 4
call hexprint4
pop cx
pop ax