From: Robert Pengelly Date: Mon, 7 Oct 2024 16:15:21 +0000 (+0100) Subject: Another bug fix X-Git-Url: https://git.candlhat.org/?a=commitdiff_plain;h=HEAD;p=chimaera.git Another bug fix --- diff --git a/build/chimaera.img b/build/chimaera.img index 8173673..e8d6af7 100644 Binary files a/build/chimaera.img and b/build/chimaera.img differ diff --git a/build/chimaera.vhd b/build/chimaera.vhd index 08934ea..2d5ebd1 100644 Binary files a/build/chimaera.vhd and b/build/chimaera.vhd differ diff --git a/src/Makefile.unix b/src/Makefile.unix index 3c68507..fff32a0 100644 --- a/src/Makefile.unix +++ b/src/Makefile.unix @@ -29,8 +29,9 @@ chimaera.img: all echo set PATH=A:\\DOS >> autoexec.bat # echo '%PATH%\\temp.bat' >> autoexec.bat # echo echo 123 >> temp.bat -# echo 'echo %PATH% && echo 123' >> temp.bat -# echo temp >> temp.bat +# echo 'test && echo abc && test' >> temp.bat +# echo test >> temp.bat +# echo 'echo %PATH% && echo 123' >> test.bat utils/dosfstools/mkdosfs --boot boot/freeldr/bootsect/fat12.bin --sectors 720 -F 12 -n "CHIMAERA OS" $@ utils/dosfstools/mmd -i $@ boot boot/freeldr @@ -43,6 +44,7 @@ chimaera.img: all utils/dosfstools/mmd -i $@ dos # utils/dosfstools/mcopy -i $@ temp.bat ::/dos/temp.bat +# utils/dosfstools/mcopy -i $@ test.bat ::/dos/test.bat # utils/dosfstools/mcopy -i $@ apps/hello/hello.com ::dos/hello.com chimaera.vhd: all diff --git a/src/apps/pcomm/pcomm.asm b/src/apps/pcomm/pcomm.asm index ae475c1..a97ad25 100644 --- a/src/apps/pcomm/pcomm.asm +++ b/src/apps/pcomm/pcomm.asm @@ -2358,6 +2358,30 @@ _process_line: .L124: + mov ax, [_scratch_list] + + and ax, ax + jz .L127 + + push es + push bx + + mov es, ax + xor bx, bx + + mov ax, es:[bx + 4] + pop bx + pop es + +.L127: + + push es + push bx + push ax + + xor ax, ax + mov [_scratch_list], ax + mov ax, '&' push ax @@ -2368,7 +2392,7 @@ _process_line: add sp, 4 and ax, ax - jz .L120 + jz .L128 mov di, ax @@ -2376,7 +2400,7 @@ _process_line: stosb cmp byte ptr [di], '&' - jne .L120 + jne .L128 stosb @@ -2390,31 +2414,6 @@ _process_line: .L123: - push es - push bx - - mov ax, [_scratch_list] - - and ax, ax - jz .L127 - - push es - push bx - - mov es, ax - xor bx, bx - - mov ax, es:[bx + 4] - pop bx - pop es - -.L127: - - push ax - - xor ax, ax - mov [_scratch_list], ax - push di call _strlen @@ -2448,7 +2447,9 @@ _process_line: call _strcpy add sp, 4 - + +.L128: + mov ax, [_scratch_list] and ax, ax