[Coco] [!! SPAM] Re: 6809 / General CPU question

jdaggett at gate.net jdaggett at gate.net
Thu Feb 24 13:24:56 EST 2011


Mike

There are six pairs of address bytes that are allocated for vectors. Within the processor is a simple but effective priority circuit. With RESET, there is no higher priority. This vector will act regardless of where the processor is in execution. 

The vector addresses need to be stored either in volatile or non-volatile memory. The six pairs of addresses are hard coded within the processor. Thus the RESET vector is always at $FFFE and $FFFF. You can store any 16 bit address at that location and that is where the CPU will start to process. Not $FFFE/FFFF.

In the case of the COCO series of computers the vector address are always stored in ROM. Either the GIME, in the COCO3, or the SAM/VDG in the COCO1/2 will automatically address the ROM when the CPU address is in the range of $FFF0 to $FFFF. All the COCOs reserve this space for ROM no matter what mode the rest of the memory block is in. From the programmer's perspective this action is transparent. When you set up your programming you will have to program the ROM with the vector addresses at their respective locations along with the rest of your program. So you will have to have at least two ORG statements or one large RMB section with essentially all $FF. 

In the case of the COCO3, the vector addresses can point to RAM location at $FFE0 to $FFEF if the GIME is setup for ram at this address. In this case the vectors can be altered by a user program. Otherwise these are in ROM if I remember correctly. This allows a program to have its own vector fetch region. In the case of the COCO1/2 this is always ROM if my memory serves me correctly. 


hope this helps
james 


-----Original Message-----
>From: Mike Rowen <mike at bcmr3.net>
>Sent: Feb 20, 2011 10:25 AM
>To: CoCoList for Color Computer Enthusiasts <coco at maltedmedia.com>
>Subject: Re: [Coco] [!! SPAM] Re: 6809 / General CPU question
>
>I think what may have caused me to come up with this question in the first
>place is that I am studying the 6809 and 6809 machine language. I was
>looking at a memory map of the CoCo and these addresses (FFFE & FFFF) appear
>to be in an area called "Dedicated Addresses" and it seems outside of the
>addresses mapped to various ROM locations. So I ruled out ROM being mapped
>to these the addresses. That may or may not be the case. If it isn't in
>ROM,it is likely that it is done through other address mapping on the
>hardware, much as John describes. What I have learned through all of the
>discussion is that the 6809 indeed needs to get its starting point by
>looking at FFFE & FFFF. What is mapped to these addresses appears to be
>strictly up to the computer designer. I have a Simon6809 and on that
>computer, these addresses (FFFE & FFFF) are clearly ROM locations. From a
>computer user perspective, the exact mechanism of this is completed before
>you could do anything meaningful on the system. On both a CoCo or Simon6809,
>you can't write to these locations.
>
>I'm glad I asked this question as it really helps me appreciate the
>complexities of hardware and all of the critical timing involved. It
>certainly reveals the elegance of system design. While learning 6809 ML, I
>can see how much more one needs to know about all of the combined hardware
>to write a Space Intruders or Zaxxon! My hats are off to all of you with
>that level of knowledge. Thanks everyone for your replies!
>
>Regards,
>-Mike Rowen
>
>
>
>On Sun, Feb 20, 2011 at 1:49 AM, John Kent <jekent at optusnet.com.au> wrote:
>
>> I suspect the vector is read into a temporary internal register then
>> transferred to the program counter as the program counter is used to fetch
>> the vector or at least it can be. The program counter would have to be
>> pre-initialized with all 1's in the high address bits and a interrupt vector
>> offset in address bits A3 to A1 on reset. I don't know if that is how
>> Motorola did it. I was a bit concerned about patents, but I think they have
>> all expired, so I don't think I'm violating anyone's patent. I'm certainly
>> not making any money out of it.
>>
>> John.
>>
>>
>>
>> On 20/02/2011 10:46 AM, Mike Rowen wrote:
>>
>>> Thanks everyone for your responses. Ok, so whenever the CPU powers on or
>>> experiences a RESET inturrupt, the CPU will read the contents of FFFE & FFFF
>>> and load it into the program counter register. It then fetches instructions
>>> from that location. Presumably this would be a location in ROM.
>>>
>>> How does an address get into FFFE & FFFF when the system is initialized?
>>> Is this through hardware? Are these RAM locations?
>>>
>>>
>> --
>> http://www.johnkent.com.au
>> http://members.optusnet.com.au/jekent
>>
>>
>> --
>> Coco mailing list
>> Coco at maltedmedia.com
>> http://five.pairlist.net/mailman/listinfo/coco
>>
>
>--
>Coco mailing list
>Coco at maltedmedia.com
>http://five.pairlist.net/mailman/listinfo/coco




More information about the Coco mailing list