1
votes

I'm searching for information about managing BIOS settings through C++. I am unfamiliar with low level programming. I tried to make a research, but my lack of knowledge in low level programming terminology terminated my progress.

I need to draw pixels on the screen, change to text mode or video mode and so on. Is it possible to do it with a C++ program?

Can someone give me some information which can guide me through the process?

1
This appears to be too broad because a correct answer could fill a book.Tim Seguine
So there is no simple way in which i can set the screen color to red and write a sentence in the center, using BIOS functions?Alexander Demerdzhiev
What is the platform? What will start the program execution?galinette
@AlexanderDemerdzhiev I think you would be better off asking how to do specifically what you want to do rather than asking for general advice ("and so on"). Although I am still tempted to downvote as "does not show any research effort"Tim Seguine
@AlexanderDemerdzhiev edit your question with that information along with what research you have done.Tim Seguine

1 Answers

4
votes

You question in fact has many subquestion :

  • do you need some kind of a boot loader ? definitively no
  • can you do that with standard portable C++ ? obviously no(*)
  • can you do that from a C++ program ? yes
  • what are the BIOS functions to change video mode ... BIOS interrupt call on wikipedia will give you the answer or at least an entry point
  • how to call that from a C++ program ? _asm keyword is your friend. It you use Windows and a MS compiler, _asm page on MSDN will give you examples.

It will look like :

_asm {
    mov ah, sub_function
    mov al, parameter
    int bios_function
}

(*) standard portable C++ is independant of platform and implementation. As soon as you use BIOS call you are tight to a platform.