home *** CD-ROM | disk | FTP | other *** search
/ 8bitfiles.net/archives / archives.tar / archives / genie-commodore-file-library / C64-128Toolkit / CONFIGUR.TXT < prev    next >
Encoding:
Text File  |  2019-04-13  |  18.9 KB  |  816 lines

  1. 1.3  CONFIGURING MEMORY IN THE C-128
  2.  
  3.  
  4.  
  5.  
  6.  
  7.      The C-128 uses an 8502 eight bit microprocessor.  The 8502 is only
  8.  
  9. capable of accessing 64K bytes of memory at any one time.  In order to allow
  10.  
  11. the 8502 to access different combinations of RAM and ROM in that 64K space, a
  12.  
  13. technique of reconfiguring the memory was designed.  This technique enables the
  14.  
  15. computer to configure the memory in such a way to allow the 8502 to be able to
  16.  
  17. see or access different layers or sections of memory  (this will be discussed
  18.  
  19. in more detail later).
  20.  
  21.  
  22.  
  23.      The term 'BANK' is alittle misleading when discussing how the 8502
  24.  
  25. can access different 'MEMORY CONFIGURATIONS' in the 128.  A 'BANK' is nothing
  26.  
  27. more than a 'MEMORY CONFIGURATION' that can be accessed by the BASIC BANK
  28.  
  29. command.  There are 256 possible memory configurations which can be accessed
  30.  
  31. by the 8502 through the use of the registers in the MMU in the 128.  However,
  32.  
  33. only sixteen of these memory configurations are supported by the BASIC
  34.  
  35. operating system when utilizing the BASIC BANK command.  These sixteen memory
  36.  
  37. configurations are named BANK 0 through BANK 15.  Out of these sixteen, four of
  38.  
  39. the so called 'BANKS' are used at the present time: BANK 0, BANK 1, BANK 14,
  40.  
  41. and BANK 15.  RAM BANKs 1 and 2 are not available on the C-128, the hardware
  42.  
  43. was not installed. The expansion RAM that is currently available is not RAM
  44.  
  45. BANK 2 and/or 3, it is an external memory device that stores memory in a
  46.  
  47. different manor then the ram inside the C-128. For more information on the
  48.  
  49. external ram expansion module refer to the section on RAM EXPANSION in this
  50.  
  51. book. 
  52.  
  53.  
  54.  
  55.      For the purpose of discussion in the text that follows, we will stick to
  56.  
  57. the term 'MEMORY CONFIGURATIONS' except, when the term 'BANK' refers to a 
  58.  
  59. BASIC BANK accessible by the BASIC BANK command.
  60.  
  61.  
  62.  
  63.      The thing that makes different memory configurations possible in the C-128
  64.  
  65. is a custom chip called the Memory Management Unit or MMU (8722).  The MMU
  66.  
  67. along with another chip called the Programmable Logic Array or PLA (8721)
  68.  
  69. provide the C-128 with the capability of operating in the C-64 mode, the C-128
  70.  
  71. mode, and the CP/M mode.  The MMU however, is the main controlling chip
  72.  
  73. that performs the job of managing the memory.
  74.  
  75.  
  76.  
  77.      The MMU has 11 registers located at memory locations $D500 - $D50B
  78.  
  79. which are used by the operating system to configure the MMU for the mode or
  80.  
  81. operation that is to be performed.  These registers, their memory loctions,
  82.  
  83. and their functions, are contained in the table below.
  84.  
  85.  
  86.  
  87.  
  88.  
  89.                           [INSERT TABLE 1.3 HERE]
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.      As you may have probably noticed, the registers that are located at
  98.  
  99. $D500 - $D504 are also copied to locations $FF00 - $FF04.  These memory
  100.  
  101. locations in the C-128 mode will always reflect what is in the registers at
  102.  
  103. $D500 - $D504. This allows for entering into other memory configurations even
  104.  
  105. if the I/O block from $D000 - $DFFF is switched out.
  106.  
  107.  
  108.  
  109.  
  110.  
  111. 1.3.1  THE CONFIGURATION REGISTER  (CR)
  112.  
  113.  
  114.  
  115.  
  116.  
  117.      The Configuration Register (CR) for the MMU is located at $D500.  This
  118.  
  119. register is the main register that allows the MMU to set up memory for up to
  120.  
  121. 256 different memory configurations.  The value that is stored in register is 
  122.  
  123. also stored at $FF00.  This location ($FF00) provides a means of reconfiguring
  124.  
  125. the memory independent of which memory configuration you are in.  If a value is
  126.  
  127. stored to location $D500, the value will also appear in location $FF00.  If a
  128.  
  129. value is stored in location $FF00, the value will also appear in location
  130.  
  131. $D500. If either of these locations is read, the value that is returned is the
  132.  
  133. current value that is stored in the Configuration Register at $D500.
  134.  
  135.  
  136.  
  137.      Each bit in location $D500 has the job of determining what will appear
  138.  
  139. in the particular area of memory that it controls.  The values of these
  140.  
  141. bits and their functions are contained in the following table.
  142.  
  143.  
  144.  
  145.  
  146.  
  147.  
  148.  
  149. BIT BEING DESCRIBED         LOCATIONS AFFECTED      SWITCH REPRESENTATION
  150.  
  151. -------------------------------------------------------------------------
  152.  
  153.  
  154.  
  155.  
  156.  
  157.         BIT 0                 $D000 - $DFFF          S4 POSITION
  158.  
  159. ----------------------------------------------------------------------
  160.  
  161.  
  162.  
  163.           0 = I/O                                      POS A
  164.  
  165.           1 = CHARACTER ROM/SELECTED RAM BANK          POS B
  166.  
  167.  
  168.  
  169.  
  170.  
  171.         BIT 1                 $4000 - $7FFF          S1 POSITION
  172.  
  173. -----------------------------------------------------------------------
  174.  
  175.  
  176.  
  177.           0 = BASIC ROM LOW                            POS A
  178.  
  179.           1 = SELECTED RAM BANK                        POS B
  180.  
  181.  
  182.  
  183.  
  184.  
  185.         BITS 3 AND 2          $8000 -$BFFF           S2 POSITION
  186.  
  187. -----------------------------------------------------------------------
  188.  
  189.  
  190.  
  191.          3    2
  192.  
  193.         ---  ---
  194.  
  195.          0    0 = BASIC ROM HIGH                       POS A
  196.  
  197.          0    1 = INTERNAL FUNCTION ROM                POS B
  198.  
  199.          1    0 = EXTERNAL FUNCTION ROM                POS C
  200.  
  201.          1    1 = SELECTED RAM BANK                    POS D
  202.  
  203.  
  204.  
  205.  
  206.  
  207.         BITS 5 AND 4          $C000 - $FFFF          S3a AND S3b POSITION
  208.  
  209.                           (except $D000 - $DFFF)
  210.  
  211. -------------------------------------------------------------------------
  212.  
  213.  
  214.  
  215.          5    4
  216.  
  217.         ---  ---
  218.  
  219.          0    0 = KERNAL ROM                           POS A
  220.  
  221.          0    1 = INTERNAL FUNCTION ROM                POS B
  222.  
  223.          1    0 = EXTERNAL FUNCTION ROM                POS C
  224.  
  225.          1    1 = SELECTED RAM BANK                    POS D
  226.  
  227.  
  228.  
  229.  
  230.  
  231.         BITS 7 AND 6          SELECTED RAM BANK   (see NOTE)
  232.  
  233. --------------------------------------------------------------------------
  234.  
  235.  
  236.  
  237.          7    6
  238.  
  239.         ---  ---
  240.  
  241.          0    0 = RAM BANK 0
  242.  
  243.          0    0 = RAM BANK 1
  244.  
  245.          1    0 = RAM BANK 2  (NOT AVAILABLE)
  246.  
  247.          1    1 = RAM BANK 3  (NOT AVAILABLE)
  248.  
  249.  
  250.  
  251.  
  252.  
  253. NOTE: the RAM BANK that is selected by these bits is what appears where the
  254.  
  255.       SELECTED RAM BANK note appears
  256.  
  257.  
  258.  
  259.  
  260.  
  261.      The SWITCH REPRESENTATION  that appears in the table represents the
  262.  
  263. position of that particular switch in the diagram below if the bit value is
  264.  
  265. as noted.  For instance, if BIT 1 in the CR ($D500) contained a value of 0,
  266.  
  267. then S1 would be in POS A, thereby selecting the BASIC ROM LOW for the area
  268.  
  269. of memory $4000 - $7FFF.
  270.  
  271.  
  272.  
  273.  
  274.  
  275.  
  276.  
  277.  
  278.  
  279.  
  280.  
  281.  
  282.  
  283.                           [rEFER TO table.txt  HERE]
  284.  
  285.  
  286.  
  287.  
  288.  
  289.  
  290.  
  291.  
  292.  
  293.  
  294.  
  295.      To better illustrate the use of this table and the diagram pictured
  296.  
  297. above, let's take the value $10 and show how the table and the diagram can
  298.  
  299. better help you to understand the different memory configurations and the way
  300.  
  301. that the MMU is capable of configuring memory through the use of the
  302.  
  303. Configuration Register.
  304.  
  305.  
  306.  
  307.      First of all, convert the HEX value into its binary equivalent.  The
  308.  
  309. HEX value of $10 converted to binary is %00010000.  Therefore, the
  310.  
  311. following memory configuration would be selected and the switches in the
  312.  
  313. diagram would be in the following positions.  Since BIT 0 contains a value
  314.  
  315. of 0, this means that S4 would be in POSition A, thereby, selecting I/O for
  316.  
  317. the area of memory $D000 - $DFFF.  Since BIT 1 contains a value of 0, this
  318.  
  319. means that S1 would be in POSition A, thereby, selecting BASIC ROM LOW for
  320.  
  321. the area of memory $4000 - $7FFF.  Since BITS 3 and 2 both contain a value
  322.  
  323. of 0, this means that S2 would be in POSition A, thereby, selecting BASIC
  324.  
  325. ROM HIGH for the area of memory $8000 - $BFFF.  Since BIT 5 contains a
  326.  
  327. value of 0 and BIT 4 contains a value of 1, this means that both S3a and
  328.  
  329. S3b would be in POSition B, thereby, selecting INTERNAL FUNCTION ROM for
  330.  
  331. the area of memory $C000 - $FFFF except, the area of memory $D000 - $DFFF
  332.  
  333. which was defined for the use of I/O by BIT 0.  The last two bits, BITS 7
  334.  
  335. and 6, do not have a corresponding switch.  However, the result of the
  336.  
  337. values stored in these two bit locations determines which RAM BANK will
  338.  
  339. appear in those areas of memory that have RAM selected for them.  Since
  340.  
  341. BITS 7 and 6 both contain a value of 0, then RAM BANK 0 is selected.
  342.  
  343.  
  344.  
  345.      In APPENDIX G, what has been discussed here is in one big table.  The
  346.  
  347. table gives the 256 memory configurations that are possible if each of the
  348.  
  349. values from $00 to $FF were to be placed into the CR at $D500 or $FF00.
  350.  
  351.  
  352.  
  353.  
  354.  
  355.  
  356.  
  357. 1.3.2  THE PRECONFIGURATION REGISTERS  (PCR)
  358.  
  359.  
  360.  
  361.  
  362.  
  363.      The Preconfiguration Registers are located at $D501 - $D504 and a copy
  364.  
  365. of these registers appear in the Load Configuration Registers (LCR) at
  366.  
  367. $FF01 - $FF04.  Upon power up, PCRA - PCRD ($D501 - $D504) are initialized
  368.  
  369. with the following memory configuration values: $D501 = $3F (BANK 0),
  370.  
  371. $D502 = $7F (BANK 1), $D503 = $01 (BANK 14), and $D504 = $41 (BANK 14 with RAM
  372.  
  373. BANK 1).  These values represent the four memory configurations that the
  374.  
  375. operating system uses in its routines for its own internal processing.
  376.  
  377. However, these four registers can be programmed to any four memory
  378.  
  379. preconfigurations that the user wants.  For instance, if for some reason you
  380.  
  381. wanted to program all of the Preconfiguration Registers to contain the value
  382.  
  383. for BANK 15, the following short machine language routine would do the trick.
  384.  
  385. (NOTE: If you use this routine, BASIC will no longer function because you will
  386.  
  387. have changed the memory configuration values that the BASIC operating system
  388.  
  389. uses for its internal processing.)
  390.  
  391.  
  392.  
  393.  
  394.  
  395.  
  396.  
  397.                   LDA  #$00       ;Load the accumulator with the value
  398.  
  399.                                   ;For BANK 15
  400.  
  401.                   TAY             ;Zero the index register
  402.  
  403.         LOOP      STA  $D501,Y    ;Store the value for BANK 15 in
  404.  
  405.                                   ;The Preconfiguration Register
  406.  
  407.                   INY             ;Increment the index
  408.  
  409.                   CPY  #$04       ;Are all the registers done?
  410.  
  411.                   BNE  LOOP       ;If they are not, then branch
  412.  
  413.  
  414.  
  415.  
  416.  
  417.      After all of the Preconfiguration Registers have been set to the memory 
  418.  
  419. configuation value for BANK 15, you will find that the Load Configuration
  420.  
  421. Registers at $FF01 - $FF04 will also contain the memory configuration value
  422.  
  423. for BANK 15.  Anytime a PCR is changed, the corresponding LCR is also changed
  424.  
  425. to reflect the same value.  However, if you try to store a value to any of the
  426.  
  427. LCRs at $FF01 - $FF04, the value in the LCR does not change.  Instead, what
  428.  
  429. occurs is that the value that is stored in the corresponding PCR is moved to
  430.  
  431. the Configuration Register at $D500 and $FF00.  For instance, if you execute
  432.  
  433. the following:
  434.  
  435.  
  436.  
  437.  
  438.  
  439.                   STA $FF02        ;Store the accumulator to $FF02
  440.  
  441.                                    ;(the value in the accumulator is
  442.  
  443.                                    ;irrelevant)
  444.  
  445.  
  446.  
  447.  
  448.  
  449. The value that is in PCRB at $D502 will be moved into the CR at $D500 and
  450.  
  451. $FF00.  Anytime that a read is made of an LCR, the value returned is that
  452.  
  453. value which is stored in the cooresponding PCR.  For instance, if you read
  454.  
  455. the contents of $FF01, the value that is returned is the value that is
  456.  
  457. stored in location $D501.  However, if you read the contents of a PCR, the
  458.  
  459. value that will be returned will be the value in thE pcr.
  460.  
  461.  
  462.  
  463.      cONSEQUENTLY, THERE ARE THREE WAYS TO SWITCH TO DIFFERENT MEMORY
  464.  
  465. CONFIGURATIONS: STORE THE VALUE FOR THE MEMORY CONFIGURATION DESIRED INTO    
  466.  
  467. LOCATION $ff00, STORE THE VALUE FOR THE MEMORY CONFIGURATION DESIRED INTO
  468.  
  469. LOCATION $d500, OR STORE ANY VALUE TO THE CORRESPONDING lcr ($ff01 - $ff04)
  470.  
  471. OF THE pcr ($d501 - $d504) THAT CONTAINS THE VALUE OF THE MEMORY CONFIGURATION
  472.  
  473. DESIRED.  iF YOU SHOULD DEFINE A MEMORY CONFIGURATION THAT SWITCHES OUT THE
  474.  
  475. i/o BLOCK, THEN THE ONLY WAY TO SWITCH TO A DIFFERENT MEMORY CONFIGURATION IS
  476.  
  477. TO STORE THE VALUE OF THE MEMORY CONFIGURTION TO SWITCH TO IN THE cONFIGURATION
  478.  
  479. rEGISTER AT $ff00 OR STORE ANY VALUE TO THE CORRESPONDING lcr ($ff01 - $ff04)
  480.  
  481. OF THE pcr ($d501 - $d504) THAT CONTAINS THE VALUE OF THE MEMORY CONFIGURATION
  482.  
  483. DESIRED.
  484.  
  485.  
  486.  
  487.  
  488.  
  489.  
  490.  
  491. 1.3.3  the mode configuration register  (mcr)
  492.  
  493.  
  494.  
  495.  
  496.  
  497.      tHE mODE cONFIGURATION rEGISTER (mcr) IS LOCATED AT $d505.  iTS MAIN
  498.  
  499. FUNCTION IS TO SET UP THE COMPUTER MODE TO BE USED.  tHEREFORE, IT CONTROLS
  500.  
  501. WHICH MICROPROCESSOR IS TO BE ACTIVE (8502 OR z80a). bIT 7, AND BITS 5 THRU
  502.  
  503. 3 FUNCTIONS AS A BIDIRECTIONAL PORT, IF A VALUE IS WRITTEN TO THE PORT, THE
  504.  
  505. HARDWARE LINE WILL REFLECT WHATEVER VALUE THAT WAS WRITTEN, AND IF THE BIT
  506.  
  507. IS READ THEN THE VALUE THAT WAS WRITTEN WILL BE RETURNED.  iF A DEVICE
  508.  
  509. CONNECTED TO THE HARDWARE LINE IS PULLING THIS LINE LOW THEN THE VALUE THAT
  510.  
  511. WAS PREVIOULY SET WILL BE RETURNED WITH A READ. eACH ONE OF THESE LINES CAN
  512.  
  513. ONLY BE BROUGHT LOW BY A DEVICE AND NOT HIGH, THEREFORE IF YOU BRING ONE OF
  514.  
  515. THESE LOCATIONS LOW BY CLEARING THE BIT, YOU WILL NOT BEABLE TO DETECT THE
  516.  
  517. LOCATION BEING BROUGHT 'HIGH'. tHE FUNCTION OF EACH BIT OF THE mcr IS AS
  518.  
  519. FOLLOWS:
  520.  
  521.  
  522.  
  523.  
  524.  
  525. bit 7     iNDICATES WHAT THE STATUS OF THE 40/80 COLUMN KEY WAS AT RESET
  526.  
  527.           (0 = 80 COLUMN, 1 = 40 COLUMN)
  528.  
  529.  
  530.  
  531. bit 6     iNDICATES WHICH MODE IS ACTIVE  (0 = 128 MODE, 1 = 64 MODE)
  532.  
  533.           (SEE THE SECTION ON autobooting FOR AN EXAMPLE OF SWITCHING INTO
  534.  
  535.            THE 64 MODE AND RUNNING A PROGRAM FROM THE 128 MODE)
  536.  
  537.  
  538.  
  539. bits 5,4  tHESE BITS INDICATE THE STATUS OF THE game AN exromin LINES.  iF
  540.  
  541.           THESE LINES ARE BEING USED, THEN THE COMPUTER SWITCHES INTO THE
  542.  
  543.           64 MODE FOR THE 64 CARTRIDGE.  tHESE LINES ARE NOT USED IN THE
  544.  
  545.           128 MODE.
  546.  
  547.  
  548.  
  549. bit  3    tHIS BIT IS USED AS THE fsdir CONTROL BIT FOR THE FAST SERIAL
  550.  
  551.           DATA BUFFER.  iT IS ALSO USED AS THE INPUT BIT FOR THE DISK ENABLE
  552.  
  553.           SIGNAL.
  554.  
  555.  
  556.  
  557. bits 2,1  nOT USED
  558.  
  559.  
  560.  
  561. bit 0     tHIS BIT ALLOWS THE SELECTION OF ONE OF THE TWO PROCESSORS
  562.  
  563.           (0 = z80a, 1 = 8502)
  564.  
  565.  
  566.  
  567.  
  568.  
  569.  
  570.  
  571.      tHE FOLLOWING PROGRAM IS AN EXAMPLE ON HOW TO TEST FOR THE 40/80
  572.  
  573. DISPLAY KEY. tHE PROGRAM WILL ENABLE YOU TO TEST THE KEY CLOSURE AND
  574.  
  575. IF THE KEY IS IN THE 80 COLUMN POSITION IT WILL CHANGE THE PROCESSOR
  576.  
  577. SPEED TO 2 mhZ WHICH IS THE fast MODE AND IF THE 40 COLUMN POSITION
  578.  
  579. IS SELECTED THEN THE slow MODE IS ENABLED. tO USE THIS EXAMPLE JUST
  580.  
  581. ENTER THE FOLLOWING PROGRAM AND sys dec("0c00"), OR run"mcr example"
  582.  
  583. WHICH WILL LOAD UP THE PROGRAM FOR YOU AND 'run' IT.
  584.  
  585.  
  586.  
  587.  
  588.  
  589. 10 ln=1000:a=dec("0c00")
  590.  
  591. 20 fori=atoa+50step8
  592.  
  593. 30 forj=0to7:readd$
  594.  
  595. 40 v=dec(d$)
  596.  
  597. 50 pokei+j,v:ck=ck+v
  598.  
  599. 60 nextj
  600.  
  601. 70 readck$:if(ckand255)<>dec(ck$)thenprint"error in line "ln:goto140
  602.  
  603. 80 ln=ln+10
  604.  
  605. 90 ck=0:nexti
  606.  
  607. 100 print"do you want to save this program ?"
  608.  
  609. 110 getkeya$:ifa$="n"then 130
  610.  
  611. 120 bsave "mcr example.o",b0,p3072 to p3123
  612.  
  613. 130 print"type 'sys 3072' to activate"
  614.  
  615. 140 end
  616.  
  617. 1000 data 78,a9,0d,a0,0c,8d,14,03, 7e
  618.  
  619. 1010 data 8c,15,03,58,60,ad,05,d5, e3
  620.  
  621. 1020 data 09,80,8d,05,d5,ad,00,ff, 9c
  622.  
  623. 1030 data 48,a9,00,8d,00,ff,2c,05, ae
  624.  
  625. 1040 data d5,30,05,20,b3,77,d0,03, 27
  626.  
  627. 1050 data 20,c4,77,68,8d,00,ff,4c, 9b
  628.  
  629. 1060 data 65,fa,3b,67,65,74,a0,74, ee
  630.  
  631.  
  632.  
  633.  
  634.  
  635. 1.3.4  the ram configuration register  (rcr)
  636.  
  637.  
  638.  
  639.  
  640.  
  641.      tHE rAM cONFIGURATION rEGISTER IS LOCATED AT $d506.  iTS MAIN FUNCTION
  642.  
  643. IS TO DEFINE THE COMMON USER AREAS.  tHESE AREAS ARE USED BY THE DIFFERENT
  644.  
  645. ROUTINES TO PASS INFORMATION BETWEEN DIFFERENT MEMORY CONFIGURATIONS.  wITHOUT
  646.  
  647. THESE COMMON AREAS, THE CONCEPT OF RECONFIGURING THE MEMORY WOULD NOT BE
  648.  
  649. POSSIBLE.  tHE DEFINITION FOR THE EACH BIT OF THIS REGISTER IS AS FOLLOWS:
  650.  
  651.  
  652.  
  653.  
  654.  
  655. bits 7,6   tHESE TWO BITS DETERMINE WHERE THE ram FOR THE vic CHIP WILL
  656.  
  657.            APPEAR FOR THE STORAGE OF TEXT AND GRAPHICS.  tHE VIDEO ram IS
  658.  
  659.            USUALLY LOCATED IN bank 0.
  660.  
  661.  
  662.  
  663.            7    6
  664.  
  665.           ---  ---
  666.  
  667.            0    0 = ram bank 0
  668.  
  669.            0    1 = ram bank 1
  670.  
  671.            1    0 = ram bank 2  (not available)
  672.  
  673.            1    1 = ram bank 3  (not available)
  674.  
  675.  
  676.  
  677. bits 5,4   tHESE TWO BITS ARE UNUSED
  678.  
  679.  
  680.  
  681. bits 3,2   tHESE TWO BITS INDICATE IF THERE IS A COMMON USER AREA AND IF
  682.  
  683.            THERE IS, WHERE THAT AREA IS LOCATED.
  684.  
  685.  
  686.  
  687.            3    2
  688.  
  689.           ---  ---
  690.  
  691.            0    0 = no common area is shared
  692.  
  693.            0    1 = the lower ram area is shared
  694.  
  695.            1    0 = the upper ram area is shared
  696.  
  697.            1    1 = both the upper and the lower ram areas are shared
  698.  
  699.  
  700.  
  701. bits 1,0   tHESE TWO BITS DETERMINE THE SIZE OF THE COMMON ram AREAS IF
  702.  
  703.            THERE ARE ANY COMMON AREAS.
  704.  
  705.  
  706.  
  707.            1    0
  708.  
  709.           ---  ---
  710.  
  711.            0    0 =  1k of ram is common
  712.  
  713.            0    1 =  4k of ram is common
  714.  
  715.            1    0 =  8k of ram is common
  716.  
  717.            1    1 = 16k of ram is common
  718.  
  719.  
  720.  
  721.  
  722.  
  723.    fOR EXAMPLE, THE VALUE OF THIS LOCATION UPON POWER UP IS $04 OF WHOSE BINARY
  724.  
  725. EQUIVALENT IS %00000100.  bITS 4-0 ARE THE CONTROL BITS WHICH DETERMINE WHETHER
  726.  
  727. OR NOT THERE IS A COMMON USER AREA AND WHERE THAT COMMON USER AREA IS LOCATED.
  728.  
  729. fIRST, SINCE bit 3 CONTAINS A 0 AND bit 2 CONTAINS A 1, THE COMMON USER AREA
  730.  
  731. IS DEFINED AS BEING IN THE LOWER ram AREA IN ALL OF THE MEMORY CONFIGURATIONS.
  732.  
  733. sECONDLY, SINCE bits 1 AND 0 BOTH CONTAIN A 0, THIS DEFINES A COMMON USER AREA
  734.  
  735. SIZE OF 1k.  cONSEQUENTLY, THE FINAL RESULT THAT THE VALUE OF $04 IN THE rcr
  736.  
  737. ($d506) HAS UPON THE COMMON USER AREA IS THAT IT DEFINES A 1k AREA IN THE LOWER
  738.  
  739. ram FROM $0000 - $03ff IN ALL OF THE MEMORY CONFIGURATIONS.  iT IS POSSIBLE TO
  740.  
  741. HAVE A TOTAL OF 32k OF COMMON USER AREA IF A SIZE OF 16k IS SELECTED AND BOTH
  742.  
  743. THE UPPER AND LOWER COMMON USER AREAS ARE ENABLED.  tHE VALUE FOR THIS TYPE OF
  744.  
  745. COMMON USER AREA CONFIGURATION WOULD BE $0f.
  746.  
  747.  
  748.  
  749.  
  750.  
  751. 1.3.5  the page pointers
  752.  
  753.  
  754.  
  755.  
  756.  
  757.      tHE pAGE-zERO AND pAGE oNE POINTERS ARE LOCATED IN $d507/$d508 AND
  758.  
  759. $d509/$d50a RESPECTIVELY.  tHESE REGISTERS ARE USED WHEN YOU WISH TO MOVE
  760.  
  761. EITHER pAGE zERO OR pAGE oNE.
  762.  
  763.  
  764.  
  765.  
  766.  
  767.             $d507   p0l    page zero pointer lsb
  768.  
  769.             $d508   p0h    page zero pointer msb
  770.  
  771.  
  772.  
  773.             $d509   p1l    page one pointer lsb
  774.  
  775.             $d50a   p1h    page one pointer msb
  776.  
  777.  
  778.  
  779.  
  780.  
  781.  
  782.  
  783.  
  784.  
  785. 1.3.6  the version register  (vr)
  786.  
  787.  
  788.  
  789.  
  790.  
  791.      tHE vERSION rEGISTER IS LOCATED AT $d50b.  tHIS REGISTER IS A READ
  792.  
  793. ONLY REGISTER AND IS USED TO RETURN THE CODE THAT CONTAINS THE VERSION OF
  794.  
  795. THE mmu AND THE SIZE AND CAPABLILITY OF THE MEMORY THAT IS RESIDENT IN THE
  796.  
  797. SYSTEM.
  798.  
  799.  
  800.  
  801.  
  802.  
  803. bits 7-4    tHESE BITS CONTAIN THE CODE THAT REPRESENTS THE TOTAL AVAILABLE
  804.  
  805.             MEMORY SPACE.  nORMALLY THESE BITS CONTAIN A 2 FOR TWO 64k
  806.  
  807.             BLOCKS OF MEMORY FOR A TOTAL OF 128k OF MEMORY STORAGE.
  808.  
  809.  
  810.  
  811. bits 3-0    tHESE BITS CONTAIN THE CODE THAT REPRESENTS THE VERSION NUMBER OF
  812.  
  813.             THE mmu THAT IS IN THE c-128.
  814.  
  815.  
  816.