VIC 20 6522 REGISTER USAGE 

 The following diagrams have been taken from "The Complete Commodore Inner
Space Anthology".

                                6522 VIA 1
        _______________________________________________________
$9110  |  DSR |  CTS |      |  DCD |  RI  |  DTR |  RTS | Data |  37136
       |  In  |  In  |      |  In  |  In  |  Out |  Out |  In  |
       |        RS-232 Interface or Parallel User Port         |
       |-------------------------------------------------------|
$9111  |                *Unused - see $911F                    |  37137
       |-------------------------------------------------------|
$9112  |        Data Direction Register B (for $9110)          |  37138
       |-------------------------------------------------------|
$9113  |        Data Direction Register A (for $911F)          |  37139
       |-------------------------------------------------------|
$9114  | T1-L                                                  |  37140
       |---             RS-232 Send Speed                   ---|
$9115  | T1-H                                                  |  37141
       |-------          Tape Write Timing              -------|
$9116  | T1-Latch L                                            |  37142
       |---                                                 ---|
$9117  | T1-Latch H                                            |  37143
       |-------------------------------------------------------|
$9118  | T2-L                                                  |  37144
       |---           RS-232 Input Timing                   ---|
$9119  | T2-H                                                  |  37145
       |-------------------------------------------------------|
$911A  |             Shift Register(* unused)                  |  37146
       |_______________________________________________________|
       |             |  T2  |      Shift         |      |      |
$911B  | T1 Control  | Ctrl |  Register Control  |PB LE |PA LE |  37147
       |_____________|______|____________________|______|______|
       |        CB2         | CB1  |        CA2         | CA1  |
$911C  |     RS-232 Send    | Ctrl |  Tape Motor Ctrl   | Ctrl |  37148
       |____________________|______|____________________|______|
       |      |      |      |RS-232|      |      |Restor|      |
$911D  | NMI  |  T1  |  T2  |  In  |      |      |  Key |      |  37149
       |______|______|______|______|______|______|______|______|
       | NMI  |  T1  |  T2  | CB1  |      |      | CA1  |      |
$911E  |Enable|Enable|Enable|Enable|      |      |Enable|      |  37150
       |______|______|______|______|______|______|______|______|
       | ATN  | Tape |          Joystick         |Serial|Serial|
$911F  | Out  | Sense| Fire | Left | Down |  Up  | Data |Clock |  37151
       |______|______|______|______|______|______|__In__|__In__|



                                6522 VIA 2
        _______________________________________________________
$9120  |Joystk|                    | Tape |                    |  37152
       | Right|                    |  Out |                    |
       |                 Keyboard Column Scan                  |
       |-------------------------------------------------------|
$9121  |                 Keyboard Row Scan                     |  37153
       |-------------------------------------------------------|
$9122  |        Data Direction Register B (for $9120)          |  37154
       |-------------------------------------------------------|
$9123  |        Data Direction Register A (for $9121)          |  37155
       |-------------------------------------------------------|
$9124  | T1-L                                                  |  37156
       |---             Cassette Tape Read                  ---|
$9125  | T1-H                                                  |  37157
       |-------       Keyboard, Cursor and Clock        -------|
$9126  | T1-Latch L                                            |  37158
       |---              Interrupt Timing                   ---|
$9127  | T1-Latch H                                            |  37159
       |-------------------------------------------------------|
$9128  | T2-L                 Serial Bus Timing                |  37160
       |---                   Tape R/W Timing               ---|
$9129  | T2-H                                                  |  37161
       |-------------------------------------------------------|
$912A  |             Shift Register(* unused)                  |  37162
       |_______________________________________________________|
       |             |  T2  |      Shift         |      |      |
$912B  | T1 Control  | Ctrl |  Register Control  |PB LE |PA LE |  37163
       |_____________|______|____________________|______|______|
       |     Serial Bus     | CB1  |    Serial Clock    | CA1  |
$912C  |     Data Out       | Ctrl |     Line Out       | Ctrl |  37164
       |____________________|______|____________________|______|
       |      |      |      | SRQ  |      |      | Tape |      |
$912D  | IRQ  |  T1  |  T2  |  In  |      |      |  In  |      |  37165
       |______|______|______|______|______|______|______|______|
       | IRQ  |  T1  |  T2  | CB1  |      |      | CA1  |      |
$912E  |Enable|Enable|Enable|Enable|      |      |Enable|      |  37166
       |______|______|______|______|______|______|______|______|
       |                                                       |
$912F  |                   *Unused (see $9121)                 |  37167
       |_______________________________________________________|
      

 Note: Where the above diagrams say "unused" for Port A, this probably means
 that KERNEL and BASIC don't directly deal with them. Remember though that
 that Port A is controlled at two address, one which uses a handshake and one
 which has no handshake. The contents of these two addresses should mirror
 each other.


