I wrote a small program that prints on the screen whatever's in AX. I tested a stand-alone version of it, that works. But now I'd like to compile it in an external obj file, along with other basic subroutines that I will eventually write (I'm only beginning in assembly, and I don't like using pre-chewed stuff, so I write my own routines).
I tried all kinds of way of compiling the subroutine file and the main file, but none worked. I have both TASM and MASM, but my ML version doesn't work (someone ever heard of the "z2: unrecognised option name" error?) Here's what I have:
;this is my subroutine file, that only contains the PRINTHEX procedure
public outputstr,printhex ;outputstr is the output of
CodeSEG segment public ;I,m not too sure if this is
assume cs:CodeSEG, ds:CSEG
hexdigits db "0123456789ABCDEF"
outputstr db "0000h$"
printhex proc near ;this is the only procedure
;in the file.
so, I have one procedure , with it's code & data in the same segment.
I want to be able to call printhex and access outputstr from a test program, which could look like this:
org 100h ;I just want a small COM file
entry: jmp testmain
testmain proc near
mov AX,0123h ;just for testing
now, what? I want to keep things small, so just a small COM file is what I want.
some thing I tried was this:
d: estsTASM printhex.asm
d: estsTASM printhex.obj testmain.asm
-still nothing, I now have a testmain.obj file that Should
-contain the complete program, but I don't know for sure
d: estsTLINK testmain.obj /t
-"Invalid entry point for COM file"
Any help/advice is very welcome.