cia.inc

     1:  CIA_O_PA       :=  0
     2:  CIA_O_PB       :=  1
     3:  CIA_O_DDRA     :=  2
     4:  CIA_O_DDRB     :=  3
     5:  CIA_O_TALO     :=  4
     6:  CIA_O_TAHI     :=  5
     7:  CIA_O_TBLO     :=  6
     8:  CIA_O_TBHI     :=  7
     9:  CIA_O_TOD10THS :=  8
    10:  CIA_O_TODSEC   :=  9
    11:  CIA_O_TODMIN   := 10
    12:  CIA_O_TODHR    := 11
    13:  CIA_O_SDR      := 12
    14:  CIA_O_ICR      := 13
    15:  CIA_O_CRA      := 14
    16:  CIA_O_CRB      := 15
    17:  
    18:  CIA_ICR_B_TA            := $01  ; bit: timer A underflow
    19:  CIA_ICR_B_TB            := $02  ; bit: timer B underflow
    20:  CIA_ICR_B_TOD           := $04  ; bit: TOD alarm
    21:  CIA_ICR_B_SP            := $08  ; bit: Serial port full/empty
    22:  CIA_ICR_B_FLAG          := $10  ; bit: external -FLAG
    23:  CIA_ICR_B_UNUSED        := $60
    24:  CIA_ICR_BR_IR           := $80  ; bit: any interrupt occurred (read-only)
    25:  CIA_ICR_BW_SET          := $80  ; bit: set (=1) or clear (=0) bit (write-only)
    26:  CIA_ICR_BW_UNSET        := $00  ;
    27:  
    28:  CIA_CRA_B_START         := $01  ; 1 = start timer A, 0 = stop timer A
    29:  CIA_CRA_B_PBON          := $02  ; 1 = timer A output appears on PB6, 0 = PB6 is not affected by timer
    30:  CIA_CRA_B_TOGGLE        := $04  ; PB6 output mode: 1 = toggle, 0 = pulse
    31:  CIA_CRA_B_ONESHOT       := $08  ; 1 = one shot timer, 0 = continuous mode
    32:  CIA_CRA_B_FORCE_LOAD    := $10  ; 1 = force load (this is a strobe, that is, it will always be read as "0")
    33:  CIA_CRA_B_COUNT_CNT     := $20  ; 1 = timer A counts positive edges of CNT, 0 = timer A counts PHI2 pulses
    34:  CIA_CRA_B_SP_OUTPUT     := $40  ; 1 = serial port (SP) is output, 0 = it is input
    35:  CIA_CRA_B_50HZ          := $80  ; 1 = 50Hz clock at TOD, 0 = 60Hz clock
    36:  
    37:  CIA_CRB_B_START         := $01  ; 1 = start timer B, 0 = stop timer B
    38:  CIA_CRB_B_PBON          := $02  ; 1 = timer B output appears on PB7, 0 = PB7 is not affected by timer
    39:  CIA_CRB_B_TOGGLE        := $04  ; PB7 output mode: 1 = toggle, 0 = pulse
    40:  CIA_CRB_B_ONESHOT       := $08  ; 1 = one shot timer, 0 = continuous mode
    41:  CIA_CRB_B_FORCE_LOAD    := $10  ; 1 = force load (this is a strobe, that is, it will always be read as "0")
    42:  CIA_CRB_B_TOD_ALARM     := $80  ; 1 = writing to TOD registers sets ALARM, 0 = writing to TOD registers sets time-of-day
    43:  
    44:  CIA_CRB_B_MODE_MASK     := $60  ; mask bits for setting the timer B count mode
    45:  CIA_CRB_B_MODE_PHI2     := $00  ; timer B counts PHI2 pulses
    46:  CIA_CRB_B_MODE_CNT      := $20  ; timer B counts positive edges of CNT
    47:  CIA_CRB_B_MODE_TA_      := $40  ; timer B counts timer A underflows
    48:  CIA_CRB_B_MODE_TA_WITH_CNT      := $60  ; timer B counts timer A underflows which occur while CNT is high
Valid XHTML 1.0 Strict
cia.inc.html; generated on Fri Sep 18 21:44:54 2015 by ca65html
uz@cc65.org