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.

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


mov  0003h
int  10h

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

Leave a Reply