Page 1 of 1

Clear Screen

Posted: Sun Aug 23, 2009 7:30 am
by Nathan
Hello,
I'm starting on Assembly and i want to know how i can clear the screen in Assembly, because of my OS. When i run it in Bochs, that boot messages are there and i want to clear they, for a better visual of my OS.

Thanks,
Nathan Paulino Campos

Re: Clear Screen

Posted: Sun Aug 23, 2009 9:14 am
by Coty
Well actually this question would'nt go here, it would go in General Programming, but you could google it and you would find your self here http://answers.yahoo.com/question/index ... 346AA8GxM4

How to clearing the screen should not be put in OS Development, for it is barely OS related.

Re: Clear Screen

Posted: Sun Aug 23, 2009 9:18 am
by Nathan
Thanks, it's not for OS development, but it's a good training.
I don't know if i can post this here, but here is a board that i've created, for Assembly, if you want register there, i need to start.

http://assembly.s2.bizhat.com/
Thanks!

Re: Clear Screen

Posted: Sun Aug 23, 2009 11:28 am
by Brendan
Hi,
Nathan wrote: I'm starting on Assembly and i want to know how i can clear the screen in Assembly, because of my OS. When i run it in Bochs, that boot messages are there and i want to clear they, for a better visual of my OS.
For real mode boot code, probably the best way is to use the BIOS function for scrolling text (e.g. scroll everything on the screen off the screen), or simply setting the video mode again using the BIOS function for setting a video mode.

Scrolling everything off the screen is faster. However, if you want to clear the screen during boot (before you display anything) then it's probably a good idea to also make sure you're using the video mode that you think you're using (rather than assuming the BIOS left you in 80*25 text mode, and being wrong in some cases).


Cheers,

Brendan

Re: Clear Screen

Posted: Sun Aug 23, 2009 11:41 am
by Nathan
Ok, i'm going to try!

Re: Clear Screen

Posted: Sun Aug 23, 2009 2:09 pm
by Nathan
With all this resources and i can't do this work!

Re: Clear Screen

Posted: Sun Aug 23, 2009 5:01 pm
by neon
Hello,

INT 0x10 function 6

This can be used to clear the screen. bh should be 0x07 for black background, white text, cx should be 0 (top left corner) dh/dl is the bottom right corner (79,24). Everything else should be pretty easy.

If you cannot get something to work, don't post that it doesn't work - post information and what you are trying to do.

Re: Clear Screen

Posted: Sun Aug 23, 2009 7:04 pm
by Nathan
I'm going to read it!
Any problem i post here, ok!
Thanks!