requested changes

This commit is contained in:
2026-03-07 14:15:06 +02:00
parent d8d4759097
commit 2c20243949

View File

@@ -1,6 +1,8 @@
; wraps command line arguments in quotes and launches a target.
; TARGET equ 'target_name' must be defined before including this file.
include 'KOSfuncs.inc'
org 0x0
use32
@@ -18,30 +20,26 @@ start:
je .launch
mov esi, params
mov edi, new_params
mov byte [edi], '"'
inc edi
mov ah, '"'
.copy:
lodsb
.shift_loop:
mov al, [esi]
mov [esi], ah
inc esi
mov ah, al
test al, al
jz .done
stosb
jmp .copy
jnz .shift_loop
.done:
mov byte [edi], '"'
inc edi
mov byte [edi], 0
mov word [esi], '"'
mov dword [fi + 8], new_params
mov dword [fi + 8], params
.launch:
mov eax, 70
mov eax, SF_FILE
mov ebx, fi
int 0x40
mov eax, -1
mov eax, SF_TERMINATE_PROCESS
int 0x40
fi:
@@ -54,6 +52,6 @@ target_path db TARGET, 0
i_end:
params rb 1024
new_params rb 1024
m_end: