您好,我对组装非常陌生(今天才开始),并且在完全按照本教程中所说的操作时遇到了这个问题。我用这个文本制作了一个 asm 文件:
bits 16
org 0x7c00
jmp Main
:In= si = string, ah = 0eh, al = char, Out= character screen
Print:
lodsb
cmp al, 0
je Done
mov ah, 0eh
int 10h
jmp Print
Done:
ret
Main
mov si, msg
call Print
cls
hlt
msg db "Hello World",0
times 510 - ($-$$) db 0
dw 0xAA55
在我的带有 asm 文件的文件夹中,我有一个 nasm 和 nasmpath 的副本,我还有一个 bochs 的快捷方式。我想要做的是将其转换为 bin 文件。当我输入这个命令时:
nasm -f bin boot.asm -o boot.bin
我收到这个错误
boot.asm:5: error: label or instruction expected at the start of line
我想知道这是一个糟糕的教程还是我输入错误。我也想知道“标签或说明”是什么意思。