blackthorn
blackthorn

Reputation:

Grub and getting into Real Mode (low-level assembly language programming)

I've been working on a toy OS and have been using grub as my boot loader. Recently when trying to use VGA I found that I couldn't use hardware interrupts. This I found was because I had been slung into protected mode by grub.

Does anybody know how to get back into real mode without having to get rid of grub?

Upvotes: 8

Views: 1954

Answers (2)

Richard Jasmin
Richard Jasmin

Reputation: 51

you mean writeport(value,$3c9)?

>mov 03c9,AH
>out value,AL

or similar in INTEL asm(NASM)

3c9 3c8 IIRC are VGA registers.

Upvotes: 1

Jonas Engström
Jonas Engström

Reputation: 5065

If you are using GRUB as your boot loader you could use the intcall (as specified in the COMBOOT API) to call BIOS function int 0x10 in your case to access the VESA VBE.

But this will not help if you need to access the VGA hardware registers.

Upvotes: 1

Related Questions