[Coco] [Color Computer] OS-9 Question, GCC stuff

L. Curtis Boyle curtisboyle at sasktel.net
Fri Jul 22 22:38:23 EDT 2005

On Fri, 22 Jul 2005 16:53:25 -0600, <jdaggett at gate.net> wrote:

> James
> While the 6809 does allow the direct page to sit in any 256 byte
> block of memory, with OS9 I would be reluctant to allow user
> programs to alter the DP register value from that which the OS sets.
> Changing the DP register contents on the fly and not resetting them
> can cause the OS to do some mighty funny things. One to say at
> least is crash.

     In level 2 OS-9 this is not important. Each program space gets their  
entire 64K memory to themselves (Except the vector page at the top of RAM,  
and the I/O page, so $FE00 to $FFFF), including the system process. They  
each keep their own copies of the register stack as well, so that the DP  
setting in a user program in process space 3, for example, has nothing to  
do with, and no influence on, process 2 or system process 0. I didn't  
often move DP around, but if I had a couple of tables to access very  
quickly at different times within a program, I reset the DP to the areas  
when needed and used DP addressing for them.

> In embedded situations this can be a nice feature to move the DP
> memory within the 64K memeory map. Even then, one has to be
> sure that all su broutines and interrupt service routines know of the
> change.

    In OS9 Level II/NitrOS9's case, once an IRQ (or SWI, for that matter)  
occurs, and it jumps to the vector in $FFFx, the vector RAM routines swap  
to DAT MMU set 0, grabs the last system process stack pointer, and pulls  
the registers (including DP) from the stack to return DP to it's original  
system state (or the system was hard-coded to 0... can't remember off the  
top of my head).
> james
> On 22 Jul 2005 at 20:35, James Diffendaffer wrote:
> To:             	ColorComputer at yahoogroups.com
> From:           	"James Diffendaffer"
> <jdiffendaffer at yahoo.com>
> Date sent:      	Fri, 22 Jul 2005 20:35:56 -0000
> Copies to:      	Subject:        	[Coco] [Color Computer] OS-
> 9 Question, GCC stuff
> Send reply to:  	ColorComputer at yahoogroups.com,
> 	CoCoList for Color Computer Enthusiasts
> <coco at maltedmedia.com>
> 	<mailto:coco-
> request at maltedmedia.com?subject=unsubscribe>
> 	<mailto:coco-
> request at maltedmedia.com?subject=subscribe>
>> What limitations does OS-9 place on the use of page 0 and DP usage by
>> programs?  I'm guessing Page 0 is reserved for the OS but the DP would
>> be ok to use for a user program... but I don't have any OS-9 docs so I
>> wan't to make sure.
>> GCC 68HC11 places it's software registers on page 0 for fast access. I
>> figured I could place the soft registers in the GCC startup code or at
>> the start of the data segment and point the DP there to access them.
>> Without that GCC's code will be significantly slower.
>> I've gone throught the instruction sets of the 09 and HC11.  The
>> differences are managable so far.  The remaining issue is whether or
>> not the compiler uses address modes that the 09 doesn't support for
>> the same instructions.
>> To resolve the problems I was having with Cygwin I had to delete my
>> entire install and install from a different mirror.  Once I did that
>> the GCC configuration and make seemed to work great.  Something was
>> wrong with a file on the mirror I had been using and it was causing
>> problems with my install.
>> The make took a while (I walked away after 20 minutes) to make the
>> entire GCC project on my 2.4GHz system the first time so anyone
>> planning to build everything should expect to start it and check back
>> later.
>> Brought to you by the 6809, the 6803 and their cousins!
>> Yahoo! Groups Links
>> <*> To visit your group on the web, go to:
>>     http://groups.yahoo.com/group/ColorComputer/
>> <*> To unsubscribe from this group, send an email to:
>>     ColorComputer-unsubscribe at yahoogroups.com
>> <*> Your use of Yahoo! Groups is subject to:
>>     http://docs.yahoo.com/info/terms/
>> --
>> Coco mailing list
>> Coco at maltedmedia.com
>> http://five.pairlist.net/mailman/listinfo/coco

L. Curtis Boyle

More information about the Coco mailing list