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
Clear Screen
Re: Clear Screen
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.
How to clearing the screen should not be put in OS Development, for it is barely OS related.
My hero, is Mel.
Re: Clear Screen
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!
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
Hi,
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
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.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.
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
For all things; perfection is, and will always remain, impossible to achieve in practice. However; by striving for perfection we create things that are as perfect as practically possible. Let the pursuit of perfection be our guide.
Re: Clear Screen
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.
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.
OS Development Series | Wiki | os | ncc
char c[2]={"\x90\xC3"};int main(){void(*f)()=(void(__cdecl*)(void))(void*)&c;f();}
char c[2]={"\x90\xC3"};int main(){void(*f)()=(void(__cdecl*)(void))(void*)&c;f();}