Problem with code running in Bochs
Re:Problem with code running in Bochs
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
....
....
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
That wasn't the problem.
I fixed the problem though, but now I'm getting this
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
Instead of writing:
you should write:
Remember that your test_ptr is a pointer, it must point to an address (variable)...
Code: Select all
char *test_ptr;
test_ptr = "Pride";
Code: Select all
char test_ptr[] = "Pride";
Re:Problem with code running in Bochs
I looked up my error [3rd exception (13) with no resolution] in the intel manuals and this is what it says:
What does this mean and how change I fix this?
Code: Select all
General Protection exception
13. Loading CR0 with PG=1 and PE=0.
Re:Problem with code running in Bochs
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?
I don't think that's the case since you don't use paging, do you?
Re:Problem with code running in Bochs
No, I don't. What could be the problem. Code is attached below.
Re:Problem with code running in Bochs
What code did you change to make your bootloader crash?
Re:Problem with code running in Bochs
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?
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?