mov ah, 0x00 ; Select 'Blocking read character' function
int 0x16 ; Keyboard services interrupt
mov <ascii_char>, al ; AL contains the character read
mov <scan_code>, ah ; AH contains the BIOS scan code
boot.s
.code16
.global init
init:
mov $0, %ah
int $0x16
mov $0x0e, %ah
int $0x10
jmp init
.=510
.byte 0x55
.byte 0xaa
参考
https://www.jianshu.com/p/b2c1d296a8a9
https://riptutorial.com/x86/example/23463/bios-calls
网友评论