/kernel/trunk/core/memory.inc |
---|
1261,18 → 1261,21 |
jz .fail |
mov esi, eax |
push ebx ; base addres driver |
push [cmdline] |
push DRV_ENTRY |
call eax |
pop ecx |
pop ecx |
pop ebx |
test eax, eax |
jz .fail |
jz .fail_init |
mov [eax+SRV.entry], esi |
pop esi |
ret |
.fail_init: |
stdcall kernel_free, ebx ;clear memory driver |
.fail: |
xor eax, eax |
pop esi |
/kernel/trunk/core/peload.inc |
---|
11,6 → 11,9 |
align 4 |
; This function load file driver and output |
; eax = address function START in driver |
; ebx = address for kernel_free |
proc load_PE stdcall, file_name:dword |
locals |
image dd ? |
58,6 → 61,7 |
.cleanup: |
stdcall kernel_free, [image] |
mov eax, [entry] |
mov ebx, [base] |
ret |
.fail: |
xor eax, eax |