
; HI-TECH Software PICC Assembler header file.
; Definitions based on C header file: pic1643x.h.

; NOTE: PICC assembler option -P is required to preprocess assembler sources. 

; Special Function Register definitions
TMR0		equ	001h
PCL		equ	002h
STATUS		equ	003h
FSR		equ	004h
PORTA		equ	005h
PORTB		equ	006h
GPIO		equ	005h
PCLATH		equ	00Ah
INTCON		equ	00Bh
PIR1		equ	00Ch
ADRES		equ	01Eh
ADCON0		equ	01Fh
CMCON		equ	01Fh
OPTION		equ	081h
TRISA		equ	085h
TRISB		equ	086h
TRIS		equ	085h
PIE1		equ	08Ch
PCON		equ	08Eh
OSCCAL		equ	08Fh
ADCON1		equ	09Fh
LININTF		equ	090h
VRCON		equ	09Fh

; Bit variables associates within SFRs
#define TMR07	TMR0,7
#define TMR06	TMR0,6
#define TMR05	TMR0,5
#define TMR04	TMR0,4
#define TMR03	TMR0,3
#define TMR02	TMR0,2
#define TMR01	TMR0,1
#define TMR00	TMR0,0
#define PCL7	PCL,7
#define PCL6	PCL,6
#define PCL5	PCL,5
#define PCL4	PCL,4
#define PCL3	PCL,3
#define PCL2	PCL,2
#define PCL1	PCL,1
#define PCL0	PCL,0
#define IRP	STATUS,7
#define RP1	STATUS,6
#define RP0	STATUS,5
#define TO	STATUS,4
#define PD	STATUS,3
#define ZERO	STATUS,2
#define DC	STATUS,1
#define CARRY	STATUS,0
#define RA4	PORTA,4
#define RA3	PORTA,3
#define RA2	PORTA,2
#define RA1	PORTA,1
#define RA0	PORTA,0
#define RB7	PORTB,7
#define RB6	PORTB,6
#define RB5	PORTB,5
#define RB4	PORTB,4
#define RB3	PORTB,3
#define RB2	PORTB,2
#define RB1	PORTB,1
#define RB0	PORTB,0
#define LINTX	GPIO,7
#define LINRX	GPIO,6
#define GP5	GPIO,5
#define GP4	GPIO,4
#define GP3	GPIO,3
#define GP2	GPIO,2
#define GP1	GPIO,1
#define GP0	GPIO,0
#define GIE	INTCON,7
#define PEIE	INTCON,6
#define T0IE	INTCON,5
#define INTE	INTCON,4
#define RBIE	INTCON,3
#define T0IF	INTCON,2
#define INTF	INTCON,1
#define RBIF	INTCON,0
#define CMIF	PIR1,6
#define ADIF	PIR1,6
#define ADRES7	ADRES,7
#define ADRES6	ADRES,6
#define ADRES5	ADRES,5
#define ADRES4	ADRES,4
#define ADRES3	ADRES,3
#define ADRES2	ADRES,2
#define ADRES1	ADRES,1
#define ADRES0	ADRES,0
#define ADCS1	ADCON0,7
#define ADCS0	ADCON0,6
#define CHS1	ADCON0,4
#define CHS0	ADCON0,3
#define GO_DONE	ADCON0,2
#define ADON	ADCON0,0
#define C2OUT	CMCON,7
#define C1OUT	CMCON,6
#define CIS	CMCON,3
#define CM2	CMCON,2
#define CM1	CMCON,1
#define CM0	CMCON,0
#define bank1	OPTION,7
#define bank1	OPTION,7
#define bank1	OPTION,6
#define bank1	OPTION,5
#define bank1	OPTION,4
#define bank1	OPTION,3
#define bank1	OPTION,2
#define bank1	OPTION,1
#define bank1	OPTION,0
#define bank1	TRISA,4
#define bank1	TRISA,3
#define bank1	TRISA,2
#define bank1	TRISA,1
#define bank1	TRISA,0
#define bank1	TRISB,4
#define bank1	TRISB,4
#define bank1	TRISB,4
#define bank1	TRISB,4
#define bank1	TRISB,4
#define bank1	TRISB,4
#define bank1	TRISB,4
#define bank1	TRISB,4
#define bank1	TRIS,5
#define bank1	TRIS,4
#define bank1	TRIS,3
#define bank1	TRIS,2
#define bank1	TRIS,1
#define bank1	TRIS,0
#define bank1	PIE1,6
#define bank1	PIE1,6
#define bank1	PCON,1
#define bank1	PCON,0
#define bank1	LININTF,1
#define bank1	LININTF,0
#define bank1	VRCON,7
#define bank1	VRCON,6
#define bank1	VRCON,5
#define bank1	VRCON,3
#define bank1	VRCON,2
#define bank1	VRCON,1
#define bank1	VRCON,0
#define bank1	OSCCAL,7
#define bank1	OSCCAL,6
#define bank1	OSCCAL,5
#define bank1	OSCCAL,4
#define bank1	OSCCAL,3
#define bank1	OSCCAL,2
#define bank1	ADCON1,2
#define bank1	ADCON1,1
#define bank1	ADCON1,0
