RSS Forums RSS
Please support our Assembly advertiser: Programming Forums

Understanding the 8088/86 JMP command

Join Date: Sep 2006
Posts: 299
Reputation: Colin Mac is on a distinguished road 
Rep Power: 3
Solved Threads: 20
Colin Mac Colin Mac is offline Offline
Posting Whiz in Training

Re: Understanding the 8088/86 JMP command

  #3  
May 4th, 2007
Originally Posted by amrbekhit View Post
Hi all,

I've been trying to understand how an assembler assembles the JMP command. Consider the following code:

AGAIN:
    OUT 0,AL
    JMP AGAIN

The assembler turns this into the following hex:

E6 00 EB FC

The FC at the end corresponds to a displacement of -4. I would have thought that the displacement would only need to be -3 (FC->EB, EB->00, 00->E6). What is the reason for this extra move? I'm guessing this is related to the 8088 parallel fetch and execution.

Thanks

--Amr

Yeah, the program counter automatically points to the next instruction before the actual execution, so the jump back to FC is counted as well.
Last edited by Colin Mac : May 4th, 2007 at 12:26 pm.
Reply With Quote  
Forums | Blogs | Tutorials | Code Snippets | Whitepapers | RSS Feeds | Advertising
All times are GMT -4. The time now is 10:13 pm.
Newsletter Archive - Sitemap - Privacy Statement - Acceptable Use Policy - Contact Us
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC