requested changes
All checks were successful
Build system / Check kernel codestyle (pull_request) Successful in 52s
Build system / Build (pull_request) Successful in 17m51s

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