[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AUX memory question



In article <XN1l6.3027$7e6.1254088@homer.alpha.net>,
Dennis Jenkins  <dennis@usb.com> wrote:
>Hello,
>	I know that I can use the soft switches $c002 through $c005 to
>control if an I going to read or write to the 48K main/aux memory, but how
>do I gain access to the upper 16K of AUX memory (and then re-gain access 
>to the upper 16K of normal memory)?  I think the answer in the the address 
>range of $c080 through $c08f, but I don't understand what each of those 
>soft switches _really_ does.  I know that ProDOS lives in one of those 
>upper banks, and I have to be careful not to trash it.

Any reason you have to use PRODOS?  DOS 3.3 has a smaller footprint.
I don't think 8-bit Prodos uses any of the auxiliary memory, including
the language card space, but I'm not certain.

>	(I know about the AUXMOVE API found at $c311.  That isn't exactly
>what I want.  I need faster access to AUX memory, as I am using it to
>store hash tables.  AUXMOVE is way to slow.  I am writing my own custom
>AUX memory access functions.  I store them in the upper part of zero page.  
>My code has nothing to do with BASIC.SYSTEM, so I'm not worried about
>basic trashing my work areas.)

>	I currently have working code that lets me read/write single bytes
>(at a time, exactly what I want) to AUX range $0200 through $bfff.  I want 
>to be able to handle $c000 through $fffc.  Can I safely write random data 
>to AUX $fffe,$ffff?  I am not bothering to write to AUX $0000 through 
>$01ff.

I think you may have a problem because your auxiliary memory routines
are in the zero page, and IIRC the same switch (ALTZP) switches the zero
page and the language card.  Maybe you could use AUXMOVE to copy your
routines (or parts thereof) over to the alternate zero page.  Then
when you hit ALTZP you'd continue executing instead of crashing and burning.

I don't see why you couldn't write to AUX FFFE, FFFF -- the reset hardware
automatically switches to the main page, so it won't use the auxiliary
reset vector.  But it's been a long time since I worked with this
stuff and I don't have my manual at hand.

-- 
Matthew T. Russotto                                russotto@pond.com
"Extremism in defense of liberty is no vice, and moderation in pursuit
of justice is no virtue."