Reputation: 3
So I'm trying to assemble this, but when I try, it gives me error: comma expected after operand 1
Here is the code.
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
The error occurs at the os_init_msg
line.
Please help!
Upvotes: 0
Views: 5992
Reputation: 58427
You've got a single quote inside your string, which makes the assembler think you've entered the string 'Welcome to 0x539'
, followed by the characters s OS!', 0
.
Use double quotes as delimiters instead: "Welcome to 0x539's OS!", 0
.
Upvotes: 1