ASM beginner gets 24 compiler errors on hello world...
Hey guys. I've wanted to learn ASM for a while and every time I try, I always get flooded with tons and tons of errors, no matter whose code I use. I have downloaded TASM 3.1 and I am currently following the tutorial located here:
http://www.xs4all.nl/~smit/asm01001.htm#firstprg
I have basically recopied the whole source code SciTE, a code editor, and tried compiling with both "tasm test.asm" and "tasm -b test.asm" but it returns many many many errors that I have no clue how to fix. Could someone indicate me how in hell it cannot understand a single symbol inside the code ?
Here's the code:
Code:
.model small
.stack
.data
message db "Hello world", "$"
.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
And here's the junk it outputs:
Quote:
TASM Assembler. Version 3.1 February, 1998.
Copyright (C) 1998 Squak Valley Software
tasm: pass 1 complete.
projects/test.asm line 0001: unrecognized directive. (.MODEL)
projects/test.asm line 0002: unrecognized directive. (.STACK)
projects/test.asm line 0003: unrecognized directive. (.DATA)
projects/test.asm line 0004: Label not found: (message)
projects/test.asm line 0004: label value misalligned. (message)
projects/test.asm line 0004: unrecognized instruction. (message)
projects/test.asm line 0006: unrecognized directive. (.CODE)
projects/test.asm line 0008: Label not found: (main)
projects/test.asm line 0008: label value misalligned. (main)
projects/test.asm line 0008: unrecognized instruction. (main)
projects/test.asm line 0009: unrecognized instruction. (MOV)
projects/test.asm line 0010: unrecognized instruction. (MOV)
projects/test.asm line 0012: unrecognized instruction. (MOV)
projects/test.asm line 0013: unrecognized instruction. (LEA)
projects/test.asm line 0014: unrecognized instruction. (INT)
projects/test.asm line 0016: unrecognized instruction. (MOV)
projects/test.asm line 0017: unrecognized instruction. (INT)
projects/test.asm line 0018: Label not found: (main)
projects/test.asm line 0018: label value misalligned. (main)
projects/test.asm line 0018: unrecognized instruction. (main)
projects/test.asm line 0019: Label not found: (end)
projects/test.asm line 0019: label value misalligned. (end)
projects/test.asm line 0019: unrecognized instruction. (end)
tasm: line 0019 No END directive before EOF.
tasm: pass 2 complete.
tasm: Number of errors = 24
Can anyone please help me ? I'd be very grateful !
Thanks.