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

2

8

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?

Stelu answered 18/9, 2008 at 23:19 Comment(1)
possible duplicate of How to use real mode BIOS / VESA calls from GRUB?Hebdomad
C
1

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.

Cleghorn answered 25/9, 2008 at 16:43 Comment(0)
B
1

you mean writeport(value,$3c9)?

>mov 03c9,AH
>out value,AL

or similar in INTEL asm(NASM)

3c9 3c8 IIRC are VGA registers.

Baleen answered 20/1, 2013 at 19:25 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.