[Coco] Direct Page space under rom ...

jdaggett at gate.net jdaggett at gate.net
Tue Apr 19 12:01:15 EDT 2005


Kevin

Maybe this will help and then maybe it wont.

On the 6809 direct address mode takes the address byte supplied 
by code and the contents of the DP register to form a 16 bit 
address. The DP register then becomes the upper byte of the 16 bit 
address. Since the contents of the DP register can be altered with 
the TFR or EXG intrructions, you can place the direct page memory 
anywhere in memory on any 256 byte boundary. 

Normal Coco operations has the direct page at $00 to $FF. In that 
range only can you use direct adrress mode. IF you change the DP 
register to say $FE then the secondary vectors of the Coco 3 at 
$FE00 to $FEFF can be accessed via direct address mode.

Essentially altering the value of the DP registre should  only  affect 
where the MPU will use direct address mode. 

Becareful in switching the DP register. Make sure your code 
restores the DP register back to what it was before entering your 
program. One way of ensuring that the DP register is saved is push 
it on to the stack. Then before your program exits restore it from the 
stack.  


james


On 18 Apr 2005 at 21:26, Kevin Diggs wrote:

Date sent:      	Mon, 18 Apr 2005 21:26:56 -0700
From:           	Kevin Diggs <kevdig at hypersurf.com>
To:             	CoCoList for Color Computer Enthusiasts 
<coco at maltedmedia.com>
Subject:        	[Coco] Direct Page space under rom ...
Send reply to:  	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>

> Hi,
> 
>  I know this is going to shock you Boisy, but I have a CoCo question.
>  Is 
> there any space in the direct page under ROM Basic (the various 
> varieties)? Also can you change the DP in your ML routines under  ROM
> Basic. Put another way will the interrupts go haywire if you change
> it? I am pretty sure you have to put it back before returning to
> Basic.
> 
>      kevin
> 
> -- 
> Coco mailing list
> Coco at maltedmedia.com
> http://five.pairlist.net/mailman/listinfo/coco





More information about the Coco mailing list