forked from offtopia/ponydos
Minor optimizations in drawing rects
This commit is contained in:
parent
651480c91e
commit
a6cf05c1ff
1 changed files with 5 additions and 11 deletions
16
ponydos.asm
16
ponydos.asm
|
@ -156,26 +156,20 @@ draw_rect:
|
||||||
shl cx, 1
|
shl cx, 1
|
||||||
|
|
||||||
.loop:
|
.loop:
|
||||||
; Any rows left to copy?
|
|
||||||
cmp dx, 0
|
|
||||||
je .end
|
|
||||||
dec dx
|
|
||||||
|
|
||||||
; Copy a row
|
; Copy a row
|
||||||
push cx
|
pusha
|
||||||
rep movsb
|
rep movsb
|
||||||
pop cx
|
popa
|
||||||
|
|
||||||
; Move to the next row in the input buffer
|
; Move to the next row in the input buffer
|
||||||
add si, bx
|
add si, bx
|
||||||
sub si, cx
|
|
||||||
|
|
||||||
; Move to the next row in the screen buffer
|
; Move to the next row in the screen buffer
|
||||||
add di, 2*COLUMNS
|
add di, 2*COLUMNS
|
||||||
sub di, cx
|
|
||||||
|
|
||||||
jmp .loop
|
dec dx
|
||||||
.end:
|
; Any rows left to copy?
|
||||||
|
jnz .loop
|
||||||
|
|
||||||
pop es
|
pop es
|
||||||
popa
|
popa
|
||||||
|
|
Loading…
Reference in a new issue