1
0
mirror of https://github.com/upx/upx synced 2025-09-28 19:06:07 +08:00

Detabified.

committer: mfx <mfx> 1042564671 +0000
This commit is contained in:
Markus F.X.J. Oberhumer 2003-01-14 17:17:51 +00:00
parent 992ceee52b
commit c7b9395866
3 changed files with 40 additions and 32 deletions

View File

@ -177,3 +177,6 @@ eof:
DW -1
DH eof
; vi:ts=8:et:nowrap

View File

@ -50,14 +50,14 @@ start:
or ebp, byte -1
mov eax, 'KEIP' ; 0x100000 - address of startup_32
push eax ; MATCH00
push edi ; MATCH01
push esi ; MATCH02
push eax ; MATCH00
push edi ; MATCH01
push esi ; MATCH02
%ifdef __LZCALLT1__
push eax ; MATCH03
push eax ; MATCH03
%endif; __LZDUMMY0__
%ifdef __LZCKLLT1__
push eax ; MATCH03
push eax ; MATCH03
push byte '?' ; MATCH04
%endif; __LZDUMMY1__
%ifdef __LBZIMAGE__
@ -102,18 +102,18 @@ checka20:
; =============
%ifdef __LZCKLLT9__
pop edx ; MATCH04
pop edi ; MATCH03
pop edx ; MATCH04
pop edi ; MATCH03
ckt32 dl
%endif; __LZDUMMY2__
%ifdef __LZCALLT9__
pop edi ; MATCH03
pop edi ; MATCH03
cjt32 0
%endif; __LINUZ990__
pop esi ; MATCH02
pop edi ; MATCH01
pop esi ; MATCH02
pop edi ; MATCH01
xor ebx, ebx ; booting the 1st cpu
retn ; MATCH00
retn ; MATCH00
; =============
; ============= CUT HERE
@ -126,3 +126,6 @@ eof:
section .data
dd -1
dw eof
; vi:ts=8:et:nowrap

View File

@ -27,29 +27,31 @@
BITS 32
SECTION .text
GLOBAL upx_itoa
GLOBAL upx_itoa
upx_itoa: ; char *upx_itoa(eax= unsigned v, edx= char *buf) /* 0<=(int)v */
push edi ; save register
mov edi,edx ; output ptr
push byte 10
cld
pop ecx ; radix
call recur
mov [edi],ah ; NUL terminate
xchg eax,edi ; eax= continuation point
pop edi ; restore register
ret
push edi ; save register
mov edi,edx ; output ptr
push byte 10
cld
pop ecx ; radix
call recur
mov [edi],ah ; NUL terminate
xchg eax,edi ; eax= continuation point
pop edi ; restore register
ret
recur:
cdq ; zero extend eax into edx [use "sub edx,edx" if eax < 0 ]
div ecx ; eax=quo, edx=rem; flags are undefined
push edx
test eax,eax
je quo0
call recur
cdq ; zero extend eax into edx [use "sub edx,edx" if eax < 0 ]
div ecx ; eax=quo, edx=rem; flags are undefined
push edx
test eax,eax
je quo0
call recur
quo0:
pop eax ; remainder
add al, byte '0'
stosb
ret
pop eax ; remainder
add al, byte '0'
stosb
ret
; vi:ts=8:et:nowrap