Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Boot Screen Modification

Status
Not open for further replies.

Rick C. Hodgin

Programmer
Oct 15, 2021
172
US
extra guest said:
From thread272-1807067:

I want to write a .com (windows debug) or nasm-assembly code to add 2 lines to the boot screen, or rewrite the text to be displayed
it is supposed to be written on bios and not a floppy disk. The post sector(load hardware, basic function) will not be modified, only the text on screen. Where will i find an example (with explanation to understand and verify) or documentation about?

In order to change BIOS you need to have a BIOS image. If you have that, you can alter its contents and then flash the BIOS. Note, this is not a normal thing to do and is subject to all kinds of potential issues.

If you want to change just the boot sector so it displays a different message, then know that too might be difficult. The boot sector is 512 bytes, and it typically is crammed pack full with the code needed just to get the system up and running. There isn't typically much room for adding any code. You could find out where the boot sector's display message is, tweak that, and re-write it. That's a common thing to do, especially for OS authors who are testing their OS.

I needed to debug my OS boot process, so I modified my boot sector to load a 64 KB disassembler, and a 64 KB BIOS-based text-mode debugger at startup, called its equivalent of a main() function for it to hook into the interrupts it needed, and then issued INT 3 to cause it to single-step into my code. I was then able to debug the boot sector code with a real debugger that was very similar in appearance to CodeView 3.x. It was based on my 32-bit kernel debugger called Debi (which was graphical, see a video of it in operation here, use VLC if you can't view it).

Because it was written entirely in 80386 assembly, and because real-mode allows execution of 386-based opcodes, it didn't take very much to port it to text and make it a real-mode program as it was small and fit within a single 64 KB segment with room to spare.

It's possible to do the things you seek. They are tricky and hacky. It's not something to do lightly.

--
Rick C. Hodgin
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top