From: Robert Pengelly Date: Wed, 14 Aug 2024 20:33:00 +0000 (+0100) Subject: Return last exit code X-Git-Url: https://git.candlhat.org/?a=commitdiff_plain;h=94e89b5caaa29ad559477f68ac8e4abb1c9c23e3;p=chimaera.git Return last exit code --- diff --git a/build/chimaera.img b/build/chimaera.img index b3e0a5e..399d6a4 100644 Binary files a/build/chimaera.img and b/build/chimaera.img differ diff --git a/build/chimaera.vhd b/build/chimaera.vhd index 26c7b5c..05a7911 100644 Binary files a/build/chimaera.vhd and b/build/chimaera.vhd differ diff --git a/src/apps/hello/hello.asm b/src/apps/hello/hello.asm index bba6775..4ed55a5 100644 --- a/src/apps/hello/hello.asm +++ b/src/apps/hello/hello.asm @@ -69,12 +69,12 @@ _main: ; mov ax, [bp] ; call _writehex ; call _crlf -; -; mov ax, HEX (4B01) -; mov bx, offset _param_blk -; mov dx, offset _app_name -; int HEX (21) -; + + mov ax, HEX (4B01) + mov bx, offset _param_blk + mov dx, offset _app_name + int HEX (21) + ; mov ah, HEX (62) ; int HEX (21) ; @@ -487,7 +487,7 @@ _main: ; xor ax, ax ; int 0x16 - xor ax, ax + mov ax, 1 ret ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; @@ -503,7 +503,6 @@ _msg_hello: db "Hello, world!", HEX (0D), HEX ;_flags: db "w+b", HEX (00) ;_buffer: db 512 dup (0) ;_to_write: dw HEX (0000) -;_app_name: db "\\command.com", HEX (00) -;_param_blk: db 22 dup (0) -; +_app_name: db "\\command.com", HEX (00) +_param_blk: db 22 dup (0) ;_msg_any_key: db "Press any key to exit...", HEX (0D), HEX (0A), HEX (00) diff --git a/src/kernel/int21.asm b/src/kernel/int21.asm index 2b2e5e1..e300cf6 100644 --- a/src/kernel/int21.asm +++ b/src/kernel/int21.asm @@ -4281,6 +4281,10 @@ _int21_4C.done: mov cs:[_curr_psp], bx call _free_mem + + xor ah, ah + mov al, cs:[_last_ret_val] + retf ;******************************************************************************