2018-12-04 09:46:27 +00:00
|
|
|
/* https://github.com/cirosantilli/x86-bare-metal-examples#bios-color */
|
|
|
|
|
|
2015-09-20 10:59:36 +02:00
|
|
|
#include "common.h"
|
|
|
|
|
BEGIN
|
|
|
|
|
|
2018-05-06 14:33:33 +01:00
|
|
|
/* ID of character to print. */
|
2015-09-20 10:59:36 +02:00
|
|
|
mov $0x0961, %ax
|
|
|
|
|
/* Page, color, */
|
|
|
|
|
mov $0x0034, %bx
|
2018-05-06 14:33:33 +01:00
|
|
|
/* How many times to write.
|
|
|
|
|
* If too big, wraps around screen.
|
|
|
|
|
*/
|
|
|
|
|
mov $0x0002, %cx
|
2015-09-20 10:59:36 +02:00
|
|
|
int $0x10
|
|
|
|
|
|
2018-05-06 14:33:33 +01:00
|
|
|
/* The new color is reused only for character that overwrite the writen region.
|
|
|
|
|
*
|
|
|
|
|
* Cursor is not moved by the previous interrupt, so this produces a colored 'a'.
|
|
|
|
|
*/
|
2015-10-21 15:55:27 +02:00
|
|
|
PUTC $'b
|
|
|
|
|
PUTC $'c
|
2018-05-06 14:33:33 +01:00
|
|
|
PUTC $'d
|
2015-09-20 10:59:36 +02:00
|
|
|
|
|
|
|
|
hlt
|