Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

TASM & TLINK not working - what am i doing wrong?

Status
Not open for further replies.

leben2

Programmer
Aug 1, 2006
3
0
0
GB
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.
 
Noticing the copyright blurb this is NOT Borland's TASM but a rip off. Try getting Borland's TASM or one of the other major assemblers and it should work with a little teaking. I assembled it just fine with Borland TASM 5.0 as is. You also might want to inform Borland where you got this very flawed infringement on their trademark.

This is what the copyright blurb should look like:
C:\Documents and Settings\Dave>tasm
Turbo Assembler Version 4.1 Copyright (c) 1988, 1996 Borland International

The simplest solution is the best!
 
> TASM examp1.asm
TASM Assembler. Version 3.1 February, 1998.
Copyright (C) 1998 Squak Valley Software

> TLINK examp1.asm
Turbo Link Version 3.01 Copyright (c) 1987, 1990 Borland International

Looks like you've got two programs installed called TASM, and it's getting the wrong one because it's earlier on in your PATH. TLINK being unique means you're getting the correct version of that program.

At a console prompt, type [tt]PATH[/tt] and you should see both directories where a TASM can be found on your system.

--
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top