ccp: be more careful with cleaning up fcb area

This commit is contained in:
Nero 2022-01-18 22:41:14 +00:00
parent ea732be8ec
commit e48ae306ba

View File

@ -57,13 +57,8 @@ prompt mov ax, cs
; parse inbuf into comfcb, buf, fcb1 and fcb2 ; parse inbuf into comfcb, buf, fcb1 and fcb2
; takes no arguments ; takes no arguments
; clear out fcb area, dosbox seems to have troubles with leftovers
parse mov di, fcb1
mov cx, buf-fcb1+0x80
mov al, 0
rep stosb
; parse off command name ; parse off command name
mov si, inbuf+2 parse mov si, inbuf+2
mov di, comfcb mov di, comfcb
call lodfn call lodfn
; trim spaces ; trim spaces
@ -83,10 +78,20 @@ parse mov di, fcb1
mov si, buf+1 mov si, buf+1
mov di, fcb1 mov di, fcb1
call lodfn call lodfn
; fill space between with zeroes
add di, 12
mov cx, fcb2-fcb1-12
mov al, 0
rep stosb
; parse fcb2 ; parse fcb2
call eatws call eatws
mov di, fcb2 mov di, fcb2
call lodfn call lodfn
; fill space between with zeroes
add di, 12
mov cx, buf-fcb2-12
mov al, 0
rep stosb
; dump out everything parsed for me to see ; dump out everything parsed for me to see
;mov si, comfcb ;mov si, comfcb
;call dump ;call dump