[Coco] 16/32 bit 6809 derivative

Bill Pierce ooogalapasooo at aol.com
Tue Sep 26 16:21:59 EDT 2017


Barry, A correction, I meant to say Y not U (hence C, no Y). With the C compiler, the stack is always in Y and the C compiler references all variables from the stack position, which always starts at 0 (actually, 1), so the variable reference can (in most cases) be loaded directly.
I have used "CNoY" for about 6 years now in many programs with no problems. I think there is some special cases where it can't be used but I haven't run into them yet. Level 1 may be such a case as I don't use L1 at all. Hell it's tricky just to get the C compiler to run on L1. Also, I think it cannot be used in compiling libraries as they usually use local variables and the offsets would be wrong.
Also, RMA (all versions) cannot be used to compile libraries as it adds an extra "0" to the end of each module and c.asm does not. The extra 0 makes the offset of the next merged module in the library at the wrong offset.

 

 

Bill Pierce
"Charlie stole the handle, and the train it won't stop going, no way to slow down!" - Ian Anderson - Jethro Tull

My Music from the Tandy/Radio Shack Color Computer 2 & 3
https://sites.google.com/site/dabarnstudio/
Co-Contributor, Co-Editor for CocoPedia
http://www.cocopedia.com/wiki/index.php/Main_Page

E-Mail: ooogalapasooo at aol.com

 

 

-----Original Message-----
From: Barry Nelson <barry.nelson at amobiledevice.com>
To: coco <coco at maltedmedia.com>
Sent: Tue, Sep 26, 2017 12:30 pm
Subject: [Coco] 16/32 bit 6809 derivative

> Bill Pierce> Tue Sep 26 11:14:36 EDT 2017> > I also use a Mike Knudsen custom utility called "CNoY" which when used in the compiler chain, changes "leaX n,u" references to "ldX #n" (X=x & y), which saves a cycle or two as well as making the code smaller (and faster).I would think that tat would cause issues especially with OS-9/NitrOS9 level 1, where the start of a program is almost never mapped to address 0. Even in level 2, if several programs are merged together you need to use the u register to get the memory offset address of the code.-- Coco mailing listCoco at maltedmedia.comhttps://pairlist5.pair.net/mailman/listinfo/coco


More information about the Coco mailing list