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

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

; Special Function Register definitions
FSR0		equ	001h
PCL		equ	002h
PCLATH		equ	003h
ALUSTA		equ	004h
T0STA		equ	005h
CPUSTA		equ	006h
INTSTA		equ	007h
INDF1		equ	008h
FSR1		equ	009h
WREG		equ	00Ah
TMR0L		equ	00Bh
TMR0H		equ	00Ch
TBLPTRL		equ	00Dh
TBLPTRH		equ	00Eh
BSR		equ	00Fh
PRODL		equ	018h
PRODH		equ	019h
PORTA		equ	010h
DDRB		equ	011h
PORTB		equ	012h
RCSTA		equ	013h
RCREG		equ	014h
TXSTA		equ	015h
TXREG		equ	016h
SPBRG		equ	017h
DDRC		equ	0110h
PORTC		equ	0111h
DDRD		equ	0112h
PORTD		equ	0113h
DDRE		equ	0114h
PORTE		equ	0115h
PIR		equ	0116h
PIE		equ	0117h
TMR1		equ	0210h
TMR2		equ	0211h
TMR3L		equ	0212h
TMR3H		equ	0213h
PR1		equ	0214h
PR2		equ	0215h
PR3L		equ	0216h
PR3H		equ	0217h
PW1DCL		equ	0310h
PW2DCL		equ	0311h
PW1DCH		equ	0312h
PW2DCH		equ	0313h
CA2L		equ	0314h
CA2H		equ	0315h
TCON1		equ	0316h
TCON2		equ	0317h

; Bit variables associates within SFRs
#define FS3	ALUSTA,7
#define FS2	ALUSTA,6
#define FS1	ALUSTA,5
#define FS0	ALUSTA,4
#define OV	ALUSTA,3
#define ZERO	ALUSTA,2
#define DC	ALUSTA,1
#define CARRY	ALUSTA,0
#define INTEDG	T0STA,7
#define T0SE	T0STA,6
#define T0CS	T0STA,5
#define PS3	T0STA,4
#define PS2	T0STA,3
#define PS1	T0STA,2
#define PS0	T0STA,1
#define STKAV	CPUSTA,5
#define GLINTD	CPUSTA,4
#define TO	CPUSTA,3
#define PD	CPUSTA,2
#define PEIF	INTSTA,7
#define T0CKIF	INTSTA,6
#define T0IF	INTSTA,5
#define INTF	INTSTA,4
#define PEIE	INTSTA,3
#define T0CKIE	INTSTA,2
#define T0IE	INTSTA,1
#define INTE	INTSTA,0
#define RBPU	PORTA,7
#define RA5	PORTA,5
#define RA4	PORTA,4
#define RA3	PORTA,3
#define RA2	PORTA,2
#define RA1	PORTA,1
#define TOCKI	PORTA,1
#define RA0	PORTA,0
#define INT	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 SPEN	RCSTA,7
#define RX9	RCSTA,6
#define SREN	RCSTA,5
#define CREN	RCSTA,4
#define FERR	RCSTA,2
#define OERR	RCSTA,1
#define RX9D	RCSTA,0
#define CSRC	TXSTA,7
#define TX9	TXSTA,6
#define TXEN	TXSTA,5
#define SYNC	TXSTA,4
#define TRMT	TXSTA,1
#define TX9D	TXSTA,0
#define RC7	PORTC,7
#define RC6	PORTC,6
#define RC5	PORTC,5
#define RC4	PORTC,4
#define RC3	PORTC,3
#define RC2	PORTC,2
#define RC1	PORTC,1
#define RC0	PORTC,0
#define RD7	PORTD,7
#define RD6	PORTD,6
#define RD5	PORTD,5
#define RD4	PORTD,4
#define RD3	PORTD,3
#define RD2	PORTD,2
#define RD1	PORTD,1
#define RD0	PORTD,0
#define RE2	PORTE,2
#define RE1	PORTE,1
#define RE0	PORTE,0
#define RBIF	PIR,7
#define TMR3IF	PIR,6
#define TMR2IF	PIR,5
#define TMR1IF	PIR,4
#define CA2IF	PIR,3
#define CA1IF	PIR,2
#define TXIF	PIR,1
#define RCIF	PIR,0
#define RBIE	PIE,7
#define TMR3IE	PIE,6
#define TMR2IE	PIE,5
#define TMR1IE	PIE,4
#define CA2IE	PIE,3
#define CA1IE	PIE,2
#define TXIE	PIE,1
#define RCIE	PIE,0
#define DC1PW1	PW1DCL,7
#define DC0PW1	PW1DCL,6
#define DC1PW2	PW2DCL,7
#define DC0PW2	PW2DCL,6
#define TM2PW2	PW2DCL,5
#define DC9PW1	PW1DCH,7
#define DC8PW1	PW1DCH,6
#define DC7PW1	PW1DCH,5
#define DC6PW1	PW1DCH,4
#define DC5PW1	PW1DCH,3
#define DC4PW1	PW1DCH,2
#define DC3PW1	PW1DCH,1
#define DC2PW1	PW1DCH,0
#define DC9PW2	PW2DCH,7
#define DC8PW2	PW2DCH,6
#define DC7PW2	PW2DCH,5
#define DC6PW2	PW2DCH,4
#define DC5PW2	PW2DCH,3
#define DC4PW2	PW2DCH,2
#define DC3PW2	PW2DCH,1
#define DC2PW2	PW2DCH,0
#define CA2ED1	TCON1,7
#define CA2ED0	TCON1,6
#define CA1ED1	TCON1,5
#define CA1ED0	TCON1,4
#define T16	TCON1,3
#define TMR3CS	TCON1,2
#define TMR2CS	TCON1,1
#define TMR1CS	TCON1,0
#define CA2OVF	TCON2,7
#define CA1OVF	TCON2,6
#define PWM2ON	TCON2,5
#define PWM1ON	TCON2,4
#define CA1	TCON2,3
#define PR3	TCON2,3
#define TMR3ON	TCON2,2
#define TMR2ON	TCON2,1
#define TMR1ON	TCON2,0
