Path: ns-mx!uunet!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!copper!slate!gdesroch From: gdesroch@slate.mines.colorado.edu (DESROCHERS GARY FREDERIC) Newsgroups: comp.sys.apple2 Subject: Re: Memory Moving Message-ID: <1992Mar08.181819.17378@slate.mines.colorado.edu> Date: 8 Mar 92 18:18:19 GMT References: <1992Mar8.121259.2394@nntp.uoregon.edu> Organization: Colorado School of Mines Lines: 46 nparker@cie.uoregon.edu (Neil Parker) writes: : In article qd@pro-calgary.cts.com (Quinn Dunki) writes: : >Could somebody please instruct me on the use of the opcodes MVP and MVN? : >Based on the descriptions in my books, I haven't gotten them to work yet. : : When either instruction is finished, it leaves the data bank register : pointing at the destination bank. : : CLC ;Make sure we're in 16-bit native mode : XCE : REP #$30 : LDX #$2345 ;Source location : LDY #$6789 ;Destination location : LDA #$03FF ;Number of bytes minus 1 : MVN $0102 ;Move from bank 1 to bank 2 (note flipped operand bytes) Since I had a problem with these when I started using them I will add something to this. Neil did explain this but didn't put it into his code. CLC XCE REP #$30 PHB LDX #$2345 LDY #$6789 LDA #$03FF MVN $0102 PLB Of course if your data is in the same bank you are programming out of do just a PHK then a PLB at the end. If you are used to taking care of where your data bank is then ignore the above and just do it the way you normally do it. As to using the MVP instruction, I never really found much use for it either. It is kinda easier to think forward then backwards. I guess I always think of the MVN first also. : Neil Parker No cute ASCII art...no cute quote...no cute : nparker@cie.uoregon.edu disclaimer...no deposit, no return... : parker@corona.uoregon.edu (This space intentionally left blank: ) -- --------------------------------------------------------------------- Gary F. Desrochers INTERNET: gdesroch@slate.mines.colorado.edu GENIE: G.Desrochers Any comments/complaints on Disk Witch tell me. Apple II Forever!!