Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!mailrus!ncar!mephisto!ncsuvx!news From: rnf@shumv1.uucp (Rick Fincher) Newsgroups: comp.sys.apple Subject: Re: Really small question Message-ID: <1989Dec15.200302.8233@ncsuvx.ncsu.edu> Date: 15 Dec 89 20:03:02 GMT References: <9542@microsoft.UUCP> Reply-To: rnf@shumv1.ncsu.edu (Rick Fincher) Organization: NCSU Computing Center Lines: 35 In article <9542@microsoft.UUCP> brianw@microsoft.UUCP (Brian Willoughby) writes: >rnf@shumv1.ncsu.edu (Rick Fincher) writes: >>gt0t+@andrew.cmu.edu (Gregory Ross Thompson) writes: >>> >>> I'm working on a small ML program that does some SHR stuff in bank $00, >>>just to prep the screen, and stuff like that. I need to move all this >>>stuff into bank $E1 (obviously). Will the move routine at $FE20 move >>>memory across banks? >>> >>> Also, is there an easy way to store with STA into bank E1? >> >>You can move the data by turning shadowing on then LDA and STA each >>word back to its original location. This puts the data in bank E1 >>and is faster than the memory moves you were talking about, if you >>keep your loop overhead low. > >Hey, this has to be a GS if you are using SHR? (Unless you have a Video >Overlay card) Why not just use the 24 bit address features of the 65C816? > >There are a couple of ways of doing this. You could reload the Data Bank >register before doing the bank $00 prep, and then the stuff would already be >in bank $E1. I think you would do LDA #01 (or $E1), PHA, PLB. After selecting [several other suggestions follow] If you write directly into $E1 you do so at 1mhz. The mvn instruction is fast but because of the way the writes to $E1 are slowed to 1mhz I think it is still faster to just read a word into a 16 bit register and write it back to the same location. No bank boundaries are crossed sio extra cycles are added for that, and shadowing lets the hardware do the actual copies. I think the Apple guys added up all of the cycles and determined that this was the fastest way to do this (Matt, Dave?). Rick Fincher rnf@shumv1.ncsu.edu