Triple fault when jumping to p-mode

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.
zhak
Member
Member
Posts: 25
Joined: Wed Jul 30, 2008 10:25 am

Re: Triple fault when jumping to p-mode

Post by zhak »

so, i changed code base from 1000h:0 to 0:8000h and executed the code under Bochs in debug mode. it works fine. '+' character is displayed on the screen and then jmp $ stuns the system. but in Bochs (not debug mode) the same problem is present - infinite reboot. maybe it's smth with Bochs??? research on the subj is in progress....
zhak
Member
Member
Posts: 25
Joined: Wed Jul 30, 2008 10:25 am

Re: Triple fault when jumping to p-mode

Post by zhak »

DAMN!!! I GOT IT!!!

Code: Select all

pmode:
    mov ax, 10h
    mov gs, ax
    mov fs, ax
    mov byte [gs:0B8000h], '+'
    sti                ;<<<<<< that is the problem!!!!!
    jmp $
interrupts should not be enabled because IDT is not set up correctly, yet!

such a stupid mistake. sorry that I have bothered all of you :oops:
Post Reply