APPENDIX TWELVE 54017 D301 PORTB Since the XL and XE series no longer have a PORT B (on the 400/800 this controls joystick ports 3 and 4), this register is used for LED control (1200XL only) and memory management. You can disable the ROM between 49152-53247 ($C000-$CFFF) and 55296-65535 ($D800-$FFFF) by setting bit 0 to 0 (the ROM area becomes RAM; note that the area between $D000 and $D7FF remains intact). However, unless another OS has been provided, the system will crash at the next interrupt (1/60 sec- ond later!), so you need to disable the interrupts first. Bit 1 controls BASIC; if 0, BASIC is enabled, if 1, it is disabled and the 8K RAM space enabled for program use. If you disable BASIC within a BASIC program, you lock up. Disable BASIC dur- ing a boot operation by holding down the OPTION key. Bits 2 and 3 control the 1200XL LEDs; 0 means on, 1 means off. LED 1 means the keyboard is disabled; LED 2 means the inter- national character set is selected. In the 130XE, these bits are used for bank switching 16K blocks of RAM. The 130XE allows you to use the extra memory as video memory or program/ data memory. See the section on memory management in the 13OXE at the end of this chapter. Bits 4-6 are reserved (unused) in the XL and 65XE. Bits 4 and 5 in the 13OXE are used to enable bank switching (see below). Bit 7 controls the RAM region 20480-22527 ($5000-$57FF), nor- mally enabled 1). When disabled 0), the OS ROM in that area is enabled and access provided to the self-test code moved from 53248-55295 ($D000-$D7FF). Try this: POKE 54017,PEEK(54017)-128 to enable the self-test ROM. Now type X=USR(20480). The self-test screen appears. The RAM is reset on power-up or warm start. Of course, you can al- ways simply type BYE to enter the test routines as well. Here's a program from Joe Miller of Koala Technologies which copies portions (skips the $D000-$D7FF block) of the OS into RAM, disables the ROM, then moves the copied portion back: 100 REM RAMROM - Install RAMÄbased 110 REM OS in an XL computer 120 REM by Joe Miller 130 REM March 23, 1985 190 PRINT "MOVING OS INTO RAM" 200 FOR I=1536 TO 1635 210 READ B:POKE I,B:NEXT I 220 B=USR(1536) 230 PRINT CHR$(125) 240 PRINT "RAM OS INSTALLED"