编译器:nasm编译器
结果:程序能通过编译,目标文件却只有一个字符: 00
代码:
org 7c00h
mov ax,cs
mov ds,ax
mov es,ax
call DispStr
jmp $
DispStr:
mov ax, msgstr
mov bp,ax
mov cx,12
mov ax,01301h
mov bx,000ch
mov dl,0
int 10h
ret
msgstr: db "hello my os!"
time 510-($-$$) db 0
dw 0x55AA
------解决方案--------------------------------------------------------
time改为times,最后定义改为 dw 0xaa55.