🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.msdos.programmer
Article #4574

TCC -S then using TASM and TLINK

#4574
From: Brian K. W. Hook
Date: Thu, 07 Feb 1991 13:39
45 lines
2404 bytes
Lately I have been messing around with some stuff using TCC -S to make .ASM
output, then using TASM, TLINK, EXE2BIN, then REN file.BIN file.EXE....in
that order.  However....

I wrote a real simple program in inline assembly that saves your cursor
size, turns off the cursor (via setting the size to zero), swaps pages
to a blank page (arbitrarily it is page 2), then waits for a key to be
pressed...when a key is pressed, the cursor is turned back on and the page
swapped back to 0.

After I compiled this program using TCC -f- -mt -lt to produce a COM file
it came out to ~3000 bytes.  Next I did TCC -f- -mt -S, TASM OFF.ASM, then
TLINK OFF.ASM.  This resulted in an .EXE file of about 549 bytes.  I
then ran it through EXE2BIN, renamed the BIN file, then had a 37 byte
.COM file that WORKED!  Not bad for not really knowing 80x86 asm!

Anyway, after I had this wonderful experience using C as a shell of sorts
around assembly (let the C compiler do setup and clean up), I tried
converting an old program of mine, NMORE.C, that replaces the DOS MORE.COM
file.  The only difference is that it can page up a file and you use it
directly (NMORE FILE.TXT) instead of only as a pipe.

However, when I did the EXACT same routine as I listed above, I had no
errors whatsoever.  But it won't work.  It locks the machine up.  Is there
ANY reason that doing what I did with OFF.COM would not work with
NMORE.COM?  Here are the specifics:

NMORE.C:

Some C and assembly routines, 1 source file
NMORE.C does not containt ANY external routines..examining the .ASM output
confirms this.
TCC -mt -lt -f- NMORE.C works perfectly
TCC -mt -f- -S NMORE.C works just fine to produce .ASM
TASM NMORE.ASM does NOT produce a working EXE file, and changing it to
a .COM file does not help....


To sum, why would using TASM to compile .ASM files generated by TCC -S
NOT work?

Thanks for any help,

Brian
Technical Details
Message-ID: <26755@uflorida.cis.ufl.EDU>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!elroy.jpl.nasa.gov!ncar!gatech!uflorida!reef.cis.ufl.edu!jdb
References: <2481@bnlux0.bnl.gov> <1991Feb7.074923.1299@Solbourne.COM>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!elroy.jpl.nasa.gov!ncar!gatech!uflorida!reef.cis.ufl.edu!jdb
From: jdb@reef.cis.ufl.edu (Brian K. W. Hook)
Newsgroups: comp.os.msdos.programmer
Subject: TCC -S then using TASM and TLINK
Message-ID: <26755@uflorida.cis.ufl.EDU>
Date: 7 Feb 91 13:39:57 GMT
References: <2481@bnlux0.bnl.gov> <1991Feb7.074923.1299@Solbourne.COM>
Sender: news@uflorida.cis.ufl.EDU
Organization: UF CIS Dept.
Lines: 45