ps2_keyboard.S 304 B

1234567891011121314151617
  1. /* https://github.com/cirosantilli/x86-bare-metal-examples#ps2-keyboard */
  2. #include "common.h"
  3. BEGIN
  4. CLEAR
  5. in $0x60, %al
  6. mov %al, %cl
  7. loop:
  8. /* Store the scancode to al. */
  9. in $0x60, %al
  10. cmp %al, %cl
  11. jz loop
  12. mov %al, %cl
  13. PRINT_HEX <%al>
  14. PRINT_NEWLINE
  15. jmp loop