I did try most of the suggestion so far before posting hence me going a little mad! non seem to work so far.
Code: Select all
Procedure Test()
EnableASM
Code:
MOV EAX,1
ADD EAX,2
DisableASM
EndProcedure
OpenConsole()
Address.i = ?Code
For i=0 To 100
PrintN(Hex(PeekA(Address.i+i)))
Debug Hex(PeekA(Address.i+i))
Next
Name$ = Input()
CloseConsole()
Results from first few bytes of output
68
0
0
0
0
E8
Should be
B8
01
00
00
00
83
I Also tried "Address.i = @Code" without luck, also looked how to produce a .asm file and could not find that option!
To try to make sence of it all I have dumped a larger section of bytes and I can see each instruction but they are surrounded by extra code!
Output from dumping more bytes ?Code label
68,6,0,0,0,E8,70,FE,FF,FF,
B8,1,0,0,0,68,7,0,0,0,E8,61,FE,FF,FF,
83,C0,2,68,9,0,0,0,E8,54,FE,FF,FF,31,C0,52,50,E8,45,33,0,0,58,5A,C3
Which is this
Code: Select all
68 06000000 PUSH 6
E8 70FEFFFF CALL prog1.004010E1
B8 01000000 MOV EAX,1 <<<<<<<<<<<<<<<<<<<<<<<
68 07000000 PUSH 7
E8 61FEFFFF CALL prog1.004010E1
83C0 02 ADD EAX,2 <<<<<<<<<<<<<<<<<<<<<<<
68 09000000 PUSH 9
E8 54FEFFFF CALL prog1.004010E1
31C0 XOR EAX,EAX
52 PUSH EDX
50 PUSH EAX
E8 45330000 CALL prog1.004045DB
58 POP EAX
5A POP EDX
C3 RETN
What is PB doing
Thanks