Message board for the users of flat assembler.
> DOS > The Clear Screen function
StrenoJr 25 Jul 2014, 18:28
I need to create a clear screen function. When I moved 0x0700 (grey color, no character) to 0xB800 it worked.
Then I tried the same function using only BIOS instruction.
mov bh, 0 mov dx, 0 int 0x10
When I moved it to the upper left corner of the screen, the next character written was not in the top left corner but one place to the right.
Like if it was at the [1,0] coords and not at [0,0].
Thanks for reading.
|25 Jul 2014, 18:28||
neville 26 Jul 2014, 03:11
Video mode 3 assumed?
00h isn't "no character", it's the null character.
Probably better to use 20h, the space character.
Note: Mode 3 VRAM segment = B800h, linear RAM = B8000h
BIOS Int 10h - what function? AH=0Eh TTY output?
This function automatically advances the cursor, which might explain your symptoms.
Cursor can be controlled with Int 10h, function AH=02
Use Int 10h, function AH=09 if you want to control the cursor yourself.
FAMOS - the first memory operating system
|26 Jul 2014, 03:11||
StrenoJr 26 Jul 2014, 15:29
It is not a homework.
I know that with the space and null, but null did work too. It is just easier to xor the al register.
I forgot that I used ah=09.
With the function above I just mvoed the cursor to the upper left corner to [0,0]. The problem is that it ended at [1,0].
*Sorry, sometimes I just don't know express myself correctly.
*The link for your OS doesn't work.
|26 Jul 2014, 15:29||
Fixit 26 Jul 2014, 20:23
Here a two ways of clearing the screen.
mov ax,0b800h ; Start at memory 0b800
mov cx,2000 ;
mov ax,0720h ; Black bg, white fg, 20h = space char
|26 Jul 2014, 20:23||
StrenoJr 27 Jul 2014, 16:31
That's a core component!
|27 Jul 2014, 16:31||
< Last Thread | Next Thread >
Copyright © 1999-2023, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.
Website powered by rwasa.