0
votes

I have the following code:

    %include "io.inc"

section .data
msg db 'Hello World...$'

section .text
global CMAIN
CMAIN:
    ;write your code here

     mov ah,09
     mov dx,OFFSET msg
     int 21h
     xor eax, eax
     xor dx,dx
     ret

and it gets the next error:

[19:28:32] Warning! Errors have occurred in the build: C:/Users/user/AppData/Local/Temp/SASM/program.asm:12: error: comma, colon, decorator or end of line expected after operand gcc.exe: error: C:/Users/user/AppData/Local/Temp/SASM/program.o: No such file or directory

What is the problem? i'm using sasm ide.

1

1 Answers

3
votes

This is TASM/MASM syntax:

mov dx,OFFSET msg

When using NASM you'd simply write:

mov dx,msg