Far jump to a label?

Reply

Join Date: Mar 2008
Posts: 2
Reputation: koyi is an unknown quantity at this point 
Solved Threads: 0
koyi koyi is offline Offline
Newbie Poster

Far jump to a label?

 
0
  #1
Mar 7th, 2008
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:

  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
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the Assembly Forum


Views: 2320 | Replies: 0
Thread Tools Search this Thread



Tag cloud for Assembly
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2010 DaniWeb® LLC