0
我剛剛開始學習彙編語言編程前幾天。現在,我在將asm
文件組裝成exe
時遇到問題。我使用NASM作爲我的彙編程序。這是我用來組裝它的命令:將ASM文件組裝到EXE中
nasm file.asm -o file.com or exe
這裏是我的代碼:
.model small
.data
.code
start:
mov ax,@data
mov ds,ax
mov ax,00h
mov bx,33h
mov ah,4ch
int 21h
end start
...但我得到這些錯誤:
boss.asm:1: error: attempt to define a local label before any non-local labels
boss.asm:1: error: parser: instruction expected
boss.asm:2: error: attempt to define a local label before any non-local labels
boss.asm:3: error: attempt to define a local label before any non-local labels
boss.asm:13: error: parser: instruction expected
我不明白這些錯誤意味着什麼。我如何解決這些錯誤?
嗯,這意味着你的代碼有錯誤。 – 2011-06-04 20:38:51
您如何期待任何人在沒有任何代碼的情況下幫助您?我們無法從這裏閱讀您的想法(或您的顯示器),而這正是根據所提供的信息來幫助您的。 – 2011-06-04 20:41:54
完成後,我添加了代碼 – BOSS 2011-06-04 20:55:43