Page 1 of 1

Crash on bios interrupt

Posted: Mon Dec 29, 2014 2:49 pm
by 5830
Hello,
I'm currently trying to slowly expand the "Meaty Skeleton" (from the Wiki tutorials).
I've started with memory management/detecting the memory.
The wiki suggests using

Code: Select all

int 0x12
or

Code: Select all

int 0x15
for doing so.

Unafortunately everytime int 0x12 or int 0x15 is called from my code (inline and from external .s [but shouldn't really matter here, I guess]) QEMU reboots presenting me with the Grub screen again.

I've already searched the forums but most of the times I just found threads about problems with self-registered interrupt handlers.

I hope my question is not too stupid and thanks in advance for helping me :)

Re: Crash on bios interrupt

Posted: Mon Dec 29, 2014 2:58 pm
by no92
We need some more information - are you running real/protected/long mode? Do you have a GDT or an IDT? You'll have to provide more information.

Debugging is a required skill in programming, especially at OSdeving. Without it, you'll be lost. Learn it. If you have a question you tried to figure out for > 1 day, then you may consider asking it here. This board is not for questions you did not even attempt to solve by yourself or have spent only about 2 minutes with trying to figure out what the issue is.

Sorry if it sounds harsh :D

Re: Crash on bios interrupt

Posted: Mon Dec 29, 2014 3:13 pm
by iansjack
You are in Protected Mode. You can't use BIOS interrupts.

Re: Crash on bios interrupt

Posted: Mon Dec 29, 2014 3:24 pm
by 5830
Thank you. I just assumed the kernel would be booted in Real Mode by default. :oops:

Re: Crash on bios interrupt

Posted: Mon Dec 29, 2014 3:34 pm
by iansjack
The Multiboot specification does include information about memory, somyou don't need to use the BIoS to get this information. If you are going to experiment with it you should probably read the specification.