Am I jumping to address 0x0? 
Author Message
 Am I jumping to address 0x0?

Can someone explain what the following bits of code
will do?
At top of the module, I have the line:
   abcd   dd 0h
Does this set "abcd" to 0x0?

Later on, I have the following:
                jmp   [abcd]
_x1::                          ;the default
           popfd
           pop       EAX
           ret

_x2::                          
           push      EBX
           push      ECX
           push      EDX
           mov       EDX,EAX
           mov       EAX,045h
           pop       EDX
           pop       ECX
           pop       EBX
           popfd
           pop       EAX
           ret

_x3::                        
           push      EDX
           push      EAX
           mov       EDX,04h
           pop       EDX
           popfd
           pop       EAX
           ret

Does the "jmp   [abcd]" jump to address 0x0, or does it
jump to _x1, or _x2, or _x3???

Thanks.



Thu, 31 Mar 2005 06:10:33 GMT  
 Am I jumping to address 0x0?

Quote:

>Can someone explain what the following bits of code
>will do?
>At top of the module, I have the line:
>   abcd   dd 0h
>Does this set "abcd" to 0x0?

It says that abcd will be 0 when the program starts.

Quote:
>Later on, I have the following:
>            jmp   [abcd]
>Does the "jmp   [abcd]" jump to address 0x0, or does it
>jump to _x1, or _x2, or _x3???

If nothing has changed the value of abcd, it will just to address 0, which
will cause a fault.
--

  Providenza & Boekelheide, Inc.


Fri, 01 Apr 2005 14:17:03 GMT  
 Am I jumping to address 0x0?

Quote:
> If nothing has changed the value of abcd, it will just to address 0, which
> will cause a fault.

In DOS, address 0 is the first byte of the PSP, and
the instruction at address 0 is an interrupt 20h. I've done
this before for an end program instruction just for
the heck of it. But in Windows, yes I do suppose that
would be a fault.

just an idea/stupid thought.



Sat, 02 Apr 2005 06:40:37 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. jumping to far address

2. jump to far address

3. Jump address to protected mode

4. I am looking for email address of Rodney W. Johnson

5. I am away, addresses for problems concerning APL94

6. Jump...Jump

7. must start at 0x0?

8. mov eds,[0x0]

9. Moving the kernel to 0x0 on a Dell Dimension 4400

10. Removing widgets from frames, why frames don't resize to 0x0

11. I am not deaf, but am I mute?

12. HandyMailTemplates - how to get email address from a recipients address

 

 
Powered by phpBB® Forum Software