simple problem

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
shaz

simple problem

Post 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.
User avatar
Neo
Member
Member
Posts: 842
Joined: Wed Oct 18, 2006 9:01 am

Re:simple problem

Post 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]
Only Human
Post Reply