[comp.sys.atari.st] Hardisks and compiling and patches to Alcyon for error returns

RDROYA01@ULKYVX.BITNET.UUCP (03/12/87)

About the question of whether to use a Hard disk or ram disk for
development, I have the following observations.  Compilers produce a lot of
intermediate files (read temporary) and file systems of the MS-DOS family
(GEM included) fragment misserably as files are continually written and
erased.  As the fragmentation increases, access time increases.  I know a
guy whose hard disk got so fragmented by his editor's "swap file" that its
performance eventually degraded to that of a floppy.  But there is a way to
avoid this problem with a hard drive (at least with Supra Drives), create a
scratch partition of 1 meg or less that will hold the files you intend to
upgrade frequently (i.e. source for current projects), and use a ram disk
for temporary and intermediate files.

I use the Alcyon compiler (v. 4.14) which I find to be more than adequate
for large projects.  With the Supra and a ram disk I have been able to
compile 16K sources in less than one minute using a cc.prg I wrote.  In
human terms one minute is short (for those born in the 1950's at least).
It's a small price to pay for the thoroughness of multiple passes, but
that's just one person's opinion.  Even without a cc.prg, the following
script will work in my cli to compile a module:

alias error=exit        ; force exit on errors
cd ~temp\
~bin\cp68 -i ~include\ ~source\$0.c $0.i
~bin\c068 $0.i $0.1 $0.2 $0.3
del $0.i
~bin\c168 $0.1 $0.2 $0.s
del $0.1 $0.2
~bin\as -l -u -s ~bin\ -f ~temp\ $0.s
del $0.s
alias error=noexit      ; back to normal

The command line is "cc foo."  On my system source is e: and temp is m:.  The
~ is a macro expand notation my cli uses.  The $0 is replaced by the cli in
the above script and becomes foo.

About patches to the dev pack compiler/assembler/linker/relmod to return the
proper codes on exit.  I poked around in the code and found the following
(v. 4.14 only).  You should be reasonably familiar with sid and realize that
some offsets are ballpark figures.  So you will need to use the 'l' option
to show you the instructions before you change them.  Around 0xda from the
beginning of each of the files (that offset is accurate if you load sid
without a file and use the 'r' command), is a command sequence something
like (it's been a while since I did the patch)
move.w #0, d0           * return code
trap #2                 * old cp/m trap vect and new gsx
unlnk a6                * Alcyon built-in patch space *8^}
rts                     * useless return
the hex code is
30 3c 00 00 4e 42 4e 5e 4e 75
I changed this to
move.w  #$4c, -(a7)
trap    #1
rts
hex code
4a 9f 3f 3c 00 4c 4e 41 4e 75
The offsets are the same for cp68,c068,c168, and as68.  The offsets for
link68 and relmod are a little off from the 0xda mark, but easy to find
using the l option in sid.

Hope this helps,

robert royar

charter member of the "Society for the Creative Use of Yet Another
Anachronistic C Compiler" [SCUYACC]

        "backwater, we're sailing at the edges of time
        backwater, we're drifting at the water line
        .
        .
        .
        we're all talking to keep the conversation alive
        .
        .
        when you examine the logistics and heuristics of the mystics
        you will find that their minds rarely move in a line
        so it's much more realistic to abandon such balistics
        and resign to be trapped on a leaf in the vine"
                                        "Backwater"
                                        -Brian Eno ca. 1977
                                        From _Before and after science_

[I just couldn't stand seeing this unattributed quotation go by one more
time without giving some credit to the author and his amazing gnostic
visions.]