cmp al, HEX (4B)
je .L4
+ ;cmp al, HEX (4D)
+ ;je .L58
+
cmp al, HEX (50)
je .L2
cmp al, HEX (09)
jne .L14
+ push ax
+ push bx
+ push cx
+ push dx
+
+ mov bx, offset _scratch
+
+ mov ax, di
+ sub ax, bx
+
+ mov cl, ch
+ xor ch, ch
+
+ cmp ax, cx
+
+ pop dx
+ pop cx
+ pop bx
+ pop ax
+
+ jne .L11
+
push ax
push bx
push dx
jmp .L11
+.L58:
+
+ push bx
+ push cx
+ push dx
+
+ mov bx, offset _scratch
+
+ mov ax, di
+ sub ax, bx
+
+ mov cl, ch
+ xor ch, ch
+
+ cmp ax, cx
+ je .L63
+
+ mov ax, HEX (0300)
+ xor bx, bx
+ int HEX (10)
+
+ cmp dl, HEX (4F)
+ jb .L64
+
+ xor dl, dl
+ inc dh
+
+ jmp .L65
+
+.L64:
+
+ inc dl
+
+.L65:
+
+ mov ax, HEX (0200)
+ xor bx, bx
+ int HEX (10)
+
+ inc di
+
+.L63:
+
+ pop dx
+ pop cx
+ pop bx
+
+ jmp .L11
+
+.L57:
+
+ push bx
+ push cx
+ push dx
+
+ mov ax, HEX (0300)
+ xor bx, bx
+ int HEX (10)
+
+ cmp dh, cs:[_curr_row]
+ jne .L62
+
+ cmp dl, cs:[_curr_col]
+ je .L60
+
+.L62:
+
+ and dl, dl
+ jnz .L59
+
+ mov dl, HEX (4F)
+ dec dh
+
+ jmp .L61
+
+.L59:
+
+ dec dl
+
+.L61:
+
+ mov ax, HEX (0200)
+ xor bx, bx
+ int HEX (10)
+
+ dec di
+
+.L60:
+
+ pop dx
+ pop cx
+ pop bx
+
+ jmp .L11
+
.L4:
- call _handle_backspace
- jmp .L11
+ call _handle_backspace
+ jmp .L11
.L3:
.L1:
+ and ch, ch
+ jz .L67
+
+ push ax
+ push bx
+ push cx
+ push dx
+
+ xor ah, ah
+ mov al, cs:[_curr_col]
+
+ xor dx, dx
+
+ mov cl, ch
+ xor ch, ch
+
+ add ax, cx
+
+ mov di, offset _scratch
+ add di, cx
+
+ mov cx, 80
+ div cx
+
+ mov dh, cs:[_curr_row]
+ add dh, al
+
+ mov ax, HEX (0200)
+ xor bx, bx
+ int HEX (10)
+
+ pop dx
+ pop cx
+ pop bx
+ pop ax
+
+.L67:
+
call _history_up
jmp .L11
.L2:
+ and ch, ch
+ jz .L66
+
+ push ax
+ push bx
+ push cx
+ push dx
+
+ xor ah, ah
+ mov al, cs:[_curr_col]
+
+ xor dx, dx
+
+ mov cl, ch
+ xor ch, ch
+
+ add ax, cx
+
+ mov di, offset _scratch
+ add di, cx
+
+ mov cx, 80
+ div cx
+
+ mov dh, cs:[_curr_row]
+ add dh, al
+
+ mov ax, HEX (0200)
+ xor bx, bx
+ int HEX (10)
+
+ pop dx
+ pop cx
+ pop bx
+ pop ax
+
+.L66:
+
call _history_down
jmp .L11
xor ah, ah
mov al, cs:[_curr_col]
+ push bx
push cx
push dx
+
xor dx, dx
mov cl, ch
xor ch, ch
+
add ax, cx
- mov cx, HEX (50)
+ mov cx, 80
div cx
xchg ax, dx
pop dx
pop cx
+ pop bx
and ax, ax
jnz .L13
mov ax, cs
mov ds, ax
-.L19:
-
- mov ax, HEX (0300)
- xor bx, bx
- int HEX (10)
-
- mov cs:[_curr_row], dh ; byte ptr [bp - 2]
- mov cs:[_curr_col], dl ; byte ptr [bp - 1]
-
.L17:
mov di, offset _scratch
mov dl, ' '
int HEX (21)
+.L19:
+
+ mov ax, HEX (0300)
+ xor bx, bx
+ int HEX (10)
+
+ mov cs:[_curr_row], dh ; byte ptr [bp - 2]
+ mov cs:[_curr_col], dl ; byte ptr [bp - 1]
+
.L18:
pop ds