Minor optimizations in drawing rects

This commit is contained in:
shikhin 2023-03-19 16:02:49 +05:30
parent 651480c91e
commit a6cf05c1ff
1 changed files with 5 additions and 11 deletions

View File

@ -156,26 +156,20 @@ draw_rect:
shl cx, 1
.loop:
; Any rows left to copy?
cmp dx, 0
je .end
dec dx
; Copy a row
push cx
pusha
rep movsb
pop cx
popa
; Move to the next row in the input buffer
add si, bx
sub si, cx
; Move to the next row in the screen buffer
add di, 2*COLUMNS
sub di, cx
jmp .loop
.end:
dec dx
; Any rows left to copy?
jnz .loop
pop es
popa