mirror of
https://github.com/KolibriOS/kolibrios.git
synced 2024-11-29 12:13:12 +03:00
f19e882566
Added code for packing the kernel.mnt git-svn-id: svn://kolibrios.org@1713 a494cfbc-eb01-0410-851d-a64ba20cac60
33 lines
561 B
PHP
33 lines
561 B
PHP
pop esi
|
|
push esi
|
|
loader_patch4:
|
|
mov ecx, 0 ; will be patched: number of calltrick entries
|
|
ctrloop:
|
|
lodsb
|
|
@@:
|
|
cmp al, 0xF
|
|
jnz .f
|
|
lodsb
|
|
cmp al, 80h
|
|
jb @b
|
|
cmp al, 90h
|
|
jb @f
|
|
.f:
|
|
sub al, 0E8h
|
|
cmp al, 1
|
|
ja ctrloop
|
|
@@:
|
|
cmp byte [esi], 0 ; will be patched: code in calltrick entries
|
|
loader_patch5:
|
|
jnz ctrloop
|
|
lodsd
|
|
; "bswap eax" is not supported on i386
|
|
; mov al,0/bswap eax = 4 bytes, following instructions = 9 bytes
|
|
shr ax, 8
|
|
ror eax, 16
|
|
xchg al, ah
|
|
sub eax, esi
|
|
add eax, [esp]
|
|
mov [esi-4], eax
|
|
loop ctrloop
|