Technical Notes Database
TN4040C.txt TA - CREATING A .COM FILE TLINK /V
Category :Pascal
Platform :All
Product :TD 1.x 2.0
Description:
Q. How do I create a .COM file from my .ASM file? Whenever
I try to create the .COM with TLINK /t I always get the
message invalid entry point. I can create the .COM file
with EXE2BIN.
A. In order to create a .COM file with TLINK /t you must
specify an entry point at offset 100h in the file with
both the ORG and END directives. The following code
fragment demonstrates the required conditions. Also, a
.COM file may not exceed 64K in size, may not have any
segment-relative fixups, may not define a stack segment,
and must have a starting address equal to 0:100h. When an
extension other than .COM is used for the executable file
(.BIN, for example),the starting address may be either 0:0
or 0:100h.
.model tiny
.code
ORG 100H
start: ;this will be the entry point at 100H
.
.
.
END start ;specify the entry point with END
or
mycode SEGMENT 'CODE'
assume cs:mycode,ds:mycode,ss:mycode
ORG 100H
start:
.
.
.
mycode ends
end start
Reference:
7/2/98 10:45:33 AM
Last Modified: 01-SEP-99