diff --git a/shell.asm b/shell.asm index 5c1d792..ec413bc 100644 --- a/shell.asm +++ b/shell.asm @@ -158,11 +158,19 @@ paint: mov cx, bx add cx, di cmp cx, COLUMNS - jle .no_clipping_width + jle .no_clipping_width_right mov cx, COLUMNS - .no_clipping_width: + .no_clipping_width_right: sub cx, di + cmp di, 0 + jge .no_clipping_width_left + sub si, di + sub si, di + add cx, di + xor di, di + .no_clipping_width_left: + call PONYDOS_SEG:SYS_DRAW_RECT ret @@ -294,9 +302,6 @@ move: mov [si + window.x], cx mov dx, [si + window.res_x] sub [si + window.x], dx - jnc .not_underflow - - mov word [si + window.x], 0 .not_underflow: pop dx