From d26bc9c9b95cf56f36864535f77b4fad197598e3 Mon Sep 17 00:00:00 2001 From: Robert Pengelly Date: Tue, 24 Sep 2024 03:38:39 +0100 Subject: [PATCH] Implemented internal PATH command --- build/chimaera.img | Bin 368640 -> 368640 bytes build/chimaera.vhd | Bin 34120704 -> 34120704 bytes src/apps/pcomm/Makefile.unix | 2 +- src/apps/pcomm/Makefile.w32 | 2 +- src/apps/pcomm/commands | 1 + src/apps/pcomm/path.asm | 382 +++++++++++++++++++++++++++++++++++ src/apps/pcomm/pcomm.asm | 4 + 7 files changed, 389 insertions(+), 2 deletions(-) create mode 100644 src/apps/pcomm/path.asm diff --git a/build/chimaera.img b/build/chimaera.img index e54efb6ca01b07af2b2c93a6c9ab60e43eb18b0c..9b3333651981917c98afc409319888163e74865a 100644 GIT binary patch delta 4068 zcmbVP3s6&68b0?15^Dv6N>EU80~p|<*F;4g28AlGp*4XN2;f5LKDymqYsV%&rgdSP zwo5>f_Vls4({819XIrM-Qo%Nm4n$D2+SnRjSk#@ixSkkjOK}thVgGXz!0PTycbS26 z?tjktAK(9^+Nr2^DjH$~lCRIJ{4ik|D@m)KXlb0ePx6wqbb3ECxa!ct=MM z0$lZXa+QeB{yWzn8@w(n`!0h6kV^!0KiBy>`({|n!B5;w)gE5uGzS?-Wsda_t91(d z_VB_H=}sOYST2A_p*A>6tr-*=t-P>rH{Y3~);Npvhns}AvehLOWK>mJZW=j8WgCn| z)oYO@TG;F612S6Knl6{BmEE5z{@v(OIbP&RLmD}Nyp?ti8Elt|$S9MI=XS1Eu1~X$ zNVbJqN7yZL+b~H?Bc;eIbvzM3__Xpe6CNiD{PLj`{7Gkw^idr!U5X6@^Vl369_yUX z3OcNCCf%2*^Sp+Pq%R8>IhC``tF4CuCgs#-;f+I!aHBJkRcGN|XELkI!dHiqaPGmy z?7>X@SSBtIqbyo($tm^_e39vktzfvmqDW4Fwv6is5w zFOCFAvUl@Box;kee6dC1`3usz)2X|Jy2w3zeV_Kauv%*6pPHZF#-b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wKyi0XEUS zQ@(ek!@Z|C$iF7juzG9*vm3XJwXu-Akc;u5_bG+k*N>Hx8mzmR6xO941U)KdYWC5K z+SncA0#dKR6IrvN>bA$g4F#h?^1E^T_lw4$3_01?dufc#N69S%a8vmCJ>kW8IN%k6 zJzw~T{!H2PZJ;dQ24ryD7wY+0E3>mTVIgSRwuy~mZB_q#29Dzd{Ex3>`l*D+w;)s= zar$M166J5jBa|F<)r8O&%5`xFZA|{ejgTSj_7Q}nx}9|hHR@`=MQAz;8^%={Ybw#p zgmdKs1<-X_HI_@X%%FsvRt@ZT^*Xr0IJz~smH`P_hJ5F#!AN4M0ttmzlA){%kh23~R}}Tx*I)xn1996^^Z7=ebm0SnE_I z?8^(&d?Keljh<$b-Dk)ODf}&$(y>U(8KROB#i;*mJN)envo%rZyPuWv_&HyqO3GKd zr0FfI6%7koR_E1=+a=wFzHv~3-;*6Ep~pT-jFxJR%j~wZYzO zjerp_;({x37Me${RI}5|Z6~k1DbhHy$kI?jZ5wc7U5<=7wH+C=YWHT~SH}5*w=(9` zekau&k=3X&k}9aW7Q9Q!PELVqEG98PP9>f7tuz&ku*dFh=LbNv?&K4{h^dL zK$JF1u02T`O0X%%NS=_)5da{(5gPtID^XyVc6DinVxCRXmQYiVbuZ z^v-lM1D3{sB_8+8brY&*r^MQXZd6SiUT=$|)1qqPvD^Ov?K%S=WU`4x02qrOu8CpQ i#WP*8t=2wYyql3Q@UZZR;0Zd;NP?$dvROk$ME?OKsOx9| diff --git a/build/chimaera.vhd b/build/chimaera.vhd index e95ce1d65d0b3312931413b70cd53b59d598f8c0..d5b0b48095c3e167c7397ebd2d41c22c1b212b8b 100644 GIT binary patch delta 6616 zcmbW53tUuX`p3^X0}QVTf(i;K%z%t=(8G*^TpSdXn~Tc81adL((!ESq2QOO&NfrZ& zw3VmYE~2&>YekBJjw>i-W;UKu3a&f&U|KBq+sM&u%pWXHI`F_uw_nh;- z&-{xJ=|My2X-s|mK`TnTH;>2Q(qb<6@ziGL-c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HFz>>a^=HQTTi948X2#iCeE){28%xR z%D|zWVb_Ot;)fb5ZZ`&td+yu`-9B`Buo!s5x#PP-86?iWp$wu9uoEnH44mfJvEDu{ zo)1f>AOgh)b|^>j5i^E%6s^TKl}xc-mc@WO7zR9mC-4H^zz6t(;a~*t1O6ZYj0B@V zAP54%U^EB;p+E)HKm)=+IEVmRpaYR$42S~JU@V9M|nw6MzvU zfr(%eNCqh&6-)+Gz*H~|q=9rW9n1h3;2v-<_zlPeGr=q{8)N|!$Obte7t8_ofjp28 z3P2$!0&~GUa6c#pCEx)tA1nY1!Gqu-um~&$4}(X*67XBF6f6VF!3wYv{0^)Ft3fF! z1LdFs{2n|C{s0~WkAq6E22_D+@B~;3YQU4=DXM zfgbQZxCnj#KY~l(GWZGff-B%>@C&#K`oJ}C9ozsn!9T$*(7#cZC3_l>c#@ptLUJW3 zNNyx0iILn%!$=+^Pm&kOo8&|CB@HKyAo-E}Ndcshq*0_mQV=PaG@2Ab3MHvXYLbQ& zMhYiIkhCNnDUvjX6h(?AjU~m9#*qY4EJ;r?kj9hZNb#fuQX**r$w*2fO(absC6iJ} zsieuIDWs{SX{0n#I%zs-1}TGd59wagZ%CP>nWR~y*(AqOnCMqFDTkCxnnSvelt;=Z z6_5%^MWnf;d8GSE#iSC_1El$+1*CHX(j1* zq*bKVq*78Dshm_n`aS7U(jQ2Vksc>ilGc!_NY$h#NNY(oq$f#Fk=BvclQxjdq*~HO z(k9Yo(iYOwq-RLalAa^|k@P(21=5Qok@OPjWzs98S4pptwvt{ay+PVWsw35twv%>{ z-X!fL?IQh&w42mGdW-ZnX%A^H=^audX&4?Rk4asmzmPs5eM3_0_j`Q-%0->&gy#r diff --git a/src/apps/pcomm/Makefile.unix b/src/apps/pcomm/Makefile.unix index a7fc585..cf1db90 100644 --- a/src/apps/pcomm/Makefile.unix +++ b/src/apps/pcomm/Makefile.unix @@ -46,7 +46,7 @@ genver: genver.c gcc -o $@ $^ endif -pcomm.com: ../../lib/crt/crt0.o cbreak.o cd.o crlf.o date.o del.o dir.o erase.o exit.o history.o mkdir.o pcomm.o rmdir.o set.o time.o touch.o type.o vector.o writechr.o writedec.o writehex.o writestr.o xmalloc.o xstrcpy.o ../../lib/crt/libc.a +pcomm.com: ../../lib/crt/crt0.o cbreak.o cd.o crlf.o date.o del.o dir.o erase.o exit.o history.o mkdir.o path.o pcomm.o rmdir.o set.o time.o touch.o type.o vector.o writechr.o writedec.o writehex.o writestr.o xmalloc.o xstrcpy.o ../../lib/crt/libc.a ../../utils/binutils/slink --oformat msdos -o $@ $^ %.o: %.asm diff --git a/src/apps/pcomm/Makefile.w32 b/src/apps/pcomm/Makefile.w32 index 6c4cfa8..f694373 100644 --- a/src/apps/pcomm/Makefile.w32 +++ b/src/apps/pcomm/Makefile.w32 @@ -30,7 +30,7 @@ genhash.exe: genhash.c genver.exe: genver.c gcc -o $@ $^ -pcomm.com: ../../lib/crt/crt0.o cbreak.o cd.o crlf.o date.o del.o dir.o erase.o exit.o history.o mkdir.o pcomm.o rmdir.o set.o time.o touch.o type.o vector.o writedec.o writehex.o writestr.o xmalloc.o xstrcpy.o ../../lib/crt/libc.a +pcomm.com: ../../lib/crt/crt0.o cbreak.o cd.o crlf.o date.o del.o dir.o erase.o exit.o history.o mkdir.o path.o pcomm.o rmdir.o set.o time.o touch.o type.o vector.o writedec.o writehex.o writestr.o xmalloc.o xstrcpy.o ../../lib/crt/libc.a ../../utils/binutils/slink --oformat msdos -o $@ $^ %.o: %.asm diff --git a/src/apps/pcomm/commands b/src/apps/pcomm/commands index ac84bbf..52e07c9 100644 --- a/src/apps/pcomm/commands +++ b/src/apps/pcomm/commands @@ -7,6 +7,7 @@ echo exit help mkdir +path reboot rmdir set diff --git a/src/apps/pcomm/path.asm b/src/apps/pcomm/path.asm new file mode 100644 index 0000000..ff43d04 --- /dev/null +++ b/src/apps/pcomm/path.asm @@ -0,0 +1,382 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; @file path.asm +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +%ifndef HEX +% define HEX(y) 0x##y +%endif + +;****************************************************************************** +; @function _handler_path +;****************************************************************************** +global _handler_path +_handler_path: + + push ax + push bx + push cx + push dx + push si + push di + push es + push ds + + xor dx, dx + call _skip_whitespace + + cmp byte ptr [bx], 0 + jne _handler_path.copy + + mov si, cs:[_vec_env] + mov cx, cs:[_vec_env + 4] + + mov es, si + xor di, di + +_handler_path.find: + + and cx, cx + jz _handler_path.err_no_path + + push es + mov ax, es:[di] + + mov es, ax + push es + + xor bx, bx + mov ax, es:[bx] + + push cx + push es + push ds + + mov cx, ds + mov es, cx + mov ds, ax + + xor ax, ax + push ax + + mov ax, offset _temp + push ax + + call _strcpy + add sp, 4 + + pop ds + + mov ax, ds + mov es, ax + + mov ax, offset _var + push ax + + mov ax, offset _temp + push ax + + call _strcmp + add sp, 4 + + pop es + pop cx + + and ax, ax + jz _handler_path.print + + pop ax + pop es + + add di, 2 + + dec cx + jz _handler_path.err_no_path + + jmp _handler_path.find + +_handler_path.print: + + pop ax + pop es + + mov ds, ax + + xor bx, bx + call _writestr + + mov al, '=' + call _writechr + + mov ax, es:[bx + 2] + + and ax, ax + jz _handler_path.no_value + + mov ds, ax + + xor bx, bx + call _writestr + +_handler_path.no_value: + + pop ds + pop es + add di, 2 + + mov al, HEX (0D) + call _writechr + + mov al, HEX (0A) + call _writechr + + dec cx + jz _handler_path.done + +_handler_path.copy: + + mov si, bx + + mov di, offset _arg + push di + + xor al, al + + mov cx, 256 + rep stosb + + pop di + push si + + call _strlen + add sp, 2 + + mov cx, ax + rep movsb + +_handler_path.trim: + + cmp byte ptr [di - 1], ' ' + ja _handler_path.got_arg + + mov byte ptr [di - 1], 0 + dec di + + jmp _handler_path.trim + +_handler_path.got_arg: + + mov bx, offset _arg + push di + + mov si, cs:[_vec_env] + mov cx, cs:[_vec_env + 4] + + push bx + + mov es, si + xor di, di + +_handler_path.find2: + + and cx, cx + jz _handler_path.no_var + + push es + mov ax, es:[di] + + mov es, ax + push es + + xor bx, bx + mov ax, es:[bx] + + push cx + push es + push ds + + mov cx, ds + mov es, cx + mov ds, ax + + xor ax, ax + push ax + + mov ax, offset _temp + push ax + + call _strcpy + add sp, 4 + + pop ds + + mov ax, ds + mov es, ax + + mov ax, offset _var + push ax + + mov ax, offset _temp + push ax + + call _strcmp + add sp, 4 + + pop es + pop cx + + and ax, ax + jz _handler_path.found + + pop ax + pop es + + add di, 2 + + dec cx + jz _handler_path.no_var + + jmp _handler_path.find2 + +_handler_path.no_var: + + mov ax, 4 + push ax + + xor ax, ax + push ax + + call _xmalloc + add sp, 4 + + mov si, ax + push ax + + mov ax, offset _vec_env + push ax + + call _vec_push + add sp, 4 + + mov ax, offset _var + push ax + + call _strlen + add sp, 2 + + mov cx, ax + inc cx + + push cx + push dx + + call _xmalloc + add sp, 4 + + push es + push si + + mov es, si + xor si, si + + mov word ptr es:[si], ax + push di + mov es, ax + + mov si, offset _var + xor di, di + rep movsb + + pop di + +_handler_path.found: + + pop si + + mov es, si + xor bx, bx + + mov ax, es:[bx + 2] + + and ax, ax + jz _handler_path.get_value + + push ax + + call _free + add sp, 2 + + xor ax, ax + mov es:[bx + 2], ax + +_handler_path.get_value: + + pop es + pop bx + + pop cx + sub cx, bx + + and cx, cx + jz _handler_path.done + + push cx + push dx + + call _xmalloc + add sp, 4 + + mov es, si + xor di, di + + mov es:[di + 2], ax + mov es, ax + + mov si, bx + xor di, di + rep movsb + + jmp _handler_path.done + +_handler_path.err_no_path: + + mov bx, offset _err_no_path + call _writestr + +_handler_path.done: + + pop ds + pop es + pop di + pop si + pop dx + pop cx + pop bx + pop ax + ret + +;****************************************************************************** +; @function _skip_whitespace +;****************************************************************************** +global _skip_whitespace +_skip_whitespace: + + cmp byte ptr [bx], 0 + je _skip_whitespace.done + + cmp byte ptr [bx], ' ' + ja _skip_whitespace.done + + inc bx + jmp _skip_whitespace + +_skip_whitespace.done: + + ret + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Data area. +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +_err_no_path: db "No Path", HEX (0D), HEX (0A), HEX (00) +_var: db "PATH", HEX (00) + +_arg: db 256 dup (0) +_temp: db 256 dup (0) diff --git a/src/apps/pcomm/pcomm.asm b/src/apps/pcomm/pcomm.asm index 484b6db..8a41be4 100644 --- a/src/apps/pcomm/pcomm.asm +++ b/src/apps/pcomm/pcomm.asm @@ -2321,6 +2321,10 @@ _cmd_table: dw 0 dw _handler_mkdir + dw hash_path + dw 0 + dw _handler_path + dw hash_reboot dw 0 dw _handler_reboot -- 2.34.1