Greyhound2004
June 21st, 2008, 02:33
Hi
I'm working through a tutorial trying to understand the basics.
The original code is this:-
0003.71A8 75 57 JNE 7201
0003.71AA 8B 46 FA MOV AX, BP-06
This code is changed to :-
0003.71A8 E9 8F JMP
0003.71AA 00 68 00 PUSH 00
What I've worked out so far:-
.71A8 the first hex figure 75 is the op code (JNE) jump not equal to 7201
the op code is at 71A8 and the 'offset' 57 is at 71A9 yet if you add 57 to 71A9 you get 7200 (1 less than what it should be -why is that?)
The instruction at 71AA mov into AX (the lower half of EAX) what ever is stored in the memory location pointed to by BP-06
This seems to be to do with the nag screen.
The conditional jump JNE is changed to an always JMP presumably to 71A9 + 8F 7240
In the changed code 71AA we are pushing (to the stack) value 00 when you compare this to the old code it does not seem to do anything is this just to keep the code length the same?
Why is the op code 68 (push) preceeded by 00?
Regards.
I'm working through a tutorial trying to understand the basics.
The original code is this:-
0003.71A8 75 57 JNE 7201
0003.71AA 8B 46 FA MOV AX, BP-06
This code is changed to :-
0003.71A8 E9 8F JMP
0003.71AA 00 68 00 PUSH 00
What I've worked out so far:-
.71A8 the first hex figure 75 is the op code (JNE) jump not equal to 7201
the op code is at 71A8 and the 'offset' 57 is at 71A9 yet if you add 57 to 71A9 you get 7200 (1 less than what it should be -why is that?)
The instruction at 71AA mov into AX (the lower half of EAX) what ever is stored in the memory location pointed to by BP-06
This seems to be to do with the nag screen.
The conditional jump JNE is changed to an always JMP presumably to 71A9 + 8F 7240
In the changed code 71AA we are pushing (to the stack) value 00 when you compare this to the old code it does not seem to do anything is this just to keep the code length the same?
Why is the op code 68 (push) preceeded by 00?
Regards.