From 19d949dea229872cdd0d1a97d3e002fc63cf3866 Mon Sep 17 00:00:00 2001 From: Robert Pengelly Date: Wed, 25 Sep 2024 13:07:29 +0100 Subject: [PATCH] Execute from PATH when not found in current directory --- build/chimaera.img | Bin 368640 -> 368640 bytes build/chimaera.vhd | Bin 34120704 -> 34120704 bytes src/Makefile.unix | 4 +- src/apps/hello/hello.asm | 16 +-- src/apps/pcomm/path.asm | 206 ++++++++++++++++++++++++++++++++++++++- src/apps/pcomm/pcomm.asm | 134 ++++++++++++++++++++++++- src/apps/pcomm/set.asm | 1 - 7 files changed, 349 insertions(+), 12 deletions(-) diff --git a/build/chimaera.img b/build/chimaera.img index ee9474368ea5f199e8b0423eb99ae0ca9b36962e..79c30fdaf6c5293d02b71a149ae1edeaa654ea5c 100644 GIT binary patch delta 4644 zcmb7H4OG+D6@UMKzWe|LQHoz7A;^dD|C>a>0Kq`<1B=2xq!K`dxsSSbR(F)>x^;%i z)*A3|JifZtR?mvMotYh1Dzpt|GeH!cHLY@1#iF)O+rAieB8sT3?!JGBptd_J=Y;oi z-+TAo-~HWp-%YJIrq&y?IZ28qeR}-8R4pt0LNYL>rD;@?WQ%<9urH$`>|H<4s>rH9 zh>l47d%C3LSyk{aGAIwNv*P;P(m8V$%q~?~DlDo;*JbFBMudvylorofp!$yW@uu@MW0yB0Lf^Mj75RFAn9bUox6?0Rfn z0_guF0j(v&wMxWe->>yizy)*XJqB2ce4uxiWS`2jo&9TUOZ(ru7`us6duzf45?54r zh}C)dT_%n{B2VHFg5fNf1CTYD^bDxvnc|ED3n(We4R+SGN zqqYT0S*;1#H2gaoIB9+>yYZk;-OBFE7XL5tsonV;Db6GBqrftk3JH$$Wu%RH21k2x zCbM~U1Cn*)>jv1>k&ZsnXCjp-Aa}2n5@NzHc-BrSGM`G0JTl zL2epbst&%+vcJm4HxH@UGqZ8b;kYrYvxeE*I9s&0>~J<4HyiIb9LvgP;|~w#vUdu= ztP00;8rioCM6)}yMYETUqFGO80^6U3zwBHzE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{eO!U_WR9t)LAY05X*_8HNhD1q z8AwJ_ENK#HGAWJ}Pf8#qlBST7NXaAw!>N+V4trITimW|A^Uvq-Z^b4WLl z9BH3Rzvhu{CS{S#q-;_S$wIn?G@q19$|Efx<&zeY7LgW{mXMZ`3P`t-mXU5F-A=lL zbSLR9(%q!xqqu5o6{(uEp7a!{hV(S)8Pc<)4W#Et&y!vty-1Qs z8%ZybUM9Ul+C93^Sq(;&n z(q2*%shPBow4c;MY9+Oi4v=i5H%WgZ9VE4rI!K+QL!>U!Tco#1he=0BM@jFH-X$F) z{hicJ`UmMf(s9!Jq#n`-qz_3Skv=AULOMbEC+SntNzy6OzeuM^pOMax&XPVS{hM@- z^abfl(tk)Y$xix;)JyuBbe{AL>08owqzk0)NqwY?q#sC^NS8_dq${MWq-&%fNk5T( zCJiVs{qgvrAn_z6$%W)fQjyerJElM0oZIBZKgGYgRl|=_K3Q9}Wh{Q_N7+}T2i|H@ Wt(kaJ?!6_Z>C1!t@vq(+ivI$IE~N?p diff --git a/src/Makefile.unix b/src/Makefile.unix index db0dd9c..be37d93 100644 --- a/src/Makefile.unix +++ b/src/Makefile.unix @@ -30,7 +30,9 @@ chimaera.img: all utils/dosfstools/mcopy -i $@ boot/freeldr/core/freeldr.sys :: utils/dosfstools/mcopy -i $@ kernel/kernel.sys :: utils/dosfstools/mcopy -i $@ apps/pcomm/pcomm.com ::command.com -# utils/dosfstools/mcopy -i $@ apps/hello/hello.com ::hello.com + +# utils/dosfstools/mmd -i $@ dos +# utils/dosfstools/mcopy -i $@ apps/hello/hello.com ::dos/hello.com chimaera.vhd: all if [ -f $@ ]; then rm -rf $@; fi diff --git a/src/apps/hello/hello.asm b/src/apps/hello/hello.asm index 66c03e0..c6eb2cf 100644 --- a/src/apps/hello/hello.asm +++ b/src/apps/hello/hello.asm @@ -24,14 +24,14 @@ _main: mov bx, offset _msg_hello call _writestr -.L1: - - mov ah, HEX (02) - mov dl, 'A' - int HEX (21) - - jmp .L1 - +;.L1: +; +; mov ah, HEX (02) +; mov dl, 'A' +; int HEX (21) +; +; jmp .L1 +; ; mov bp, sp ; ; mov ax, bp diff --git a/src/apps/pcomm/path.asm b/src/apps/pcomm/path.asm index f540a52..d1aaa6a 100644 --- a/src/apps/pcomm/path.asm +++ b/src/apps/pcomm/path.asm @@ -372,10 +372,214 @@ _handler_path.done: pop ax ret +;****************************************************************************** +; @function _get_paths +;****************************************************************************** +global _get_paths +_get_paths: + + push ax + push bx + push cx + push dx + push si + push di + push es + push ds + + mov ax, cs:[_vec_paths] + + and ax, ax + jz _get_paths.clear + + push ax + + call _free + add sp, 2 + + xor ax, ax + mov cs:[_vec_paths], ax + +_get_paths.clear: + + mov di, offset _vec_paths + xor al, al + + mov cx, 6 + rep stosb + + mov si, cs:[_vec_env] + mov cx, cs:[_vec_env + 4] + + mov es, si + xor di, di + +_get_paths.find: + + and cx, cx + jz _get_paths.done + + 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 + + push es + push di + + mov di, offset _temp + xor al, al + + mov cx, 255 + rep stosb + + pop di + pop es + + 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 _get_paths.found + + pop ax + pop es + + add di, 2 + dec cx + + jmp _get_paths.find + +_get_paths.found: + + pop si + pop es + + mov es, si + xor bx, bx + + mov ax, es:[bx + 2] + + and ax, ax + jz _get_paths.done + + push cx + push es + push ds + + mov cx, ds + mov es, cx + mov ds, ax + + push es + push di + + mov di, offset _temp + xor al, al + + mov cx, 255 + rep stosb + + pop di + pop es + + xor ax, ax + push ax + + mov ax, offset _temp + push ax + + call _strcpy + add sp, 4 + + pop ds + pop es + pop cx + + mov di, offset _temp + xor bx, bx + + mov ax, ds + mov es, ax + +_get_paths.loop: + + push di + + mov ax, offset _vec_paths + push ax + + call _vec_push + add sp, 4 + + mov ax, ';' + push ax + + push di + + call _strchr + add sp, 4 + + and ax, ax + jz _get_paths.done + + mov di, ax + + xor al, al + stosb + + jmp _get_paths.loop + +_get_paths.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 diff --git a/src/apps/pcomm/pcomm.asm b/src/apps/pcomm/pcomm.asm index 9a59251..8e01127 100644 --- a/src/apps/pcomm/pcomm.asm +++ b/src/apps/pcomm/pcomm.asm @@ -1356,6 +1356,8 @@ _main: xor al, al stosb + push bx + mov dx, offset _app_path inc bx mov di, bx @@ -1367,8 +1369,79 @@ _main: mov ax, HEX (4B00) int HEX (21) + pop bx jnc .L5 + mov ax, '\\' + push ax + + mov ax, offset _app_path + push ax + + call _strrchr + add sp, 4 + + and ax, ax + jnz .L98 + +.L99: + + call _get_paths + + push ax + push bx + push cx + push di + push es + + mov ax, cs:[_vec_paths] + mov es, ax + mov cx, cs:[_vec_paths + 4] + + xor di, di + +.L96: + + and cx, cx + jz .L97 + + mov ax, offset _app_path + push ax + + mov ax, es:[di] + push ax + + call _concat_exec + jnc .L100 + add sp, 4 + + add di, 2 + dec cx + + jmp .L96 + +.L100: + + add sp, 4 + + pop es + pop di + pop cx + pop bx + pop ax + + jmp .L5 + +.L97: + + pop es + pop di + pop cx + pop bx + pop ax + +.L98: + mov bx, offset _err_invalid call _writestr @@ -1543,6 +1616,60 @@ _main: jmp .L11 +;****************************************************************************** +; @function _concat_exec +;****************************************************************************** +_concat_exec: + + push bp + mov bp, sp + + push ax + push bx + push cx + push dx + push si + push di + push es + + mov ax, ds + mov es, ax + + mov di, offset _full_path + + mov si, word ptr [bp + 4] + call _format_path + + mov al, '\\' + stosb + + mov si, word ptr [bp + 6] + call _format_path + + mov dx, offset _full_path + inc bx + mov di, bx + + mov bx, offset _param_blk + + mov word ptr [bx + 2], di + mov word ptr [bx + 4], ds + + mov ax, HEX (4B00) + int HEX (21) + +_concat_exec.done: + + pop es + pop di + pop si + pop dx + pop cx + pop bx + pop ax + pop bp + ret + ;****************************************************************************** ; @function _get_env ;****************************************************************************** @@ -2241,9 +2368,11 @@ _scratch: db 257 dup (0) ;; Variables for executing application. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;_formatted_cmd: db 255 dup (0) -_app_path: db 255 dup (0) +_app_path: db 256 dup (0) _param_blk: db 16 dup (0) +_full_path: db 256 dup (0) + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Error messages. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; @@ -2268,6 +2397,9 @@ _vec_history: db 6 dup (0) global _vec_env _vec_env: db 6 dup (0) +global _vec_paths +_vec_paths: db 6 dup (0) + global _curr_row _curr_row: db HEX (00) diff --git a/src/apps/pcomm/set.asm b/src/apps/pcomm/set.asm index ff64a39..95049ec 100644 --- a/src/apps/pcomm/set.asm +++ b/src/apps/pcomm/set.asm @@ -354,7 +354,6 @@ _handler_set.done: ;****************************************************************************** ; @function _skip_whitespace ;****************************************************************************** -global _skip_whitespace _skip_whitespace: cmp byte ptr [bx], 0 -- 2.34.1