prt.s
来自「虚拟地址空间基于文件的操作系统」· S 代码 · 共 37 行
S
37 行
.global kernel_print_deal_routine
kernel_print_deal_routine:
pushfl
sti
movl %ds,%edx
pushl %edx
movl $(0x18),%edx
movl %edx,%ds
pushl %ecx
pushl %ebx
cmpl $(0x00),%eax
jne 1f
call kernel_print_string
jmp 3f
1: cmpl $(0x01),%eax
jne 2f
call kernel_print_number
jmp 3f
2: cmpl $(0x02),%eax
jne 3f
call kernel_print
3: cmpl $(0x03),%eax
jne 4f
call set_print_thread_id
4:
popl %eax
popl %eax
popl %eax
movl %eax,%ds
popfl
iret
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?