Process environment passed to us
authorRobert Pengelly <robertapengelly@hotmail.com>
Mon, 30 Sep 2024 16:38:26 +0000 (17:38 +0100)
committerRobert Pengelly <robertapengelly@hotmail.com>
Mon, 30 Sep 2024 16:38:26 +0000 (17:38 +0100)
build/chimaera.img
build/chimaera.vhd
src/apps/pcomm/pcomm.asm
src/apps/pcomm/set.asm

index 89c9d7bb8edb957d3b94e46aea824e87b716b02f..293338885c19c1740cfbc5453ddd019c791051c7 100644 (file)
Binary files a/build/chimaera.img and b/build/chimaera.img differ
index 8a052274ae7ef9368a027df3c907f2a3160c494f..47cb4229bc2a31d9a99814d3c412c28169595b47 100644 (file)
Binary files a/build/chimaera.vhd and b/build/chimaera.vhd differ
index 08163209d45863122e79eaa6b601e2e2d47aeae4..2e21d9e70da0cf7af4582e5e3b4fa92e3f314a35 100644 (file)
@@ -26,6 +26,40 @@ _main:
     mov     bx,     offset _welcome_message
     call    _writestr
     
+    mov     ax,     cs:[HEX (2C)]
+    
+    and     ax,     ax
+    jz      .L110
+    
+    push    ds
+    push    bx
+    
+    mov     ds,     ax
+    xor     bx,     bx
+
+.L109:
+
+    cmp     byte ptr [bx],      0
+    je      .L117
+    
+    call    _handler_set
+    push    bx
+    
+    call    _strlen
+    add     sp,     2
+    
+    add     bx,     ax
+    inc     bx
+    
+    jmp     .L109
+
+.L117:
+
+    pop     bx
+    pop     ds
+
+.L110:
+
     xor     ax,     ax
     push    ax
     
index 95049eca422586747d69af7c59056a95bc15a51b..5663e2fc067a8d3e17844242c41c34f7b0ebe0a7 100644 (file)
@@ -20,6 +20,9 @@ _handler_set:
     push    es
     push    ds
     
+    mov     ax,     cs
+    mov     es,     ax
+    
     xor     dx,     dx
     call    _skip_whitespace
     
@@ -114,7 +117,11 @@ _handler_set.trim:
 
 _handler_set.got_arg:
 
+    mov     ax,     cs
+    mov     ds,     ax
+    
     mov     bx,     offset _arg
+    
     push    di
     mov     di,     offset _var