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

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

; Special Function Register definitions
RTCC		equ	001h
TMR0		equ	001h
PCL		equ	002h
STATUS		equ	003h
FSR		equ	004h
GPIO		equ	005h
PCLATH		equ	00Ah
INTCON		equ	00Bh
PIR1		equ	00Ch
ADRES		equ	01Eh
ADCON0		equ	01Fh
OPTION		equ	081h
TRIS		equ	085h
PIE1		equ	08Ch
PCON		equ	08Eh
OSCCAL		equ	08Fh
ADCON1		equ	09Fh

; Bit variables associates within SFRs
#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 SCL	GPIO,7
#define SDA	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 GPIE	INTCON,3
#define T0IF	INTCON,2
#define INTF	INTCON,1
#define GPIF	INTCON,0
#define ADIF	PIR1,6
#define ADCS1	ADCON0,7
#define ADCS0	ADCON0,6
#define CHS1	ADCON0,4
#define CHS0	ADCON0,3
#define GODONE	ADCON0,2
#define ADON	ADCON0,0
#define GPPU	OPTION,7
#define INTEDG	OPTION,6
#define T0CS	OPTION,5
#define T0SE	OPTION,4
#define PSA	OPTION,3
#define PS2	OPTION,2
#define PS1	OPTION,1
#define PS0	OPTION,0
#define TRIS5	TRIS,5
#define TRIS4	TRIS,4
#define TRIS3	TRIS,3
#define TRIS2	TRIS,2
#define TRIS1	TRIS,1
#define TRIS0	TRIS,0
#define ADIE	PIE1,6
#define POR	PCON,1
#define CAL3	OSCCAL,7
#define CAL2	OSCCAL,6
#define CAL1	OSCCAL,5
#define CAL0	OSCCAL,4
#define CALFST	OSCCAL,3
#define CALSLW	OSCCAL,2
#define CAL5	OSCCAL,7
#define CAL4	OSCCAL,6
#define CAL3	OSCCAL,5
#define CAL2	OSCCAL,4
#define CAL1	OSCCAL,3
#define CAL0	OSCCAL,2
#define PCFG2	ADCON1,2
#define PCFG1	ADCON1,1
#define PCFG0	ADCON1,0
