I am total beginner to ASM and I am following this tutorial. Code in this example is not working. I am using Linux Mint and both on my 64bit computer and 32bit laptop nasm is displaying same errors:
rad.asm:1: error: attempt to define a local label before any non-local labels
rad.asm:1: error: parser: instruction expected
rad.asm:2: error: attempt to define a local label before any non-local labels
rad.asm:2: error: parser: instruction expected
rad.asm:4: error: attempt to define a local label before any non-local labels
rad.asm:13: error: comma, colon or end of line expected
rad.asm:19: error: parser: instruction expected
This is the code:
.model small
.stack 100h
.data
dexter db "Hello$"
.code
start:
mov ax, @data
mov ds, ax
mov ah, 09h
mov dx, offset dexter
int 21h
mov ah, 4ch
int 21h
end start
I have successfully installed nasm because other "Hello World" examples I can compile successfully using:
nasm -f elf name.asm
ld name.o -o test
./test
Does NASM for Windows compile code different that NASM for Linux?