📄 input.s
字号:
.global input_port,input_key_board_routine,input_current_time_routine
input_port:
movl 0x04(%esp),%edx
xorl %eax,%eax
inb (%dx),%al
ret
input_key_board_routine:
pushfl
movl %ds,%ebx
pushl %ebx
movl $(0x18),%ebx
movl %ebx,%ds
sti
cmpl $(0x00),%eax
jne 1f
call kernel_get_char
jmp exit_input_key_board
1:
cmpl $(0x01),%eax
jne 2f
call kernel_get_number
jmp exit_input_key_board
2:
exit_input_key_board:
popl %ebx
movl %ebx,%ds
popfl
iret
input_current_time_routine:
movl %ds,%ebx
pushl %ebx
movl $(0x18),%ebx
movl %ebx,%ds
pushl %eax
call copy_current_time
popl %eax
popl %ebx
movl %ebx,%ds
iret
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -