AR wrote:
Those are most likely GDT Segment Selectors, when you jump to it the offset is whatever it is set to in the GDT Entry.
If it is just a real mode segment change (and I wouldn't know why you'd want to change there) then it's Segment<<4 + Offset, the length of the instruction isn't needed for jumps.
yes it's related to GDT. i saw such codes in a GDT tutorial.
the codes is
; This will set up our new segment registers. We need to do
; something special in order to set CS. We do what is called a
; far jump. A jump that includes a segment as well as an offset.
; This is declared in C as 'extern void gdt_flush();'
global _gdt_flush ; Allows the C code to link to this
extern _gp ; Says that '_gp' is in another file
_gdt_flush:
lgdt [_gp] ; Load the GDT with our '_gp' which is a special pointer
mov ax, 0x10 ; 0x10 is the offset in the GDT to our data segment
mov ds, ax
mov es, ax
mov fs, ax
mov gs, ax
jmp 0x08:flush2 ; 0x08 is the offset to our code segment: Far jump!
flush2:
ret
i could not understand it yet.