Tandy CoCo OS-9 "C" Compiler
| Author |
Message |
|
SFischer1
Certified CoCo Tech
Joined: February 6th, 2011, 4:12 pm Posts: 191
|
 Tandy CoCo OS-9 "C" Compiler
Tandy CoCo OS-9 "C" CompilerAfter a short discussion with Dean, I am requesting that no posts be made to this thread except by me. I have created an additional thread "Tandy CoCo OS-9 "C" Compiler Comments" for those persons who wish to ask questions, make suggestions in public that are visible unlike PM's or e-mail's to me about this project. Your posts can be edited, the text replaced with "Message Deleted" and so on unlike the [CoCoList for Color Computer Enthusiasts] messages which are locked once you hit send. The ultimate home for these web pages and files: http://www.os9projects.com/C_Compiler/Compiler.htmlmailto:a_nani_mouse@mindspring.com or PM me here (Click "Members" on the top line) --------------------------------------------------------------- As comments are made, I will try and organize the information, the more help, the faster it will become useful. Please add your own posts with information please to the "Tandy CoCo OS-9 "C" Compiler Comments" thread! ---------------------------------------------------------------  |  |  |  | Quote: ANSI "C" VersionA project was started to allow ANSI "C" programs to be compiled and has succeeded to the extent that ~ 80% of ANSI "C" programs can be compiled. This does not mean that the Tandy CoCo OS-9 "C" Compiler is an ANSI "C" Compiler, it is not. The compiler itself does not do the necessary checking that was added to the Second Edition of The C Programming Language as defined by the ANSI standard. See "Appendix C - Summary of Changes" in the Second Edition of The C Programming Language. It is currently online at the CoCoCoding! Website https://sites.google.com/a/aaronwolfe.c ... oding/homeK&R's Second Edition is here: Https://sites.google.com/a/aaronwolfe.c ... ects=0&d=1The documentation for the Ansifront beta release v0.12 when compared with K&R's Second edition will show the differences. |  |  |  |  |
SHF
Last edited by SFischer1 on September 3rd, 2011, 2:38 am, edited 6 times in total.
|
| August 21st, 2011, 5:17 am |
|
 |
|
SFischer1
Certified CoCo Tech
Joined: February 6th, 2011, 4:12 pm Posts: 191
|
 Tandy CoCo OS-9 "C" Compiler
OS-9 "C" Compiler PartsWork In progressKnown to be incomplete, perhaps incorrect-------------------------------------------------------------------------------------- Make (Make_TK.lzh) Make is a utility to help with large "C" project development. If your program has been correctly functionally partitioned into perhaps eight source files with three header files, then a lot of time can be saved by using "Make". For example, if you edit just one of the source files and wish to rebuild the executable, make will determine that only that one source file needs to be recompiled and then linked with the .r files for the other source files to build the executable. Similarly, if you edit one of the header files, make will determine that only three source files depend on that header file and recompile only those source files before linking with the .r files for the source files that do not need to be recompiled. This saves a lot of time. CC (C executive) (cc_2_5_2.lzh) "cc" is the C compiler executive. "cc" invokes the appropriate phases of the C compiler in order to compile C source programs. This version is configured to use the two-pass Level 1 version of the compiler, and to use RMA and RLINK as the last two passes. It also puts temporary files in the first of /R, /R0, /DD/TMP, whichever it finds first. c.prep (C macro preprocessor) cprep19b.lzh ansifront (ansifront012.lzh) The ansifront program takes a pre-processed ANSI C program from stdin and writes a MW C program to stdout. This means you will need to run c.prep on your files first, then run Ansifront on the pre-processed file. c.pass1 (Pass One of Two-pass Compiler)c.pass2 (Pass Two of Two-pass Compiler)c.opt (Assembly code optimizer)rma (Assembler) r63 (Assembler) rma_1_3_patch.lzh (rma_6309_Patch.lzh)??? rlink (Linker)  |  |  |  | Quote: Well, you need the MW C Compiler and the LII development system. You can grab c.comp from Gene's web site but you didn't hear that from me! commands From RTSI:ansifront012.lzh* COpt2_1_1.lzh* ansifront012.readme* cc_2_5_2.lzh rma_1_3_patch.lzh* Make_TK.lzh* cb_C_Beautifier.lzh* cprep19.lzh rma_6309_Patch.lzh* defs from RTSI:C_Defs.lzh* unixinclude.lzh libraries from RTSI:CLib_Krieder_91.lzh* Cgfx_7_src.lzh* clibt.ar* CLib_Krieder_91_doc.lzh* GUIlib_1_0.lzh* CStart_TK.lzh* Solve.lzh* regexp.lzh Cgfx_7.lzh* Termcap_Level2.lzh* unixlib.lzh Cgfx_7_doc.lzh* Window_SaveRestore_fncs.lzh* varargs.lzh* My modest contribution: http://www.sdc/org/~goosey/os9/curses09.lzhThat should bring you up to the Ultimate OS-9 C compiler. Willard |  |  |  |  |
I have to look at more posts and do a better job of formatting. SHF
Last edited by SFischer1 on September 7th, 2011, 5:56 pm, edited 16 times in total.
|
| August 21st, 2011, 5:20 am |
|
 |
|
SFischer1
Certified CoCo Tech
Joined: February 6th, 2011, 4:12 pm Posts: 191
|
 Re: "C" Compiler FAQ and notes
OS-9 "C" Compliler .dsk fileWork In progressKnown to be incomplete, perhaps incorrectAs it is Built, please report errors, additions, corrections, changes to file formatsI am just starting to collect the parts, many are placeholders for the final files, this is just what I have handy, unchecked and parts known not to appear in the final .dsk.
Attached is the Climax "C" Compiler Disk 1 (.dsk) which has the untested compiler parts.
It may be some time for more progress posted here as Disk 2 needs much more research.
CC_1.dsk
Part of clang.zip, contained within
"C Compiler .dsk file - ZIP Version.zip"
Which is currently attached to this post, it will be moved TBD.
http://www.tandycoco.com/forum/viewtopic.php?p=529#p529
Came from "ftp://www.rtsi.com/RSDOS/incoming/clang.zip"
CC_2.dsk
Part of clang.zip, contained within
"C Compiler .dsk file - ZIP Version.zip"
Which is currently attached to this post, it will be moved TBD.
http://www.tandycoco.com/forum/viewtopic.php?p=529#p529
Came from "ftp://www.rtsi.com/RSDOS/incoming/clang.zip"It will take some time to find the correct ones and build a real .DSK file. SHF
Last edited by SFischer1 on September 6th, 2011, 10:53 pm, edited 5 times in total.
|
| August 21st, 2011, 5:22 am |
|
 |
|
SFischer1
Certified CoCo Tech
Joined: February 6th, 2011, 4:12 pm Posts: 191
|
 Tandy CoCo OS-9 "C" Compiler
Tandy CoCo OS-9 "C" Compiler
Most recent 'C' Compiler modules., Libraries, DOC, etc.?
Unedited - To be totally reworked!
--------------------------- >From Dev Sys: lib/sys.l lib/cgfx.l defs/wind.h defs/stdmenu.h defs/mouse.h defs/buffs.h cmds/rma cmds/rlink cmds/rdump cmds/make
>From original C compiler cmds/cc1 c.prep c.pass1 c.pass2 c.opt c.asm c.link defs/ ctype.h direct.h errno.h modes.h module.h os9.h os9defs.h setjmp.h sgstat.h signal.h stdio.h time.h lib/ clib.l cstart.r sources/ line.c prof.c rdump.c sources/sys syslib.l obsoleted by Krieder clib?
cc252.lzh replaces cc1
c.comp LII compiler same as c.pass1 and c.pass2, with no intermediate file. Faster
cprep19a.lzh c_prep. replaces c.prep
solve.lzh solve.r arithmatic parser/solver for C code expects to be linked agains Krieder Clib
cstart.lzh replacement lib/cstart.r
clib_krieder_91.lzh Krieders newest clib lib/clib.l Y2K issue in ctime() clibt.l
c_defs.lzh header files for Krieders lib These files don't end with newlines! MUST edit and add terminating newlines. replaces: ctype.h direct.h errno.h modes.h module.h os9.h setjmp.h sgstat.h signal.h stdio.h should have a prototype for FILE *fopen() time.h
ansifront012.lzh adds cmds/ansifront
cgfx7.ar has a horrible bug in getenv() replaces lib/cgfx.l defs/wind.h defs/stdmenu.h defs/mouse.h defs/buffs.h cocoskel.lzh prototype MultiVue app src/cocoskel/mymenu.h /skel.c /skel.make
unixinclude.lzh replaces defs/stdlib.h change the proto of atof to return double adds defs/limits.h defs/sys/cdef.h defs/sys/types.h
cdefs.ar older Krieder headers, has files newer version doesn't have
termcap_level2.lzh lib/termcap.l defs/ttydefs.h why, no it doesn't have a termcap.h, why do you ask?
varargs.lzh lib/varargs.l defs/varargs.h
guilib.lzh lib/gui.l defs/gui.h
copt2_12.lzh cmds/copt2 cmds/rmxlab sys/patterns.dat
regexp.lzh lib/regexp.l defs/regexp.h defs/regmagic.h
defs/bdraw.h not sure where I got this defs/graphi.h not sure where I got this These are both cgfx replacements
defs/mathlib.h original MW math lib? lib/mathlib.l defs/graphics.h header for graflib lib/graflib.l LI VDG graphics lib These were merged with clib.l on a weird disk
lb_C_Lib_splitter.lzh cmds/lb
cntx_5.lzh sort of a mini-LINT. Very useful Gene's site cmds/cntx
triglib high-precision math lib. Gene's site
curses010.lzh experimental, has bugs, my site lib/curses.l defs/termcap.h can get this elsewhere, but this one matches defs/curses.h
unixlib.lzh or unixlib.ar requires a setnuid() function lib/unix.l
SHF80.zip SHF's site lib/debug.l lib/getargs.l lib/cos9.l lib/fcgfx.l defs/debug.h defs/cos9.h defs/getargs.h
alib.lzh or alib.ar lib/alib.l AWESOME lib for assembly programming with rma No /dd/lib is complete without it!
make_tk.lzh This is the make to use. It's that simple.
rma_1_3.lzh patches rma into r63
abandoned/unusable no docs, headers, or source dbg.l, mylib.l
-------------------------------
Last edited by SFischer1 on September 6th, 2011, 11:06 pm, edited 3 times in total.
|
| August 21st, 2011, 5:24 am |
|
 |
|
SFischer1
Certified CoCo Tech
Joined: February 6th, 2011, 4:12 pm Posts: 191
|
 Tandy CoCo OS-9 "C" Compiler
Tandy CoCo OS-9 "C" Compiler - History & Old Notes
1) ANSIFront also works around a number of nasty bugs in the compiler, such as the struct-element-name issue.
2) The original "c.prep" substitution in strings.
The spec says NO replace but I found this in the source of one of my programs. ------------------------------------------ #define EDITION 2 > 88/02/17
#define ARCHID fputs(" ARCHIVE ED= EDITION \n", stdout); /* note bug in compiler allows EDITION to be substituted, spec says no substitutions within quoted strings */
3) The patch to RMA used to produce R63 was the second one found on RTSI.
rma_6309_Patch 1/25/1993 was NOT used
rma_1_3_patch 10/25/1993
Last edited by SFischer1 on September 6th, 2011, 11:07 pm, edited 5 times in total.
|
| August 21st, 2011, 5:27 am |
|
 |
|
SFischer1
Certified CoCo Tech
Joined: February 6th, 2011, 4:12 pm Posts: 191
|
 Re: "C" Compiler FAQ and notes
Tandy CoCo OS-9 "C" Compiler FAQ1) How can I tell which version I have? There's only one version from Tandy. It was released for OS-9 Level-I and no changes were made for OS-9 Level-II. 2) do the latest patched versions etc that are out there still have it hardcoded to require certain libraries or include files to be on /DD in order to work? The original Compiler was not hard coded for "/DD" as released from Tandy. Patches were made to change this. What You Should Know Ahout Your C CompilerOriginally in RAINBOW October 1989 Page 82ftp://www.rtsi.com/RSDOS/incoming/What% ... mpiler.txt EZGEN is located at: ftp://www.rtsi.com/OS9/OS9_6X09/ezgen.lzh[/color] As part of this work in progress, standard locations for how the compiler is to be used including where library and include files are to be placed will be defined. While configurations different from using an emulator with a VHD (Virtual Hard Disk) and two (2) Megs of memory will be under discussion, that will be the initial target. 3) I've noted that cc252 calls c.pass1 and c.pass2. Is there any real difference between this and c.comp? How do I switch them?As far as the code produced, there is no difference. Using c.comp will cause a slight speedup but not worth the effort. Using c.pass1 and c.pass2 loaded into memory and the work files on a ram disk on a 2 Meg system (Real CoCo or Emulator) or piped on a 512K system will show little slowdown.
Last edited by SFischer1 on October 28th, 2012, 7:47 pm, edited 3 times in total.
|
| August 21st, 2011, 5:28 am |
|
 |
|
SFischer1
Certified CoCo Tech
Joined: February 6th, 2011, 4:12 pm Posts: 191
|
 Re: Tandy CoCo OS-9 "C" Compiler
Tandy CoCo OS-9 "C" Compiler Documentation1) C Compiler User's Guide http://sourceforge.net/apps/mediawiki/n ... %27s_GuideQuestion, do we want to convert this to PDF so it can be included in the C Compiler documentation disk?2) C Reference Manual (The C Programming Language.pdf) Dennis M. Ritchie Bell Telephone Laboratories Murray Hill, New Jersey 07974 This may NOT be the K&R Book! Part of clang.zip, contained within "C Compiler .dsk file - ZIP Version.zip" Which is currently attached to this post, it will be moved TBD. http://www.tandycoco.com/forum/viewtopic.php?p=529#p529Came from "ftp://www.rtsi.com/RSDOS/incoming/clang.zip"
Last edited by SFischer1 on August 26th, 2011, 5:05 pm, edited 2 times in total.
|
| August 21st, 2011, 7:43 pm |
|
 |
|
SFischer1
Certified CoCo Tech
Joined: February 6th, 2011, 4:12 pm Posts: 191
|
 Re: Tandy CoCo OS-9 "C" Compiler
Compiler Source Code Available (We have ALL Parts!)
Last edited by SFischer1 on August 21st, 2011, 8:26 pm, edited 1 time in total.
|
| August 21st, 2011, 8:01 pm |
|
 |
|
SFischer1
Certified CoCo Tech
Joined: February 6th, 2011, 4:12 pm Posts: 191
|
 Re: Tandy CoCo OS-9 "C" Compiler
Links to other Sites, Bug lists and help.There is a list of "C" Compiler bugs here: ftp://www.rtsi.com/OS9/OS9_6X09/PROG/MWC_Bugs.lzh------------------------------
Last edited by SFischer1 on October 28th, 2012, 7:48 pm, edited 3 times in total.
|
| August 21st, 2011, 8:04 pm |
|
 |
|
SFischer1
Certified CoCo Tech
Joined: February 6th, 2011, 4:12 pm Posts: 191
|
 Re: Tandy CoCo OS-9 "C" Compiler
Suggested Configeration and Usage (Including Make and Shell Scripts)
Last edited by SFischer1 on August 21st, 2011, 8:45 pm, edited 1 time in total.
|
| August 21st, 2011, 8:10 pm |
|
|
Who is online |
Users browsing this forum: No registered users and 0 guests |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum
|
|