COMPUTE! ISSUE 37 / JUNE 1983 / PAGE 224
Vic
Contractor
Peter Lear
Using these two programs, you can
make expansion memory invisible to the VIC so unexpanded programs can
be run without removing the cartridge. There's also a short program to
access the 3K expansion area usually lost when an 8 or 16K cartridge is
employed.
Do you have some extra memory for your VIC that you don't always need?
Are you tired of yanking out that cartridge and putting it back? Do you
fear, that your edge connector might eventually wear itself out? Here's
the solution. Use these methods to "mask" cartridges from your VIC.
1. The 3K
expansion. This is easy, because all that happens is that an
empty memory block is filled. To forget this memory, just type in the
following:
POKE
44,16:POKE 4096,0:NEW
2. The 8K, 16K or
24K expanded VIC. This is not as easy because not only has empty
memory been filled in, but the VIC's screen has also moved. BASIC now
begins at 4608 ($1200), and the screen is where BASIC once was, 4096
($1000). Finally, the color locations for the screen now start at 37888
($9400). To fix all these alterations so that the VIC is unexpanded,
type in Program 1. Save a copy before running it (otherwise you will
need to type it again to use it). To get the memory back, just do a
cold start with SYS64802.
3. The 3K in
addition to 8K or 16K or 24K expanded VIC. With this setup, you
cannot see the 3K cartridge as BASIC memory. To make this arrangement
into a nonexpanded VIC, just use Program 1. The 3K block will still be
accessible for machine language. As with the other cartridge
arrangements, you also have access to any filled-in memory blocks
solely for machine language. Some applications require that the 3K
block be part of BASIC. Program 2 accomplishes this. Rather than type
in the whole thing, just modify Program 1.
For some VIC owners with expansion boards, these
programs are not necessary since the boards themselves have switches
which do the same thing. But these programs are useful for VIC owners
whose boards do not provide such switches and for those without boards.
Note: Super Expander owners should change the
following lines of Program 2:
130
POKE51,120:POKE52,29:POKE55,120:POKE56
,29:POKE646,6
150 PRINT"6519 BYTES FREE"
(This allows the function key labels to be protected.)
Program 1: Reset To Unexpanded VIC
100
POKE36866,150:POKE648,30:POKE36869,240
110 FORJ=217TO228:POKEJ,158:NEXT
120 FORJ=229TO250:POKEJ,159:NEXT
130
POKE51,0:POKE52,30:POKE55,0:POKE56,30:
POKE646,6
140 PRINT"{CLEAR}**** CBM BASIC
V2 ****"
150 PRINT"3583 BYTES FREE"
155
POKE243,154:POKE244,150:POKE642,16:POK
E644,30
160 FORI=4096TO5000:POKEI,0:NEXT
170 POKE
44,16:POKE46,16:POKE48,16:POKE50,1
6:NEW
Program 2: Reset To VIC With 3K Expansion
100
POKE36866,150:POKE648,30:POKE36869,240
110 FORJ=217TO228:POKEJ,158:NEXT
120 FORJ=229TO250:POKEJ,159:NEXT
130
POKE51,0:POKE52,30:POKE55,0:POKE56,30:
POKE646,6
140 PRINT"{CLEAR}**** CBM BASIC
V2 ****"
150 PRINT"6655 BYTES FREE"
155
POKE243,110:POKE244,150:POKE642,4:POKE
643,120:POKE644,29
160 FORI=1024TO1028:POKEI,0:NEXT
170
POKE44,4:POKE46,4:POKE48,4:POKE50,4