Page 1 of 1

simple problem

Posted: Sun Feb 15, 2004 5:04 am
by shaz
in the following code i'm trying to jump to realmode label.but bochs quits with following message

Code: Select all

>>PANIC<< iret: return CS selector null
here is buggy code

Code: Select all

.
.
.

lea eax,[realmode]
push eax
pop ebx
mov [offset1],ebx
jmp SYS_CODE_SEL:offset1

hlt

realmode:
.
.
.
offset1:
        dd 0
please tell me whats causing problem and how to remove it as i'm not so good in asm.

Re:simple problem

Posted: Sun Feb 15, 2004 12:50 pm
by Neo
what does this code actually do? i don't think you can issue a jump using

Code: Select all

jmp SYS_CODE_SEL:offset1
it shoud rather be

Code: Select all

jmp SYS_CODE_SEL:[offset1]