NASM。错误:操作数1后预期的逗号

时间:2013-10-21 15:03:33

标签: assembly x86 nasm

所以我正在尝试组装它,但是当我尝试时,它会给我错误:操作数1后的逗号

这是代码。

option_screen:
mov ax, os_init_msg     ; Set up the welcome screen
mov bx, os_version_msg
mov cx, 10011111b       ; Colour: white text on light blue
call os_draw_background

mov ax, dialog_string_1     ; Ask if user wants app selector or command-line
mov bx, dialog_string_2
mov dx, 1           ; We want a two-option dialog box (OK or Cancel)
call os_dialog_box

cmp ax, 1           ; If OK (option 0) chosen, start app selector
jne near app_selector

call os_clear_screen        ; Otherwise clean screen and start the CLI
call os_command_line

jmp option_screen       ; Offer menu/CLI choice after CLI has exited


; Data for the above code...

os_init_msg     db 'Welcome to 0x539's OS!', 0
os_version_msg      db 'Version ', OS_VER, 10

dialog_string_1     db 'Thanks for trying out MikeOS!', 0
dialog_string_2     db 'This project is currently in Alpha version.', 0

错误发生在os_init_msg行。 请帮忙!

1 个答案:

答案 0 :(得分:1)

你的字符串中有一个单引号,这使汇编程序认为你输入了字符串'Welcome to 0x539',后跟字符s OS!', 0

请使用双引号作为分隔符:"Welcome to 0x539's OS!", 0