View difference between Paste ID: drb7wsgQ and 5YEWiCE6
SHOW: | | - or go back to the newest paste.
1
union opcodestring
2
 s as byte ptr
3
 f as function () as long
4
end union
5
6
dim as string st
7
dim as opcodestring act
8
9
'0:  33 c0                   xor    eax,eax
10
'2:  40                      inc    eax
11
'3:  c3                      ret
12
'st=chr$(&h33)+chr$(&hc0)+chr$(&h40)+chr$(&hc3)  									' xor eax,eax inc eax ret
13
14
15
' 0:  66 b8 0a 00             mov    ax,0xa
16
' 4:  00 00                   add    BYTE PTR [eax],al
17
' 6:  c3                      ret
18
'st=chr$(&h66)+chr$(&hb8)+chr$(&h0a)+chr$(&h00)+chr$(&h00)+chr$(&h00)+chr$(&hc3) 	' mov eax,10 ret
19
20
st=chr( _
21
	&hB8, &h0A, &h00, &h00, &h00, _    ' mov eax, 10
22
	&hC3 _                             ' ret
23
)
24
25
st=chr( _
26-
	&h66, &hB8, &h0A, _        ' mov eax, 10
26+
	&h66, &hB8, &h0A, &h00, _  ' mov eax, 10
27
	&hC3 _                     ' ret
28
)
29
30
31
act.s=strptr(st)
32
asm xor eax,eax		'eax auf 0 setzen
33
print act.f()