| | |
Far jump to a label?
![]() |
•
•
Join Date: Mar 2008
Posts: 2
Reputation:
Solved Threads: 0
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:
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

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)
jmp 0x08:flush2 ; 0x08 is the offset to our code segment: Far jump! flush2: 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
- trojans...now nothing opens and I get a paint can't open error (Viruses, Spyware and other Nasties)
- NASM Boot Disk (Assembly)
- RGSS / Ruby Game Scripting System (Legacy and Other Languages)
- String to real and real to String (Assembly)
- how to jump N lines in C (C++)
- vBulletin mod_rewrite for vB 3.0.7 (Existing Scripts)
- Dementia: System CPU overusage (Viruses, Spyware and other Nasties)
- Loop...without the loop (Java)
Other Threads in the Assembly Forum
- Previous Thread: Convert chars to ASCII and add their ASCII value
- Next Thread: protected mode
Views: 2320 | Replies: 0
| Thread Tools | Search this Thread |
Tag cloud for Assembly
80386 :( adress array asm assembler assembly boot bootloader buffer call compression cursor directory display div division docs dos endtask error exceptions file int10h integer intel interrupt interrupts language loop main mmx multiple newbie osdevelopment print program range read remainder string text theory tsr x86





