+; waiting for keypress
+; x86 has 2 special instructions to read/write from I/O
+; devices: in and out (because some processors have different
+; address spaces for devices and for memory, arm not)
+.key_wait:
+ in al, 64h ; 60h = keyb data port, 64h = keyb status port
+ and al, 1 ; 1 = OUTBUF_FULL = the keyb controller out buf is full
+ jz .key_wait
+
+ in al, 60h ; reads the keyb that was pressed to reset the flag
+