I am on Windows XP SP2, I got TASM and TLINK from the borland website.
OK so I have the following code, that i took from a tutorial ( ):
%OUT-------------------------------------------------------------------------
%OUT- Written by Ferdi Smit for use with the "ASM Tutorial Part 1" -
%OUT-------------------------------------------------------------------------
; To compile: TASM examp1.asm -
; TLINK examp1.obj -
;----------------------------------------------------------------------------
.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
Then I assemble it, and it all goes wrong:
>TASM examp1.asm
TASM Assembler. Version 3.1 February, 1998.
Copyright (C) 1998 Squak Valley Software
tasm: pass 1 complete.
HWCons.asm line 0001: Label or instruction too long. (%OUT-------------------------------------------------------------------------
)
HWCons.asm line 0001: unrecognized directive. (%OUT----------------------------)
HWCons.asm line 0002: unrecognized directive. (%OUT-)
HWCons.asm line 0003: Label or instruction too long. (%OUT-------------------------------------------------------------------------
)
HWCons.asm line 0003: unrecognized directive. (%OUT----------------------------)
HWCons.asm line 0007: unrecognized directive. (.MODEL)
HWCons.asm line 0008: unrecognized directive. (.STACK)
HWCons.asm line 0009: unrecognized directive. (.DATA)
HWCons.asm line 0010: Label not found: (message)
HWCons.asm line 0010: label value misalligned. (message)
HWCons.asm line 0010: unrecognized instruction. (message)
HWCons.asm line 0012: unrecognized directive. (.CODE)
HWCons.asm line 0014: Label not found: (main)
HWCons.asm line 0014: label value misalligned. (main)
HWCons.asm line 0014: unrecognized instruction. (main)
HWCons.asm line 0015: unrecognized instruction. (MOV)
HWCons.asm line 0016: unrecognized instruction. (MOV)
HWCons.asm line 0018: unrecognized instruction. (MOV)
HWCons.asm line 0019: unrecognized instruction. (LEA)
HWCons.asm line 0020: unrecognized instruction. (INT)
HWCons.asm line 0022: unrecognized instruction. (MOV)
HWCons.asm line 0023: unrecognized instruction. (INT)
HWCons.asm line 0024: Label not found: (main)
HWCons.asm line 0024: label value misalligned. (main)
HWCons.asm line 0024: unrecognized instruction. (main)
HWCons.asm line 0025: Label not found: (end)
HWCons.asm line 0025: label value misalligned. (end)
HWCons.asm line 0025: unrecognized instruction. (end)
tasm: line 0025 No END directive before EOF.
tasm: pass 2 complete.
tasm: Number of errors = 29
>TLINK examp1.asm
Turbo Link Version 3.01 Copyright (c) 1987, 1990 Borland International
Bad object file hwcons.obj
What Am I doing wrong here??? - I did exactally what the tutorial told me to do.
OK so I have the following code, that i took from a tutorial ( ):
%OUT-------------------------------------------------------------------------
%OUT- Written by Ferdi Smit for use with the "ASM Tutorial Part 1" -
%OUT-------------------------------------------------------------------------
; To compile: TASM examp1.asm -
; TLINK examp1.obj -
;----------------------------------------------------------------------------
.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
Then I assemble it, and it all goes wrong:
>TASM examp1.asm
TASM Assembler. Version 3.1 February, 1998.
Copyright (C) 1998 Squak Valley Software
tasm: pass 1 complete.
HWCons.asm line 0001: Label or instruction too long. (%OUT-------------------------------------------------------------------------
)
HWCons.asm line 0001: unrecognized directive. (%OUT----------------------------)
HWCons.asm line 0002: unrecognized directive. (%OUT-)
HWCons.asm line 0003: Label or instruction too long. (%OUT-------------------------------------------------------------------------
)
HWCons.asm line 0003: unrecognized directive. (%OUT----------------------------)
HWCons.asm line 0007: unrecognized directive. (.MODEL)
HWCons.asm line 0008: unrecognized directive. (.STACK)
HWCons.asm line 0009: unrecognized directive. (.DATA)
HWCons.asm line 0010: Label not found: (message)
HWCons.asm line 0010: label value misalligned. (message)
HWCons.asm line 0010: unrecognized instruction. (message)
HWCons.asm line 0012: unrecognized directive. (.CODE)
HWCons.asm line 0014: Label not found: (main)
HWCons.asm line 0014: label value misalligned. (main)
HWCons.asm line 0014: unrecognized instruction. (main)
HWCons.asm line 0015: unrecognized instruction. (MOV)
HWCons.asm line 0016: unrecognized instruction. (MOV)
HWCons.asm line 0018: unrecognized instruction. (MOV)
HWCons.asm line 0019: unrecognized instruction. (LEA)
HWCons.asm line 0020: unrecognized instruction. (INT)
HWCons.asm line 0022: unrecognized instruction. (MOV)
HWCons.asm line 0023: unrecognized instruction. (INT)
HWCons.asm line 0024: Label not found: (main)
HWCons.asm line 0024: label value misalligned. (main)
HWCons.asm line 0024: unrecognized instruction. (main)
HWCons.asm line 0025: Label not found: (end)
HWCons.asm line 0025: label value misalligned. (end)
HWCons.asm line 0025: unrecognized instruction. (end)
tasm: line 0025 No END directive before EOF.
tasm: pass 2 complete.
tasm: Number of errors = 29
>TLINK examp1.asm
Turbo Link Version 3.01 Copyright (c) 1987, 1990 Borland International
Bad object file hwcons.obj
What Am I doing wrong here??? - I did exactally what the tutorial told me to do.