clear screen program with c!

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
MANDLA

clear screen program with c!

Post by MANDLA »

VOID ClearScreen(VOID)
{
   asm{
      mov   ax,0x0600                     //full screen
      mov   bh,0x1e                        //set color
      mov   cx,0                           //request scroll
      mov   dx,0x184f
      int   0x10
   }
}
this is my clear screen program. want to read sugestion of all.
User avatar
Pype.Clicker
Member
Member
Posts: 5964
Joined: Wed Oct 18, 2006 2:31 am
Location: In a galaxy, far, far away
Contact:

Re:clear screen program with c!

Post by Pype.Clicker »

you mean beside the fact you'll have hard time using it with another compiler (that might not support the same inline assembly) or not in real mode ?
User avatar
Solar
Member
Member
Posts: 7615
Joined: Thu Nov 16, 2006 12:01 pm
Location: Germany
Contact:

Re:clear screen program with c!

Post by Solar »

Thread misnamed. Your solution is not C.
Every good solution is obvious once you've found it.
distantvoices
Member
Member
Posts: 1600
Joined: Wed Oct 18, 2006 11:59 am
Location: Vienna/Austria
Contact:

Re:clear screen program with c!

Post by distantvoices »

*snip*cause cleared*
... the osdever formerly known as beyond infinity ...
BlueillusionOS iso image
Kemp

Re:clear screen program with c!

Post by Kemp »

So you basically looked at the interrupts list and made what any sensible person would make if they wanted to do it this way? Scrolling everything away is an age-old technique for not having it there anymore.
User avatar
Pype.Clicker
Member
Member
Posts: 5964
Joined: Wed Oct 18, 2006 2:31 am
Location: In a galaxy, far, far away
Contact:

Re:clear screen program with c!

Post by Pype.Clicker »

<feeling like locking this thread>
User avatar
Solar
Member
Member
Posts: 7615
Joined: Thu Nov 16, 2006 12:01 pm
Location: Germany
Contact:

Re:clear screen program with c!

Post by Solar »

Locked. Not too helpful as a thread, and some flamebait that could easily be avided.
Every good solution is obvious once you've found it.
Post Reply