Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

How to clear BIOS-related info on screen then print message?

everyone! I’m sharpening my assembly low-level skills and made myself a simple bootloader. I now made some routines and the entrypoint and successfully output a message however, I want to clear the screen so in outputting my message, it comes out clean. I’ve tried making a routine which clears the AX register, stores the content of address 0xb800 to BX then copying or MOVing the contents of the AX register.
like this:

vram equ 0xb800

xor ax, ax
mov bx, [vram]
mov bx, ax
int 10h

it successfully clears the screen but I have a problem, as shown on the picture, it stretches the text.
stretched output


Then I searched for some answers. I didn’t found some answers because search results just gives me DOS interrupts to clear the screen.

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

But, I did try using INT 10, AH=07h but I don’t how to use it.

please lend me a hand thank you! 😀

>Solution :

The text gets ‘stretched’ because you setup for a 40-columns screen! You’ve written:

xor ax, ax    <<<< This is video mode 0, so 40x25 16-color text
int 10h

Use

mov  0003h
int  10h

to setup the 80×25 16-color text screen.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading