Page 2 of 2
Re:Problem with code running in Bochs
Posted: Sun Jan 19, 2003 2:24 pm
by Slasher
The error is in you BOOT CODE!! ;D
you are using boot_drv without assigning it a value!
try this, add this as the first line after BOOT:
Boot:
mov [boot_drv], byte dl
....
....
Re:Problem with code running in Bochs
Posted: Mon Jan 20, 2003 12:40 am
by beyondsociety
That wasn't the problem.
I fixed the problem though, but now I'm getting this
Code: Select all
00000556577p[CPU ] >>PANIC<< exception(): 3rd (13) exception with no resolution
00000556577i[SYS ] Last time is 1043044870
00000556577i[CPU ] protected mode
00000556577i[CPU ] CS.d_b = 32 bit
00000556577i[CPU ] SS.d_b = 32 bit
00000556577i[CPU ] | EAX=00000010 EBX=00009000 ECX=f017ff55 EDX=00000000
00000556577i[CPU ] | ESP=00100000 EBP=00000000 ESI=00000000 EDI=0000ffe4
00000556577i[CPU ] | IOPL=0 NV UP DI PL NZ NA PO NC
00000556577i[CPU ] | SEG selector base limit G D
00000556577i[CPU ] | SEG sltr(index|ti|rpl) base limit G D
00000556577i[CPU ] | DS:0010( 0002| 0| 0) 00000000 000fffff 1 1
00000556577i[CPU ] | ES:0010( 0002| 0| 0) 00000000 000fffff 1 1
00000556577i[CPU ] | FS:0010( 0002| 0| 0) 00000000 000fffff 1 1
00000556577i[CPU ] | GS:0010( 0002| 0| 0) 00000000 000fffff 1 1
00000556577i[CPU ] | SS:0010( 0002| 0| 0) 00000000 000fffff 1 1
00000556577i[CPU ] | CS:0008( 0001| 0| 0) 00000000 000fffff 1 1
00000556577i[CPU ] | EIP=0000fdae (0000fdae)
00000556577i[CPU ] | CR0=0x60000011 CR1=0x00000000 CR2=0x00000000
00000556577i[CPU ] | CR3=0x00000000 CR4=0x00000000
Re:Problem with code running in Bochs
Posted: Mon Jan 20, 2003 10:23 am
by Whatever5k
Instead of writing:
Code: Select all
char *test_ptr;
test_ptr = "Pride";
you should write:
Remember that your test_ptr is a pointer, it must point to an address (variable)...
Re:Problem with code running in Bochs
Posted: Mon Jan 20, 2003 11:17 am
by beyondsociety
I looked up my error [3rd exception (13) with no resolution] in the intel manuals and this is what it says:
Code: Select all
General Protection exception
13. Loading CR0 with PG=1 and PE=0.
What does this mean and how change I fix this?
Re:Problem with code running in Bochs
Posted: Mon Jan 20, 2003 11:20 am
by Whatever5k
This means that you would have messed up something in register CR0 (needed for enabling Paging)...
I don't think that's the case since you don't use paging, do you?
Re:Problem with code running in Bochs
Posted: Mon Jan 20, 2003 11:26 am
by beyondsociety
No, I don't. What could be the problem. Code is attached below.
Re:Problem with code running in Bochs
Posted: Mon Jan 20, 2003 12:58 pm
by jrfritz
What code did you change to make your bootloader crash?
Re:Problem with code running in Bochs
Posted: Mon Jan 20, 2003 1:01 pm
by beyondsociety
Read function and pmode stack.
If I keep my read function the same, I get a bogus memory error, but if I change it I get a 3rd excep[tion with no resolution.
Weird huh?