當我使用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