[net.micro.apple] Apple compiler comment - TASC

binder@dosadi.DEC (No matter where you go, there you are.) (09/23/85)

Leonard Rosenthol writes:

>      The TASC compiler runs through a three stage compilation, first it
> check for bugs or errors it the program that it can't compile.  Then it
> ,if there are no errors, starts compilation (stage 2) and third it com-
> pacts the code and writes it to a file.
>      This file is a binary file and can only be BRUN after another file
> RUNTIME has been BLOADed into memory. This is a real pain!!!

True, but not true.  There is a way to get around this pre-loading of the
runtime library.  Try this:

1.  Compile your program once in the normal way.   BLOAD the object file,
    using  64K Diversi-DOS or ProntoDOS, so that you can then ask the DOS
    where it loaded the file and how long the file is.  Note the size pa-
    rameter.  (If you don't have a DOS that will give you these parameter
    goodies, you can do the appropriate PEEKs to fish the info out.)

2.  Recompile, using the compiler's option selection, to put the  program
    at $803 or wherever you want it to start.  Put the runtime library in
    the space immediately after the program, and set for variables to  be
    right after the runtime library; somewhere, the manual gives the size
    of the runtime stuff; I think it's $FDA, but I'm not at home to check
    it.

3.  Add the lengths of your program and the runtime library  together  to
    find the total length of your executable code.  BSAVE the whole thing
    as one file, maybe with .EXE as a filetype.

You can now just do a BRUN WHATEVER.EXE and your program will work.   You
should  remember, though, that it carries the Microsoft runtime code with
it, and if you're going to distribute it you may be  violating  copyright
restrictions.

Cheers,
Dick Binder   (The Stainless Steel Rat)

UUCP:  { decvax, allegra, ucbvax... }!decwrl!dec-rhea!dec-dosadi!binder
ARPA:  binder%dosadi.DEC@decwrl.ARPA

Mon 23-Sep-1985 11:33 Eastern Daylight Time