2128 |
|
|
2129 |
/* |
/* |
2130 |
* void console_cls (void) |
* void console_cls (void) |
2131 |
* BIOS call "INT 10H Function 0Fh" to get current video mode |
* BIOS call "INT 10H Function 09h" to write character and attribute |
2132 |
* Call with %ah = 0x0f |
* Call with %ah = 0x09 |
2133 |
* Returns %al = (video mode) |
* %al = (character) |
2134 |
* %bh = (page number) |
* %bh = (page number) |
2135 |
* BIOS call "INT 10H Function 00h" to set the video mode (clears screen) |
* %bl = (attribute) |
2136 |
* Call with %ah = 0x00 |
* %cx = (number of times) |
|
* %al = (video mode) |
|
2137 |
*/ |
*/ |
2138 |
|
|
2139 |
|
|
2144 |
call EXT_C(prot_to_real) |
call EXT_C(prot_to_real) |
2145 |
.code16 |
.code16 |
2146 |
|
|
2147 |
movb $0xf, %ah |
/* move the cursor to the beginning */ |
2148 |
int $0x10 /* Get Current Video mode */ |
movb $0x02, %ah |
2149 |
xorb %ah, %ah |
xorb %bh, %bh |
2150 |
int $0x10 /* Set Video mode (clears screen) */ |
xorw %dx, %dx |
2151 |
|
int $0x10 |
2152 |
|
|
2153 |
|
/* write spaces to the entire screen */ |
2154 |
|
movw $0x0920, %ax |
2155 |
|
movw $0x07, %bx |
2156 |
|
movw $(80 * 25), %cx |
2157 |
|
int $0x10 |
2158 |
|
|
2159 |
|
/* move back the cursor */ |
2160 |
|
movb $0x02, %ah |
2161 |
|
int $0x10 |
2162 |
|
|
2163 |
DATA32 call EXT_C(real_to_prot) |
DATA32 call EXT_C(real_to_prot) |
2164 |
.code32 |
.code32 |