Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to call Windows libraries that will live on the hard disk from a program that lives in the BIOS?

Tags:

assembly

bios

I'm trying to write a program that will be a BIOS option (after POST). I'd like the application to have a nice GUI instead of being text based (there are multiple reasons for this, localization being one of them).

My problem is that we are constrained by the size of the application that we can flash to the BIOS.

Is it possible using MASM32 to "Link" to the dll's on the hard disk so that we can use the Windows API's to develop the GUI?

Or is there an API that is availible to us to create the GUI that can be linked into the final executable? (60K size constraint on the final program executable)

Any help you can give would be greatly appreciated, thanks in advance.

like image 889
Anit Nosrac Avatar asked Feb 16 '10 09:02

Anit Nosrac


1 Answers

It is possible. All you'd have to do is:

  • set the processor into protected mode and map memory as expected (flat model)
  • develop a filesystem driver and load that
  • support all the possible video cards, mice, monitors, keyboards, etc. including potentially legacy hardware
  • set up the execution environment so that all external references of the requested DLL are present, including (for Windows) KERNEL32, GDI, etc.

There's a lot to this, and it's not easy. However, an example which comes close is MenuetOS, an impressively compact environment. But it completely is born from a complete rethinking of how to implement a GUI environment.


I've written BIOS code which simulates a GUI interface. The video card is kept in text mode, the font is made nicer looking, the text cell separators are turned off, and the mouse is recognized. With simple animation, the whole thing did fit into 60 KiB or so.

like image 134
wallyk Avatar answered Sep 23 '22 15:09

wallyk