ap515@cleveland.Freenet.Edu (Tom Wilson) (05/22/91)
Does anyone have the specifics on how to use the following GEOS routines: StashRAM, FetchRAM, SwapRAM, VerifyRAM, DoRAMOp In particular, I need to know which registers need to be used for these routines (r0-r15). Any information would be appreciated. Thanks. -- Tom Wilson ap515@cleveland.freenet.edu twtick@corral.uwyo.edu
rknop@nntp-server.caltech.edu (Robert Andrew Knop) (05/23/91)
ap515@cleveland.Freenet.Edu (Tom Wilson) writes: >Does anyone have the specifics on how to use the following GEOS >routines: StashRAM, FetchRAM, SwapRAM, VerifyRAM, DoRAMOp >In particular, I need to know which registers need to be used >for these routines (r0-r15). From the Hitchhiker's Guide: FetchRAM Funtion: Primitive for transferring data from an REU Parameters: r0 CBMDST - addrss in Commodore to put data (word) r1 REUSRC - addrss in REU bank to start reading (word) r2 COUNT - number of bytes to fetch (word) r3L REUBANK- REU bank number to fetch from (byte) Returns: r0-r3 unchanged x error code: $00 (no error) or DEV_NOT_FOUND a REU status byte and'ed with $60 ($40=successful fetch) Destroys: y StashRAM is identical to FetchRAM, only r0 is CBMSRC and r1 is REUDST; and, of course, data goes from the C= to the REU. SwapRAM is also identical, only r0 is CBMADDR and r1 is REUADDR (but what's in a name?) and the data is, as one would expect, swapped. DoRAMOp uses the same parameters, only it adds y as the REU command byte. The 'Guide entry also contains the following note: Note: On a C=128, if the VIC chip is mapped to the front RAM (with the MMU VIC bank pointer), the REU will read/write using front RAM. Similarly, if the VIC chip is mapped to back RAM, the REU will read/write using back RAM. The REU ignores the standard bank seleton controls on the 8510. GEOS128 defaults with the VIC mapped to front RAM. The 'Guide says that all four of these routines are "use-at-your-own-risk" GEOS primitives. However, I know from my own investigations that at least the REU Rboot code uses them, so they are probably reliable. Enjoy. -Rob Knop rknop@tybalt.caltech.edu