Answer the question
In order to leave comments, you need to log in
TASM, moving procedures to a separate file for COM format
It is required to place the procedures in a separate file. I used to do this only with exe-shniks, I couldn’t draw an analogy with com, I didn’t google anything. Need a working example or error indication. Here is a part of the code:
the main file, l3.asm
extrn ZaprosChisla:near, VyvodVBIN:near, VyvodVHEX:near
code segment public
assume cs:code
org 100h
start:
; тут код
code ends
end start
public ZaprosChisla, VyvodVBIN, VyvodVHEX
code segment public
assume cs:code
ZaprosChisla proc near
;
ZaprosChisla endp
VyvodVBIN proc near
;
VyvodVBIN endp
VyvodVHEX proc near
;
VyvodVHEX endp
code ends
end
tasm\bin\tasm.exe l3.asm /l
tasm\bin\tasm.exe l3p.asm /l
tasm\bin\tlink.exe l3.obj+L3P.OBJ /t
Answer the question
In order to leave comments, you need to log in
I would assume that when linking, the l3p.obj file gets up before l3.obj and therefore the entry point is not at position 100h. Why the linker changes the explicitly specified order of the object modules and how to force it not to do so - I do not know.
My TLINK "with a bang" collects a COM-file from your sources according to your BAT-file.
And if I swap obj for my TLINK, I get an error:
C:\tasm>tlink.exe l3p.obj+L3.OBJ /t
Turbo Link Version 2.0 Copyright (c) 1987, 1988 Borland International
Cannot generate COM file : data below initial CS:IP defined
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question