Click to See Complete Forum and Search --> : New to Assembly


zaryk
July 11th, 2008, 09:26 AM
I'm going through some Assembly tutorials and one of them I found to be quite useful

http://www.xs4all.nl/~smit/asm01001.htm

but when I go to compile the first program in the tutorial with NASM it gives me messages

.model small
.stack
.data
message db "Hello world, I'm learning Assembly !!!", "$"

.code

main proc
mov ax,seg message
mov ds,ax

mov ah,09
lea dx,message
int 21h

mov ax,4c00h
int 21h
main endp
end main




1:error: attempt to define a local label before any non-local labels
1: error: parser: instruction expected
2: warning: label alone on a line without a colon might be in errors
2: error: attempt to define a local label before any non-local labels
3: warning: label alone on a line without a colon might be in errors
3: error: attempt to define a local label before any non-local labels
6: warning: label alone on a line without a colon might be in errors
8: error: parser: instruction expected
18: error: symbol `main' redefined
18: error: parser: instruction expected
19: error: parser: instruction expected


Wondering if anyone can help me figure out what these mean, thanks.

BytePtr
July 11th, 2008, 06:51 PM
This assembler tutorial is for Borland TASM and not for NASM.
Well OK, it's the same 16bit for both, but NASM and TASM are different.
If you don't want to download or buy TASM then use search for NASM tutorials.