bios_scroll.S 580 B

12345678910111213141516171819202122232425262728293031
  1. /* https://github.com/cirosantilli/x86-bare-metal-examples#bios-scroll */
  2. #include "common.h"
  3. BEGIN
  4. CLEAR
  5. PRINT_STRING $stair
  6. /* Function ID. */
  7. mov $0x06, %ah
  8. /* Number. of lines to scroll */
  9. mov $0x01, %al
  10. /* BIOS color attributes.
  11. * Background is the clear color.
  12. * Foreground is set as the new foreground color.
  13. */
  14. mov $0xA4, %bh
  15. /* CH,CL: row,column upper left corner (00:00)
  16. * TODO what does that mean?
  17. */
  18. mov $0x0101, %cx
  19. /* DH,DL: row,column lower right corner (24:79).
  20. * TODO what does it mean?
  21. */
  22. mov $0x0202, %dx
  23. int $0x10
  24. hlt
  25. stair:
  26. .asciz "a\nb\nc\nd"