From 1ef3695608acce13dd5c66dbda3ccab865d48a47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juhani=20Krekel=C3=A4?= Date: Thu, 23 Mar 2023 12:25:11 +0200 Subject: [PATCH] Allow moving windows off the left side of screen --- shell.asm | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) 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