Hello,
I'm using this code to create the stack, and I based the code on the
BrokenThorn OSDev series.
The bochs log is attached.
I haven't used the Bochs logs that much, and I saw this piece of log that repeated some times, what is it, and what is the piece " BxError: Encountered an unknown instruction b1=0xff (signalling #UD)", and what is the 0xff instruction, I think that's the problem.
Code: Select all
00016083944i[CPU0 ] 0x00000000000009f4>> (invalid) : FFFF
00016083944d[CPU0 ] exception(0x06): error_code=0000
00016083944d[CPU0 ] interrupt(): vector = 06, TYPE = 3, EXT = 1
00016083946d[CPU0 ] BxError: Encountered an unknown instruction b1=0xff (signalling #UD)
00016083946d[CPU0 ] modrm was 0xff, nnn was 7, rm was 7
I tried to run the code with the changes from the previous post, but XOR CS, CS doesn't work, and if i first put 0x0000 into AX, and then AX into CS it works (I get no errors from NASM) but then I get an error from VMWare, a kernel stack fault.
When I run it in Bochs I get this log: BochsLog_With_0x0000_in_CS.txt.
And Bochs keeps resetting.
I then disabled the XOR CS, CS so I only changed the ORG instruction, then I get this log: BochsLog_Without_0x0000_in_CS.txt.
I saw that when I exitted Bochs that the CPU was in protected mode, so we came a step further, and I'll try the 'use 16' in front of main:.
The Bochs logs are coming later, because they are so big, I'll post them later tonight.
Thanks.
Program development: Think, think more and think again, then find the solution and code it.
OS development: Don't think, think less and don't think again, then the solution will come, else you're screwed.
Most of the time at OSDev you're screwed.