943,948 Members | Top Members by Rank

Ad:
  • Assembly Discussion Thread
  • Unsolved
  • Views: 3329
  • Assembly RSS
Mar 7th, 2008
0

Far jump to a label?

Expand Post »
Hi, I am pretty new with assembly so please bear with me if this question sounds stupid

I am teaching myself OS development from resources of the web. I came across this tutorial here which talks about setting up GDT. I don't really get it when it is to set the value of CS register using a far jump. The code is like this:

Assembly Syntax (Toggle Plain Text)
  1. jmp 0x08:flush2 ; 0x08 is the offset to our code segment: Far jump!
  2. flush2:
  3. ret ; Returns back to the C code!

Is the jmp command supposed to jump to "flush2" and continue its execution from "ret"? How can that happen? Isn't the long jump supposed to jump to 0x080 + (the address of flush2)?

Thanks in advance
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
koyi is offline Offline
2 posts
since Mar 2008

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Assembly Forum Timeline: Convert chars to ASCII and add their ASCII value
Next Thread in Assembly Forum Timeline: protected mode





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC