Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!mailrus!uwmcsd1!nic.MR.NET!eta!pwcs!stag!daemon
From: to_stdnet@stag.UUCP
Newsgroups: comp.sys.atari.st
Subject: (none)
Message-ID: <599@stag.UUCP>
Date: 20 Sep 88 03:29:01 GMT
Sender: daemon@stag.UUCP
Lines: 127
From: roseate!cjp@stag.UUCP (Charles Purcell)
Re: gccGEMshell(long)
What! Gnu C on the ATARI? Someone had to be creative for this! Yes,
it is really the Gnu gcc compiler 1.23 for use on the ATARI-ST Mega
and -ST line of M68000 based microcomputers. I emphasize the chipset
which seems to have made the port possible. Gnu gcc has cost traffic
for various servers, and a lot of head scratching for installers.This
compiler is big and beneficial. The provided Gnu documentation is re-
quired reading if you are to teach C programming with an ATARI. Even
more remakable is the port to ATARI! How can one use it on an ST-1040
or 520+ First, the executable is in DRI format, with an extended sym-
bol list,far advanced over DRI's symbol table, but structurally near-
ly identical. Well,the nm68.prg from the developer's kit does read the
symbol table of gcc, and does print out a redirectable output of good
use in debug mode. As well, sid makes equally good use of this symbol
table structure. Thus, the table structure is the same, equally limit-
ed by an eight byte name string format. I use ar and nm in gnu format
to read archives and object files for precise details. I would suspect
that the n.out format of MarkWilliams would be more useful,but illegal.
Please leave the symbol table in the standard DRI executable with the
provision of a choice for no generation, -s . After the code is built,
I find that an old public domain code prgstrip.prg strips off the
symbol table precisely and accurately.(Anyway Richard has some strong
words with respect to mandatory symbol table generation).
I found the stacklocations, with the help of sid.ttp and environs.ttp
I set cc1 0x05b1c8 to 0x018000 and cpp 0x8fcc to 0x020000 .
With these stacks and using gemshell(below) in ROM-TOS, I have been
able to compile the 140,00 byte source cccp.c into a 60 K byte .o
I have eliminated my ramdisk, my print spooler, my corner clock and a
large number of other goodies, just so that I can compile with gcc on
either of my megabyte systems. As a priviledged user of RAM-TOS V.1.4
I can report that it is possible to compile, carefully, even with TOS
in RAM! I can do a better & larger compile using this gemshell that I
was thinking about. Thanks, Simon Poole, for your thoughts about the
utility of gcc, and the importance of usage on 1 megabyte machines.
Otherwise, I was thinking, why not go for a RAM upgrade. At any rate
here is the gemshell.c as get up for use in the g: partition.
( compiled using MWC , use with keyclick from GEM window , usage: )
:-v hello.c -o hello.s on a hard disk partition
:-v -Ia:\include hello.c -o hello.tos on either floppy(why dif?)
SOURCE why MWC? because of GEM...
/* gemshell.c forms gemshell.tos STdNet-StPaulMN 17Sep88 CJPurcell */
/* "one-liner" shell to compile w/gcc on an ATARI-1040ST or ATARI-520+ */
#include /* provides maximum available execute space in 1meg */
/* eventually,read this info from an initialization file, i.e., gnu.rc */
static char *envp[] = { "gcc=g:\\exec\\gcc.ttp",
"cc1=g:\\exec\\gcc-cc1.ttp",
"cpp=g:\\exec\\gcc-cpp.ttp",
"ld=g:\\exec\\gcc-ld.ttp",
"as=g:\\exec\\gcc-as.ttp",
"GCCEXEC=g:\\exec\\gcc-",
"INCLUDE=g:\\include",
"GNULIB=g:\\lib",
"TEMP=p:",
"PATH=",
"A:\\",
0 };
main() {
unsigned char buffer[130];
int status;
buffer[0] = 128;
Cconws("gccGEMshell Enter: command_line_string (^C exits)\r\n:");
Cconrs(buffer);
Cconws("\r\n");
buffer[1] = ' '; /* command buffer mandatory space prefix */
/* 0 selects loadgo */
status = (int) Pexec( 0 , "g:\\exec\\gcc.ttp", &buffer[1], *envp );
Cconws("\r\n Pause to read compiler messages; Any key continues: \r\n");
Bconin(2);
return(status);
}
and a binary useful for partition g:
BINARY
---------------cut here for uudecode---------------------------
table
!"#$%&'()*+,-./0123456789:;<=>?
@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_
begin 644 gemshell.tos
M8!H .4 !K@ 8 P "IO 0@;0 8T>T '"1M "Q"z
M@")(2A)G4"**)DHD64H:9OPBBDH29SP,&P!!9NP,&P!29N8,&P!'9N ,&P!6y
M9MH,&P ]9@I*$V<&(\L 4:0ID@"2**)DHD64H:9OPBBDH29O(F &8R0ID@x
M"2+\ %/$7M ( 4&DB"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S\_/S\_/S\_/S\_/P @ !P$0 0H , )0# v
M !@ "6 0 !@ 3"(R!@XD$@@." H,%AH4u
F"A8F"D0.%# 6%"@<,CX*' @P$ 0$! 0$! 0$! 0$! 0$! 0!2 .t
s
end
electronic mail: Charles J.Purcell
woods!cpurcell@eta 1260 W.Shryer Ave
roseate!cjp@stag.UUCP St.Paul, MN 55113
roseate!cjp@stag.UUCP(Charles Purcell )