mov ah, HEX (08)
int HEX (21)
+ cmp al, HEX (47)
+ je .L74
+
cmp al, HEX (48)
je .L1
cmp al, HEX (4B)
- je .L4
+ je .L57
+
+ cmp al, HEX (4D)
+ je .L58
- ;cmp al, HEX (4D)
- ;je .L58
+ cmp al, HEX (4F)
+ je .L75
cmp al, HEX (50)
je .L2
+ cmp al, HEX (53)
+ je .L71
+
jmp .L11
.L10:
cmp al, HEX (7F)
ja .L11
- mov ah, HEX (02)
- mov dl, al
- int HEX (21)
+ push ax
+ push bx
+ push cx
+ push dx
+ push si
+ push di
+ push ax
+
+ mov bx, offset _scratch
+
+ mov ax, di
+ sub ax, bx
+
+ mov cl, ch
+ xor ch, ch
+
+ cmp ax, cx
+ je .L68
+
+ push cx
+ mov si, offset _scratch
+ mov di, offset _temp
+
+ push ax
+ push cx
+
+ mov cx, ax
+ rep movsb
+
+ xor al, al
stosb
+
+ pop cx
+ pop ax
+
+ sub cx, ax
+ rep movsb
+
+ xor al, al
+ stosb
+
+ pop cx
+ inc cx
+
+ mov si, offset _temp
+ mov di, offset _scratch
+
+ rep movsb
+
+.L68:
+
+ pop ax
+ pop di
+
+.L69:
+
+ stosb
+
+ mov ax, HEX (0300)
+ xor bx, bx
+ int HEX (10)
+
+ mov bx, di
+ dec bx
+
+ call _writestr
+
+ cmp dl, HEX (4F)
+ jb .L73
+
+ xor dl, dl
+ inc dh
+
+ jmp .L70
+
+.L73:
+
+ add dl, 1
+
+.L70:
+
+ mov ax, HEX (0200)
+ xor bx, bx
+ int HEX (10)
+
+ pop si
+ pop dx
+
+ pop cx
inc ch
+ pop bx
+ pop ax
+
jmp .L11
.L58:
.L4:
- call _handle_backspace
- jmp .L11
+ cmp di, offset _scratch
+ je .L11
+
+ push es
+ push ds
+ push ax
+ push bx
+ push cx
+ push dx
+ push si
+ push di
+
+ mov bx, offset _scratch
+
+ mov ax, di
+ sub ax, bx
+
+ mov cl, ch
+ xor ch, ch
+
+ mov si, di
+ dec di
+
+ sub cx, ax
+ rep movsb
+
+ xor al, al
+ stosb
+
+ call _erase_char
+ pop di
+ dec di
+
+ mov ax, HEX (0300)
+ xor bx, bx
+ int HEX (10)
+
+ mov cx, dx
+
+ mov bx, di
+ call _writestr
+
+ mov ah, HEX (02)
+ xor dl, dl
+ int HEX (21)
+
+ mov dx, cx
+
+ mov ax, HEX (0200)
+ xor bx, bx
+ int HEX (10)
+
+ pop si
+ pop dx
+
+ pop cx
+ dec ch
+
+ pop bx
+ pop ax
+ pop ds
+ pop es
+
+ jmp .L11
+
+.L71:
+
+ push ax
+ push bx
+ push cx
+ push dx
+ push si
+ push di
+
+ mov bx, offset _scratch
+
+ mov ax, di
+ sub ax, bx
+
+ mov cl, ch
+ xor ch, ch
+
+ cmp ax, cx
+ je .L72
+
+ mov si, di
+ inc si
+
+ sub cx, ax
+ rep movsb
+
+ xor al, al
+ stosb
+
+ pop di
+
+ mov ax, HEX (0300)
+ xor bx, bx
+ int HEX (10)
+
+ mov cx, dx
+
+ mov bx, di
+ call _writestr
+
+ mov ah, HEX (02)
+ xor dl, dl
+ int HEX (21)
+
+ mov dx, cx
+
+ mov ax, HEX (0200)
+ xor bx, bx
+ int HEX (10)
+
+ pop si
+ pop dx
+
+ pop cx
+ dec ch
+
+ pop bx
+ pop ax
+
+ jmp .L11
+
+.L72:
+
+ pop si
+ pop dx
+ pop cx
+ pop bx
+ pop ax
+
+ jmp .L11
.L3:
call _history_down
jmp .L11
+.L75:
+
+ and ch, ch
+ jz .L11
+
+ 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
+
+ jmp .L11
+
+.L74:
+
+ push ax
+ push bx
+ push cx
+ push dx
+
+ mov dh, cs:[_curr_row]
+ mov dl, cs:[_curr_col]
+
+ mov ax, HEX (0200)
+ xor bx, bx
+ int HEX (10)
+
+ mov di, offset _scratch
+ pop dx
+ pop cx
+ pop bx
+ pop ax
+
+ jmp .L11
+
;******************************************************************************
; @function _format_path
;******************************************************************************