• Please review our updated Terms and Rules here

TRS-80 Model 4 C Programming System _ RS Catalog# 26‑2230

To make a build system for the Model 4 download

Misosys C for the Model 4 (https://www.tim-mann.org/trs80/Mc6.zip)

Note: do not install the Model I/III libraries. The libraries are already in the Model 4 download.

The compiler doesn't generate machine code directly. It generates an assembly language version, uses MRASM to generate an object file and lastly a linker to create the final executable. Thus you will also need the following

Misosys MRASM (https://www.tim-mann.org/trs80/Mras6.zip)

The documentation for Misosys C is at https://www.tim-mann.org/trs80/doc/promcw97.pdf

In my build system (VM) I have a hard drive as drive 0. The boot disk is at drive 4 (after a drive swap operation).

There are a couple key points that are not apparent (at least they were not to me) in the manual.

1. The MC/JCL batch file used to build a program uses drive 1 as the working drive. If that drive is not present or does not have enough free space, it will fail. To use a different drive as the working drive edit MC/JCL.

2. The UNARC/CCC program (used to extract individual header files from HEADERS/H) uses drive 3 to place the extracted header files. If you don’t have a drive 3 then edit UNARC/CCC to use a different drive. Alternatively you can to this manually.

3. As your code grows you will need to break it up into multiple modules. The process is documented in the above referenced manual.

4. Do not specify include directives unless you need them. They will eat up precious memory.

5. As your code grows even more you will need to instruct the linker to use a disk for Virtual Memory by specifying –V=filename/vfm:X (where: filename is any name you want to give it; X is the drive to use). An example linker command line is

mlink -V=fm/vfm:0 main,disp,trs,frehd,util,edit -N=fm:3 –E

The hardest pill to swallow after using modern tools is the editor. Nothing on the TRS-80 can compare to a “modern” editor. I edit my code in the native Windows 10 system. Then copy it to the TRS-80 virtual machine to be compiled. This works well and is fast enough.

I created /JCL files to perform the build process. Here is one that I use to import the source code from the host system, compile it, assemble it and the link it to all the other models.

PURGE DISP:3 (MPW="HDISK",Q=N)
import2 -n fm/fm.h fm/h:3
import2 -n fm/disp.c disp/c:3
mcp disp/c:3 +o
mc disp:3 +c +o
mcopt disp:3
mras disp:3 –nl
mlink -V=fm/vfm:0 main,disp,trs,frehd,util,edit -N=fm:3 -E

In the above JCL “program” it uses drive :3 as a working drive. This is a 720k drive created for the VM (TRS80GP).

With MC you can link libraries created in assembly language to you C code. This way you can get the best of both worlds. Speed when you need it (with ASM) and ease of program creation (with C).

One other thing that got me at first was I missed the part about adding library inclusion directives, like the following:

#option MATHLIB
#option INLIB

They instruct the linker to look there for dependencies.

The Misosys C manual indicates which library is needed for a given function.

In closing it is sure a blast from the past (at least my past) to operate without the modern C language structures.

Good luck and have fun.
 
IMG_1293.jpg

Whats outstanding from "TRS-80 Model 4 C Programming System 26‑2230" ?

Steve
 
Hello! I realize that this thread is over 8 years old now but I am also interested in this C compiler. like mykrowyre, I cant find this package anywhere else and the dropbox link is very dead.

If anyone who has the completed package could make it avaliable again, that would be greatly appreciated!

Thanks!
 
If someone manages to get (or create) another copy of the full working version, it would probably be a good idea to upload it to archive.org so that it doesn't vanish again.
 
I have several hundred model 4 programs. I don't see disk images in my collection. My cat turned off remote access so I'll have to check when I get home.
 
Is one of the creators of that collection of files going to upload it to archive.org, or shall I do it?
 
This is one I have. I was looking at it when Empress stepped on the power button. Pete, we should compare archives.
 
Back
Top