diff --git a/ponydos.asm b/ponydos.asm index 269a168..4a9c574 100644 --- a/ponydos.asm +++ b/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