Commodore 128 Programmer's Reference Manual page 481

Hide thumbs Also See for 128:
Table of Contents

Advertisement

j )
THE COMMODORE 128 OPERATING SYSTEM
471
n
1 ^
Bit 0 of both high-byte page pointers (0 and 1) corresponds to the RAM bank
number for any address access in page zero or one. The page zero high byte (bit 0)
r-j
normally overrides the RAM bank set by the configuration register. However, if
J |
common RAM (at the bottom of RAM bank 0) is specified, the high-byte pointer for
pages zero and one is ignored and pages zero and one appear in common RAM. Other-
^
wise, if common RAM is not allocated, pages zero and one appear where you specify
I I
according to the contents of the page pointers. In other words, common RAM takes priority
' !
over the page pointers, if common RAM is allocated by the RAM configuration register.
This feature of relocatable page zero and page one provides many benefits to the
p
programmer. This allows machine language programs to create several pages of zero
1 j
page variables or several different stacks. When you need to access the additional zero
page variables or extra 256 bytes of the stack, simply change the pointer to look at the
^
next page. This provides additional speed in your programs since you may use zero page
i ;
addressing for subsequent zero pages. You can even place zero page in screen memory
f [
for extra fast writing to the screen. In addition, it gives you a way to implement deeper
levels of subroutines since you have a larger stack area. Remember, though, to leave
r-i
three bytes on the top of the stack for interrupt requests and servicing.
THE SYSTEM VERSION REGISTER
H
The System Version Register, located in address $D50B, contains a value that tells the
!
user which version of the MMU is inside the C128 and how large the memory is. Bits 0
through 3 contain the MMU version number. Bits 4 through 7 contain a value (in
memory blocks) pertaining to the size of the C128 memory. This allows the programmer
to check the version of the C128 and the memory size, and make it compatible with
systems that will be expanded in the future. The current version of the C128 contains the
value $20, signifying two 64K blocks.
AUTO STARTING A ROM
APPLICATION CARTRIDGE
Many of you may want to place your application program in a cartridge which plugs into
the expansion port. In order to automatically start the program as soon as you turn on
the computer, you must place a particular coded sequence in the first 6 bytes where the
external (or internal) ROM cartridge maps into memory. Here's the auto start sequence
in both C128 and C64 modes.
COMMODORE 128 MODE
Any C64 cartridge is asserted automatically if the system recognizes the /GAME or
/EXROM as being pulled low.
If any C128 cartridges are installed into the expansion port:
!• Log the cartridge I.D. into the Physical Address Table (PAT).
2. If the I.D. equals 1, call the cold start vector (which may RTS).
! |

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents