Re: What about SystemA() [the function for call programs] function?




"rio" <a@xxx> ha scritto nel messaggio
news:48b26859$0$18155$4fafbaef@xxxxxxxxxxxxxxxxxxxxxx
What about SystemA() [the function for call programs in Windows] function?

What about the last HexPrint?

section _DATA use32 public class=DATA

I0123456789ABCDEF db "0123456789ABCDEF" ,0,0,0,0

section _TEXT use32 public class=CODE

; 0j,4i,8b,12ra,16P_hexValue +256
HexPrint:
push ebx
push esi
push edi
sub esp, 256
mov ebx, dword[esp+ 272]
xor edi, edi
xor eax, eax
mov ecx, 28
mov byte[esp+edi], '0'
inc edi
mov byte[esp+edi], 'x'
inc edi
mov esi, 0xF0000000
..0: mov edx, esi
and edx, ebx
shr edx, cl
mov al, [ I0123456789ABCDEF +edx]
mov [esp+edi], al
inc edi
shr esi, 4
sub ecx, 4
jge .0
mov byte[esp+edi], 0
mov esi, [stderr]
mov eax, esp
push eax
push esi
call SPuts
lea esp, [esp+256]
pop edi
pop esi
pop ebx
ret 4
---------------------------------------------

section _DATA use32 public class=DATA

" 0123456789ABCDEF" db "0123456789ABCDEF", 0, 0, 0, 0

section _TEXT use32 public class=CODE

/* 0j,4i,8b,12ra,16P_hexValue +256
HexPrint:
<b,i,j
s-=256
b=^272|j^=j|a^=a|c=28
B[s+j]='0'|++j
B[s+j]='x'|++j
i=0xF0000000
..0: r=i|r&=b|r>>=cl
al=[" 0123456789ABCDEF" + r]
[s+j]=al|++j|i>>=4|c-=4|>=?#.0
B[s+j]=0
i=*stderr|a=s|SPuts(i, a)
s=&[s+256]
b,i,j
ret 4



.



Relevant Pages