⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 hos2.s

📁 用于汇编领域的,运用于OS的MAIN函数.基于硬件基础的源代码
💻 S
字号:
.code16.globl _start_start:   movw $0x1000, %ax   movw %ax, %ds   movw %ax, %es   call screen_setup   movw $greet, %si   call print   lp: jmp lpscreen_setup:   movw $0xb800, %ax   movw %ax, %es   xorw %di, %di   movw $0x1f20, %ax   movw $0x800, %cx   cld   rep stosw   movb $0x02, %ah   xorw %dx, %dx   xorw %bx, %bx   int $0x10   retprint:   movb (%si), %al   cmpb $0x00, %al   je print_end   movb $0x0e, %ah   xorw %bx, %bx   int $0x10   incw %si   jmp printprint_end:   movb $0x0e, %ah   movb $0x0d, %al   xorw %bx, %bx   int $0x10   movb $0x0a, %al   int $0x10   retgreet:   .asciz "Hello from hos2"

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -