Crash on bios interrupt

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.
Post Reply
5830
Posts: 2
Joined: Mon Dec 29, 2014 2:42 pm

Crash on bios interrupt

Post 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 :)
no92
Member
Member
Posts: 307
Joined: Wed Oct 30, 2013 1:57 pm
Libera.chat IRC: no92
Location: Germany
Contact:

Re: Crash on bios interrupt

Post 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
User avatar
iansjack
Member
Member
Posts: 4707
Joined: Sat Mar 31, 2012 3:07 am
Location: Chichester, UK

Re: Crash on bios interrupt

Post by iansjack »

You are in Protected Mode. You can't use BIOS interrupts.
5830
Posts: 2
Joined: Mon Dec 29, 2014 2:42 pm

Re: Crash on bios interrupt

Post by 5830 »

Thank you. I just assumed the kernel would be booted in Real Mode by default. :oops:
User avatar
iansjack
Member
Member
Posts: 4707
Joined: Sat Mar 31, 2012 3:07 am
Location: Chichester, UK

Re: Crash on bios interrupt

Post 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.
Post Reply