Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!rutgers!seismo!mcvax!enea!toma From: toma@enea.UUCP Newsgroups: comp.os.cpm Subject: Re: C-Compiler for CP/M-80 wanted Message-ID: <1664@enea.UUCP> Date: Tue, 27-Jan-87 15:41:54 EST Article-I.D.: enea.1664 Posted: Tue Jan 27 15:41:54 1987 Date-Received: Tue, 3-Feb-87 19:11:39 EST References: <3173@brl-adm.ARPA> Reply-To: toma@enea.UUCP (Tony M}nsson) Organization: ENEA DATA Svenska AB, Sweden Lines: 34 As far as I can remember, the c/80 from software toolworks can produce ROMable code. It is a good compiler, and it definitely generates 8080 code. When trying 8080 C-code in ROM remember to check the implementation of the IN and OUT instructions. Since the 8080 has to take the port address as the byte following the IN or OUT opcode, It really cant be done with "pure" code. The trick is to reserve some space on the stack, write the opcode and the parameter plus a ret here, and call your own stack. This is at least how Whitesmits C does it. Regarding the bug in SCC8080, it is there allright. I spent some futile evenings with it before I gave up. I wish somebody else would have a go at it and mail the result. I got this far: In the file CRET.ASM (what a name for the startup code!) insert a push of a parameter just before the call to Xarglist. Xarglist is a C routine that expects a (char *) parameter. The pointer should point to Hex 80, since this is where CP/M (CP/M 3.0 in my case) leaves the command line arguments. So far so good, when I run SID, loads the c-program with SIDs "I" and "R" commands, the compiler happily compiles anything. Invoking it directly by "SCC8080 hello.c" from the CP/M prompt however, produces nothing, the compiler simply ignores the parameters. For further info contact me as toma@enea or Tony Mansson ENEA DATA Svenska AB ENEA SYD Box 4150 S-203 12 MALMO SWEDEN