;----------------------
;MC68HC05K1 Definitions
;----------------------

PORTA    EQU    $00                    ;Port A data register
PA0      EQU    0                      ;Port A bit 0
PA1      EQU    1                      ;Port A bit 1
PA2      EQU    2                      ;Port A bit 2
PA3      EQU    3                      ;Port A bit 3
PA4      EQU    4                      ;Port A bit 4
PA5      EQU    5                      ;Port A bit 5
PA6      EQU    6                      ;Port A bit 6
PA7      EQU    7                      ;Port A bit 7
PA0.     EQU    $01                    ;Bit position PA0
PA1.     EQU    $02                    ;Bit position PA1
PA2.     EQU    $04                    ;Bit position PA2
PA3.     EQU    $08                    ;Bit position PA3
PA4.     EQU    $10                    ;Bit position PA4
PA5.     EQU    $20                    ;Bit position PA5
PA6.     EQU    $40                    ;Bit position PA6
PA7.     EQU    $80                    ;Bit position PA7
;
PORTB    EQU    $01                    ;Port B data register
PB0      EQU    0                      ;Port B bit 0
PB1      EQU    1                      ;Port B bit 1
PB0.     EQU    $01                    ;Bit position PB0
PB1.     EQU    $02                    ;Bit position PB1
;
DDRA     EQU    $04                    ;Port A Data Direction Register
DDRA0    EQU    0                      ;Port A DDR bit 0
DDRA1    EQU    1                      ;Port A DDR bit 1
DDRA2    EQU    2                      ;Port A DDR bit 2
DDRA3    EQU    3                      ;Port A DDR bit 3
DDRA4    EQU    4                      ;Port A DDR bit 4
DDRA5    EQU    5                      ;Port A DDR bit 5
DDRA6    EQU    6                      ;Port A DDR bit 6
DDRA7    EQU    7                      ;Port A DDR bit 7
DDRA0.   EQU    $01                    ;Bit position DDRA0
DDRA1.   EQU    $02                    ;Bit position DDRA1
DDRA2.   EQU    $04                    ;Bit position DDRA2
DDRA3.   EQU    $08                    ;Bit position DDRA3
DDRA4.   EQU    $10                    ;Bit position DDRA4
DDRA5.   EQU    $20                    ;Bit position DDRA5
DDRA6.   EQU    $40                    ;Bit position DDRA6
DDRA7.   EQU    $80                    ;Bit position DDRA7
;
DDRB     EQU    $05                    ;Port B Data Direction Register
DDRB0    EQU    0                      ;Port B DDR bit 0
DDRB1    EQU    1                      ;Port B DDR bit 1
DDRB0.   EQU    $01                    ;Bit position DDRB0
DDRB1.   EQU    $02                    ;Bit position DDRB1
;
TSCR     EQU    $08                    ;Timer Status and Control Register
RT0      EQU    0                      ;Real-Time Interrupt Rate Select bit 0
RT1      EQU    1                      ;Real-Time Interrupt Rate Select bit 1
RTIFR    EQU    2                      ;Real-Time Interrupt Flag Reset
TOFR     EQU    3                      ;Timer Overflow Flag Reset
RTIE     EQU    4                      ;Real-Time Interrupt Enable
TOIE     EQU    5                      ;Timer Overflow Interrupt Enable
RTIF     EQU    6                      ;Real-Time Interrupt Flag
TOF      EQU    7                      ;Timer Overflow Flag
RT0.     EQU    $01                    ;Real-Time Interrupt Rate Select bit 0
RT1.     EQU    $02                    ;Real-Time Interrupt Rate Select bit 1
RTIFR.   EQU    $04                    ;Real-Time Interrupt Flag Reset
TOFR.    EQU    $08                    ;Timer Overflow Flag Reset
RTIE.    EQU    $10                    ;Real-Time Interrupt Enable
TOIE.    EQU    $20                    ;Timer Overflow Interrupt Enable
RTIF.    EQU    $40                    ;Real-Time Interrupt Flag
TOF.     EQU    $80                    ;Timer Overflow Flag
;
TCR      EQU    $09                    ;Timer Counter Register
;
ISCR     EQU    $0A                    ;Interrupt Status and Control Register
IRQR     EQU    1                      ;Interrupt REQUest Reset
IRQF     EQU    3                      ;External Interrupt REQUest Flag
IRQE     EQU    7                      ;External Interrupt REQUest Enable
;
PEBSR    EQU    $0E                    ;Personality EPROM Bit Select Register
PEB0     EQU    0                      ;Select PEPROM bit 0
PEB1     EQU    1                      ;Select PEPROM bit 1
PEB2     EQU    2                      ;Select PEPROM bit 2
PEB3     EQU    3                      ;Select PEPROM bit 3
PEB4     EQU    4                      ;Select PEPROM bit 4
PEB5     EQU    5                      ;Select PEPROM bit 5
PEB6     EQU    6                      ;Select PEPROM bit 6
PEB7     EQU    7                      ;Select PEPROM bit 7
PEB0.    EQU    $01                    ;Bit position PEB0
PEB1.    EQU    $02                    ;Bit position PEB1
PEB2.    EQU    $04                    ;Bit position PEB2
PEB3.    EQU    $08                    ;Bit position PEB3
PEB4.    EQU    $10                    ;Bit position PEB4
PEB5.    EQU    $20                    ;Bit position PEB5
PEB6.    EQU    $40                    ;Bit position PEB6
PEB7.    EQU    $80                    ;Bit position PEB7
;
PESCR    EQU    $0F                    ;Personality EPROM Status and Control Register
PEPRZF   EQU    0                      ;Personality EPROM Row Zero Flag
PEPGM    EQU    5                      ;Personality EPROM Program Control
PEDATA   EQU    7                      ;Personality EPROM Data
PEPRZF.  EQU    $01                    ;Bit position PE Row Zero Flag
PEPGM.   EQU    $20                    ;Bit position PE Program
PEDATA.  EQU    $80                    ;Bit position PE Data
;
PDRA     EQU    $10                    ;Pull-Down Register Port A (Write-Only)
PDIA0    EQU    0                      ;Pulldown inhibit for PA0
PDIA1    EQU    1                      ;Pulldown inhibit for PA1
PDIA2    EQU    2                      ;Pulldown inhibit for PA2
PDIA3    EQU    3                      ;Pulldown inhibit for PA3
PDIA4    EQU    4                      ;Pulldown inhibit for PA4
PDIA5    EQU    5                      ;Pulldown inhibit for PA5
PDIA6    EQU    6                      ;Pulldown inhibit for PA6
PDIA7    EQU    7                      ;Pulldown inhibit for PA7
PDIA0.   EQU    $01                    ;Bit position PDIA0
PDIA1.   EQU    $02                    ;Bit position PDIA1
PDIA2.   EQU    $04                    ;Bit position PDIA2
PDIA3.   EQU    $08                    ;Bit position PDIA3
PDIA4.   EQU    $10                    ;Bit position PDIA4
PDIA5.   EQU    $20                    ;Bit position PDIA5
PDIA6.   EQU    $40                    ;Bit position PDIA6
PDIA7.   EQU    $80                    ;Bit position PDIA7
;
PDRB     EQU    $11                    ;Pull-Down Register Port B (Write-Only)
PDIB0    EQU    0                      ;Pulldown inhibit for PB0
PDIB1    EQU    1                      ;Pulldown inhibit for PB1
PDIB2    EQU    2                      ;Pulldown inhibit for PB2
PDIB3    EQU    3                      ;Pulldown inhibit for PB3
PDIB4    EQU    4                      ;Pulldown inhibit for PB4
PDIB5    EQU    5                      ;Pulldown inhibit for PB5
PDIB6    EQU    6                      ;Pulldown inhibit for PB6
PDIB7    EQU    7                      ;Pulldown inhibit for PB7
PDIB0.   EQU    $01                    ;Bit position PDIB0
PDIB1.   EQU    $02                    ;Bit position PDIB1
PDIB2.   EQU    $04                    ;Bit position PDIB2
PDIB3.   EQU    $08                    ;Bit position PDIB3
PDIB4.   EQU    $10                    ;Bit position PDIB4
PDIB5.   EQU    $20                    ;Bit position PDIB5
PDIB6.   EQU    $40                    ;Bit position PDIB6
PDIB7.   EQU    $80                    ;Bit position PDIB7
;
MOR      EQU    $17                    ;Mask Option Register (EPROM byte)
COPEN    EQU    0                      ;COP Watchdog Enable
LEVEL    EQU    1                      ;External Interrupt Sensitivity
PIRQ     EQU    2                      ;Port A Interrupt Function Enable
LVRE     EQU    3                      ;Low Voltage Reset Enable
SWAIT    EQU    4                      ;STOP conversion to WAIT
RC       EQU    5                      ;RC Oscillator select
PIN3     EQU    6                      ;Three-Pin RC Oscillator Select
SWPDI    EQU    7                      ;Software Pull-Down Inhibit
COPEN.   EQU    $01                    ;Bit position COPEN
LEVEL.   EQU    $02                    ;Bit position LEVEL
PIRQ.    EQU    $04                    ;Bit position PIRQ
LVRE.    EQU    $08                    ;Bit position LVRE
SWAIT.   EQU    $10                    ;Bit position SWAIT
RC.      EQU    $20                    ;Bit position RC
PIN3.    EQU    $40                    ;Bit position PIN3
SWPDI.   EQU    $80                    ;Bit position SWPDI
;
EPROG    EQU    $18                    ;EPROM Programming Control Register
EPGM     EQU    0                      ;EPROM Programming
MPGM     EQU    1                      ;Mask Option Register Programming
ELAT     EQU    2                      ;EPROM Bus Latch
EPGM.    EQU    $01                    ;Bit position EPGM
MPGM.    EQU    $02                    ;Bit position MPGM
ELAT.    EQU    $04                    ;Bit position ELAT
;
COPR     EQU    $03F0                  ;COP Reset Register
COPC     EQU    0                      ;COP watchdog clear
COPC.    EQU    $01                    ;bit position COPC
;
RAM      EQU    $00E0                  ;Start of on-chip RAM
ROM      EQU    $0200                  ;Start of on-chip EPROM
ROMEND   EQU    $03EF                  ;End of on-Chip EPROM
VECTORS  EQU    $03F8                  ;Start of Reset/Interrupt vectors
