当我使用OS时,如何在FASM中显示字符串。 我能做到这一点(显示“8”字):FASM操作系统
mov ax, 9ch
mov ss, ax
mov sp, 4096d
mov ax, 7c0h
mov ds, ax
;---- actual code:
mov ah, 0eh
mov al, 38h
int 10h
jmp $
;----
times 510 - ($-$$) db 0
dw 0xAA55
但这并不工作(我得到黑屏):
mov ax, 9ch
mov ss, ax
mov sp, 4096d
mov ax, 7c0h
mov ds, ax
;----
mov ah, 09h
mov dx, text
text:
db 'Hello$'
int 10h
jmp $
;----
times 510 - ($-$$) db 0
dw 0xAA55
请告诉我,我究竟做错了什么,以及如何我应该这样做吗?
的[打印在NASM一些可能重复 - 建设x86 Bootsector](http://stackoverflow.com/questions/30764183/print-a-number-in-nasm-building-an-x86-bootsector) – 2015-06-16 23:10:52
GAS hello world版本:http://stackoverflow.com/questions/ 32508919 /如何对生产-A-最小-BIOS问候世界-boot-sector-with-gcc-that-works-from-a和一个存储库,其中包含工作示例:https://github.com/cirosantilli/x86-bare-metal-examples – 2015-09-11 09:11:42