!lm12
!rm75
Clarification on Loading the RAM Card...........Paul Schlyter

Last month Bob S-C told how to use an EXEC command file without ENDing an Applesoft program.  His example may have obfuscated the process of loading a file into a RAM card, because it really is not necessary to use an EXEC file for this purpose.

You can BLOAD into the RAM card without leaving Applesoft, contrary to Bob's information, by merely write-enabling it.  The soft-switches $C081 and $C089 write-enable the RAM card (with bank 2 or bank 1 at $D000, respectively), leaving the motherboard ROMs read-enabled.  This means everything you write goes into the RAM card, and everything you read comes from the motherboard ROMs.  Thus you can simply BLOAD into the RAM card, and BLOAD will write to those addresses.

Here is a short program that loads the whole 16K RAM card, all from within a running Applesoft program, without EXEC files.

!lm+5
100 D$ = CHR$ (4)
110 B2 = 49281 : REM $C081 -- SELECT BANK TWO
120 B1 = 49289 : REM $C089 -- SELECT BANK ONE
130 P = PEEK(B2) + PEEK(B2) : REM WRITE ENABLE BANK TWO
140 PRINT D$"BLOAD LC.BANK 2"
150 P = PEEK(B1) + PEEK(B1) : REM WRITE ENABLE BANK ONE
160 PRINT D$"BLOAD LC.BANK 1"
!lm-5

[ Note from Bob S-C:  My face is red!  Paul will note that I modified his program above in lines 130 and 150.  He wrote "130 POKE B2, PEEK(B2)" and similarly for line 150.  However, some RAM cards, such as my Andromeda board, will disable write-enable if the soft-switches are addressed during a write-cycle.  The POKE does just that; therefore, I changed 130 and 150 to do two PEEKs in a row.  Further, I recall when working with a Corvus drive last year that BLOADing from a Corvus into the RAM card did not work unless a monitor had already been copied into the space from $F800-$FFFF. ]
