bios_scroll.S 501 B

123456789101112131415161718192021222324252627282930
  1. #include "common.h"
  2. BEGIN
  3. CLEAR
  4. PRINT_STRING $stair
  5. /* Function ID. */
  6. mov $0x06, %ah
  7. /* Number. of lines to scroll */
  8. mov $0x01, %al
  9. /* BIOS color attributes.
  10. * Background is the clear color.
  11. * Foreground is set as the new foreground color.
  12. */
  13. mov $0xA4, %bh
  14. /*
  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"