191. Uses of *SRWRITE on Master ~~~~~~~~~~~~~~~~~~~~~~~~~~ The *SRWRITE command is officially for the purpose of moving blocks of main memory into Sideways RAM slots. The complementary command is *SRREAD. Well, you can indeed use it in this way, but it can also be used for moving blocks of data around in main memory. The real advantage of using *SRWRITE is that apart from being a very simple command, it is very fast indeed. The syntax takes either of the two forms:- *SRWRITE or.. *SRWRITE + Note that in fact "finish" is actually the address of the first location AFTER the last byte to be moved, rather than of the last byte itself. You could, for example, move up to 16k of screen memory into sideways RAM, and then move it back again to restore the original screen contents. If you were using Mode 4, (not Shadow mode), then the command *SRWRITE 5800 8000 8000 5 will save the screen to bank 5. The command could also be used in the form *SRWRITE 5800+2800 8000 5 and the result would be identical. Personally I generally prefer this latter syntax. To restore the screen contents later, you would use the command *SRREAD with the identical syntax. There is yet another syntax form for these commands, but I won't go into them now. You couldn't save a 20k Mode 0 screen in one RAM bank, but you could save 16k of it, at the beginning, middle or end of the screen memory, or you could easily split it between two RAM banks, and use the spare 12k for something else. If you wished to move the screen memory into a reserved area of main memory, then you substitute the appropriate address for the final "8000" in the command examples given, and then the RAM slot number would be a dummy simply to satisfy the syntax - zero would be as good as any. To move the memory bank into the screen memory area, you use *SRWRITE again, not *SRREAD, and interchange the addresses as appropriate. I couldn't move a 16k Mode 4 screen into main memory, as I would have less than 16k free to start with, so here is an example with an 8k Mode 6 screen, to be stored at address &3000. *SRWRITE 6000+2000 3000 0 (copy screen memory to address &3000) *SRWRITE 3000+2000 6000 0 (copy original contents back to screen memory) alternatively: *SRWRITE 6000 8000 3000 0 and: *SRWRITE 3000 5000 6000 0 (See how the above syntax is simpler)