From a419eaa9bf639070b647325b90cff9f8d2170cae Mon Sep 17 00:00:00 2001 From: Robert Pengelly Date: Mon, 7 Oct 2024 17:15:21 +0100 Subject: [PATCH] Another bug fix --- build/chimaera.img | Bin 368640 -> 368640 bytes build/chimaera.vhd | Bin 34120704 -> 34120704 bytes src/Makefile.unix | 6 +++-- src/apps/pcomm/pcomm.asm | 57 ++++++++++++++++++++------------------- 4 files changed, 33 insertions(+), 30 deletions(-) diff --git a/build/chimaera.img b/build/chimaera.img index 817367399c1e491b3533ece11a0907124b2d402f..e8d6af7409b3eb9165115c6caa463f826731ac52 100644 GIT binary patch delta 2443 zcma)8eQZ-z6u+_MmFXJ((4c}Jb46>A zH5(Z#oegrAXxLaN(|<5Qr8Ra=*QX;g#Rjq{3_9j2=w4ZtsF7Ary(RqNLqH>}aYU57Tv#0i2z6aXiT zPt;ab)>T%N8*66~l%qx9!kQ|6#y{OG2P-}?W>ZV&?9EJDe`{QEzZoX6YW6ZYER=`~ zX3c_C`lG4uDFLmyVJ4^hAGC^ftlWJ9MTvJg0=e6A?DyBa$+DWGm2HlfTI1&us)zT z@{oLeGOX`Ea3r+(E>kyVJQ*Fh^kkzlwhytxt0f4=qwT@o2s_O@On2Z{GOPO(=yKFX zy9XIxJN62B9<|y#!cOa^nyiKk%z-X)_?zczd$0rCm!a5&Tye!1U{}t+*8(iROKG5(?^>0j2ozFtJYG@c?SnHWb5&TOSBZ!yQ}fBL?@K8!`QrOsd7U$Y zF9x?{!8>uN6B~p+8iA;ul`|MGoZ3%y`tLryTd|;_h!>ZoLlBH_J9e9{($;EU8+rds z9<`kepJAHY@WTz)n-uPm-Zn5_pFD7kZiD=JOjnuS?bv2lGrmNY%_TQI4`hY)%)uxg zIDieq0W-Y(Z@vvSyQsb=kQ~yIW~m<7Lb@V)%0)hpES&Ew=ET1H zr7HN#ZUZ~h?<5nE63R(*qxmpr?Px)s3*W@f*%+t_>l>HG*c*(`g*ovjJfoV6ygjO& zFGmeQe=HBjgB}_!nb(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7_BVDw4~~cZ0WZTJaXnRbGse=J~YTq%%iI8(UuE zM`ymczF_W13AIA4Q5)12wL^CyKhz#|K>nyB>V!I@E~qOCK!KW+FKJqkhwWJEnt zFbYATC=B&N;V1(2Mtx9U)DOw1KQbXRibMm@K%}5SXfTRGL(ot(3`L{iXapLGMxhuq z8jV3?Q7no>@n{?xkM2ej&_px|O-2dGf)Y^@vZ7>k4@yC)C=I2fDQGI1hNhzol!@*| zGthnLe)Ir(5Y0pnp;>4)dKk??bJ09BA1y!&(IY4eEkfDIh8CkG$c~nxWoSA27g~W< zq8yZqR-x4>4?T+V(PO9ptwDuoEpniBXgw-IkE0D}BYFZAqbJc*=xL;)XV4~8f;OXP zQ7L*3Z9!X68QO-*(evm9^dfo*y^LN#+tI7&HS{{#f!;tn(VJ)&+KnpETWAleL{799 z?L$>)KYAM-K-I{F4x&S-1|3H4pd;ugszvXj_t5+315}4TM90u^^bx8@AEQsur|1Ow z3^kz7(HH0>`VxJGzDD1mQ|L7M7JY}#ptI;4`X0GaBl-a~p&!wC^b`6S{emu_U(rSM z8~PnxLYL7M^ar|%uA%Gb2D*uEIp&TOA4fz(yofjPAzGp%zC%uHWCdACa!4*&MOKqM@+iqCkC6hhh7^*u z#6i}P^`wYAPBxH@n_Rkv*i6ILThJk5rNUeBkz+BNFDi*93#icN2H#7Ogk`v@J(m*~ZUyzgJOY#-@ntVe}k<;W` z@*O!t&XRNFd*UXIAuZZ6V}1~z_QdyD}o0krVj1fHasY4 Lx()xcdQJQ{48iv) 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 -- 2.34.1