Uniformized macros: push save all registers, and use only GAS macros, no CPP
This commit is contained in:
11
bios_color.S
11
bios_color.S
@@ -1,6 +1,11 @@
|
||||
/*
|
||||
Write a character N times with given color.
|
||||
|
||||
Expected output: "bc", where:
|
||||
|
||||
- `b` has red foreground, and green background
|
||||
- `c` has the default color (gray on black)
|
||||
|
||||
TODO: is this the only way? How to set the current color for ah = 0E?
|
||||
|
||||
Color codes: https://en.wikipedia.org/wiki/BIOS_color_attributes
|
||||
@@ -23,9 +28,9 @@ int $0x10
|
||||
/*
|
||||
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'.
|
||||
Cursor is not moved by the previous interrupt, so this produces a colored 'a'.
|
||||
*/
|
||||
PUTC($0x62)
|
||||
PUTC($0x63)
|
||||
PUTC $'b
|
||||
PUTC $'c
|
||||
|
||||
hlt
|
||||
|
||||
Reference in New Issue
Block a user