[Coco] Assemblers' Documentation

Lothan lothan at newsguy.com
Sat Jan 26 17:19:36 EST 2013


Yeah, you're right in that there never was a complete set of standalone defs 
for RMA. If I remember correctly, I think the Developer's Pack included 
OS9Defs.a in the defs directory, but it also had a precompiled version of 
OS9Defs as either an object or library file. I think the primary reason 
Microware gave was that RMA wasn't designed to create file managers or 
device drivers (Microware recommended asm for system modules), so you 
theoretically didn't need the full set of defs.

Yes, you can use RMA to call C functions in C libraries but you need to 
follow the C conventions to do so. The biggest difference is that everything 
(for some indeterminate subset definition of everything) uses ,U addressing 
for the data area but the C compiler (for reasons I never quite understood 
and never liked) uses ,X addressing for the data area. You also need to 
define a set of functions and global variables that are used by the C 
library functions. The easiest way to do this is to link to cstart.r (this 
module setup up the data area and has the predefined stuff required by the C 
library functions) and to name your entry point main.

I remember someone back in the day (Tim Kientlze?) revamped the C compiler 
to use more sensible ,U addressing for the data area that made interop a lot 
easier. Well, I do remember all that ,X addressing gave me the willies. ;-) 
I think there was also a stripped down version of cstart.r available that 
was intended for using C library functions with assembly code.

-----Original Message----- 
From: Bill Pierce
Sent: Friday, January 25, 2013 6:57 AM
To: coco at maltedmedia.com
Subject: Re: [Coco] Assemblers' Documentation


Lothan,
I think Stephen was asking about the differences between c.asm and RMA, AND 
c.link and RLink, not asm and RMA. I know there's a difference between the 2 
sets. I read an article somewhere explaining the differences, but for the 
life of me, I can't remember where or the reasons given... Rainbow maybe?
That was one of the major features of TK's new "make". It allowed one to 
specify the assembler and linker to use as well as different C components. 
Mine is set up to use RMA and RLink as they were considered superior to 
c.asm and c.link. Some programmers used to rename rma to c.asm and rlink to 
c.link to use it with Tandy/MW's "make". The biggest problem with RMA is 
that there was never a complete set of DEFS files written for it. RMA cannot 
use Asm's defs as they use the "mod" and "org" cmds (among others) which RMA 
does not support. The only DEFS supplied by MW on the Developer System with 
RMA was os9defs.a which was incomplete and did not cover much of scf or rbf 
defs. Also, RMA cannot (that I know of) call C functions in C libraries, 
hence the inclusion of the sys.l library which was exclusively for RMA. It 
provides some of the functionality of the old asm defs, but not all.

Bill P

Music from the Tandy/Radio Shack Color Computer 2 & 3
https://sites.google.com/site/dabarnstudio/
Bill Pierce
ooogalapasooo at aol.com




More information about the Coco mailing list