2018-12-04 09:46:27 +00:00
/* https://github.com/cirosantilli/x86-bare-metal-examples#bios-clear-screen */
2015-09-18 11:35:08 +02:00
# include " c o m m o n . h "
BEGIN
2018-05-06 14:33:33 +01:00
/ * Print o n e ' a ' c h a r t o e n s u r e t h a t s o m e t h i n g w i l l b e c l e a r e d .
*
* On s o m e s y s t e m s , B I O S m e s s a g e s g e t a u t o m a t i c a l l y c l e a r e d . N o t t h e c a s e f o r Q E M U 2 . 0 . 0 .
* * /
2015-10-21 15:55:27 +02:00
PUTC $ ' a
2015-09-20 10:59:36 +02:00
2015-09-20 12:16:43 +02:00
/* Scroll 0 is magic, and scrolls the entire selected rectangle. */
2015-09-20 10:59:36 +02:00
mov $ 0 x06 0 0 , % a x
mov $ 0 x A 4 , % b h
2018-05-06 14:33:33 +01:00
/ * Pick t h e e n t i r e s c r e e n .
* Bottom r i g h t i s a t ( 2 4 ,7 9 ) = = ( 0 x18 ,0 x4 F ) ,
* since w e a r e o n t h e d e f a u l t m o d e .
* /
2015-09-20 10:59:36 +02:00
mov $ 0 x00 0 0 , % c x
mov $ 0 X 1 8 4 F , % d x
2015-09-18 11:35:08 +02:00
int $ 0 x10
2018-05-06 14:33:33 +01:00
/ * Print a ' b ' c h a r t o s e e w h e r e w e a r e n o w .
*
* TODO, o n T h i n k P a d T 4 0 0 , t h e c u r s o r g e t s p u t b a c k t o t h e i n i t i a l p o s i t i o n . B u t Q E M U 2 . 0 . 0 l e a v e s i t i n t h e m i d d l e o f t h e s c r e e n . T h u s w e r e s e t t h e p o s i t i o n t o m a k e t h e m w o r k t h e s a m e w a y .
* /
2015-10-21 15:55:27 +02:00
CURSOR_ P O S I T I O N
PUTC $ ' b
2015-09-20 10:59:36 +02:00
2015-09-18 11:35:08 +02:00
hlt