From e48ae306bab7d76ee4329b3fbaf5f88e1a508539 Mon Sep 17 00:00:00 2001 From: Nero <41307858+nero@users.noreply.github.com> Date: Tue, 18 Jan 2022 22:41:14 +0000 Subject: [PATCH] ccp: be more careful with cleaning up fcb area --- src/ccp.asm | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/src/ccp.asm b/src/ccp.asm index b63bbd9..ddf9424 100644 --- a/src/ccp.asm +++ b/src/ccp.asm @@ -57,13 +57,8 @@ prompt mov ax, cs ; parse inbuf into comfcb, buf, fcb1 and fcb2 ; 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 - mov si, inbuf+2 +parse mov si, inbuf+2 mov di, comfcb call lodfn ; trim spaces @@ -83,10 +78,20 @@ parse mov di, fcb1 mov si, buf+1 mov di, fcb1 call lodfn + ; fill space between with zeroes + add di, 12 + mov cx, fcb2-fcb1-12 + mov al, 0 + rep stosb ; parse fcb2 call eatws mov di, fcb2 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 ;mov si, comfcb ;call dump