MOV EAX,124578
XOR EBX,EBX
ROL EAX,4
push offset DONE
push offset LOOP
ret
ret
nop
nop
nop
nop
nop
nop
LOOP:
MOV BL,AL
ROL EAX,4
ROR EBX,4
sub esp,4
dec byte ptr [esp]
ret
DONE:
AND AL,0F
AND BL,0F0
OR BL,AL
ROR EBX,4
字符串的代码:
esi是输入指针,edi是输出指针
mov esi , offset @Input
mov edi , offset @Output
push offset Done
mov ebx , offset @f
push A
ret
@@:
ret
db 256 dup (90h)
mov [edi],al
inc esi
dec edi
A:
mov al,[esi]
push ebx
add [esp],al
ret
Done:
inc edi