bios_color.S 409 B

1234567891011121314151617181920212223
  1. #include "common.h"
  2. BEGIN
  3. /* ID of character to print. */
  4. mov $0x0961, %ax
  5. /* Page, color, */
  6. mov $0x0034, %bx
  7. /* How many times to write.
  8. * If too big, wraps around screen.
  9. */
  10. mov $0x0002, %cx
  11. int $0x10
  12. /* The new color is reused only for character that overwrite the writen region.
  13. *
  14. * Cursor is not moved by the previous interrupt, so this produces a colored 'a'.
  15. */
  16. PUTC $'b
  17. PUTC $'c
  18. PUTC $'d
  19. hlt