Minor optimizations in drawing rects
This commit is contained in:
parent
651480c91e
commit
a6cf05c1ff
16
ponydos.asm
16
ponydos.asm
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue