* support/regression/tests/zeropad.c: added TEST_G macro for alpha build
[fw/sdcc] / device / include / pic16 / pic18f442.h
1
2 /*
3  * pic18f442.h - 18F442 Device Library Header
4  *
5  * This file is part of the GNU PIC Library.
6  *
7  * January, 2004
8  * The GNU PIC Library is maintained by,
9  *      Vangelis Rokas <vrokas@otenet.gr>
10  *
11  * $Id$
12  *
13  */
14
15 #ifndef __PIC18F442_H__
16 #define __PIC18F442_H__
17
18 extern sfr at 0xf80 PORTA;
19 typedef union {
20         struct {
21                 unsigned RA0:1;
22                 unsigned RA1:1;
23                 unsigned RA2:1;
24                 unsigned RA3:1;
25                 unsigned RA4:1;
26                 unsigned RA5:1;
27                 unsigned RA6:1;
28                 unsigned :1;
29         };
30
31         struct {
32                 unsigned AN0:1;
33                 unsigned AN1:1;
34                 unsigned AN2:1;
35                 unsigned AN3:1;
36                 unsigned :1;
37                 unsigned AN4:1;
38                 unsigned OSC2:1;
39                 unsigned :1;
40         };
41
42         struct {
43                 unsigned :1;
44                 unsigned :1;
45                 unsigned VREFM:1;
46                 unsigned VREFP:1;
47                 unsigned T0CKI:1;
48                 unsigned SS:1;
49                 unsigned CLK0:1;
50                 unsigned :1;
51         };
52
53         struct {
54                 unsigned :1;
55                 unsigned :1;
56                 unsigned :1;
57                 unsigned :1;
58                 unsigned :1;
59                 unsigned LVDIN:1;
60                 unsigned :1;
61                 unsigned :1;
62         };
63 } PORTAbits_t;
64
65 extern volatile PORTAbits_t at 0xf80 PORTAbits;
66
67 extern sfr at 0xf81 PORTB;
68 typedef union {
69         struct {
70                 unsigned RB0:1;
71                 unsigned RB1:1;
72                 unsigned RB2:1;
73                 unsigned RB3:1;
74                 unsigned RB4:1;
75                 unsigned RB5:1;
76                 unsigned RB6:1;
77                 unsigned RB7:1;
78         };
79
80         struct {
81                 unsigned INT0:1;
82                 unsigned INT1:1;
83                 unsigned INT2:1;
84                 unsigned INT3:1;
85                 unsigned :1;
86                 unsigned :1;
87                 unsigned :1;
88                 unsigned :1;
89         };
90 } PORTBbits_t;
91
92 extern volatile PORTBbits_t at 0xf81 PORTBbits;
93
94 extern sfr at 0xf82 PORTC;
95 typedef union {
96         struct {
97                 unsigned RC0:1;
98                 unsigned RC1:1;
99                 unsigned RC2:1;
100                 unsigned RC3:1;
101                 unsigned RC4:1;
102                 unsigned RC5:1;
103                 unsigned RC6:1;
104                 unsigned RC7:1;
105         };
106
107         struct {
108                 unsigned T1OSO:1;
109                 unsigned T1OSI:1;
110                 unsigned :1;
111                 unsigned SCK:1;
112                 unsigned SDI:1;
113                 unsigned SDO:1;
114                 unsigned TX:1;
115                 unsigned RX:1;
116         };
117
118         struct {
119                 unsigned T1CKI:1;
120                 unsigned CCP2:1;
121                 unsigned CCP1:1;
122                 unsigned SCL:1;
123                 unsigned SDA:1;
124                 unsigned :1;
125                 unsigned CK:1;
126                 unsigned DT:1;
127         };
128 } PORTCbits_t;
129
130 extern volatile PORTCbits_t at 0xf82 PORTCbits;
131
132 extern sfr at 0xf83 PORTD;
133 typedef union {
134         struct {
135                 unsigned RD0:1;
136                 unsigned RD1:1;
137                 unsigned RD2:1;
138                 unsigned RD3:1;
139                 unsigned RD4:1;
140                 unsigned RD5:1;
141                 unsigned RD6:1;
142                 unsigned RD7:1;
143         };
144
145         struct {
146                 unsigned AD0:1;
147                 unsigned AD1:1;
148                 unsigned AD2:1;
149                 unsigned AD3:1;
150                 unsigned AD4:1;
151                 unsigned AD5:1;
152                 unsigned AD6:1;
153                 unsigned AD7:1;
154         };
155 } PORTDbits_t;
156
157 extern volatile PORTDbits_t at 0xf83 PORTDbits;
158
159 extern sfr at 0xf84 PORTE;
160 typedef union {
161         struct {
162                 unsigned RE0:1;
163                 unsigned RE1:1;
164                 unsigned RE2:1;
165                 unsigned :1;
166                 unsigned :1;
167                 unsigned :1;
168                 unsigned :1;
169                 unsigned :1;
170         };
171
172         struct {
173                 unsigned ALE:1;
174                 unsigned OE:1;
175                 unsigned WRL:1;
176                 unsigned WRH:1;
177                 unsigned :1;
178                 unsigned :1;
179                 unsigned :1;
180                 unsigned CCP2:1;
181         };
182
183         struct {
184                 unsigned AN5:1;
185                 unsigned :1;
186                 unsigned :1;
187                 unsigned :1;
188                 unsigned :1;
189                 unsigned :1;
190                 unsigned :1;
191                 unsigned :1;
192         };
193 } PORTEbits_t;
194
195 extern volatile PORTEbits_t at 0xf84 PORTEbits;
196
197 extern sfr at 0xf89 LATA;
198 typedef union {
199         struct {
200                 unsigned LATA0:1;
201                 unsigned LATA1:1;
202                 unsigned LATA2:1;
203                 unsigned LATA3:1;
204                 unsigned LATA4:1;
205                 unsigned LATA5:1;
206                 unsigned LATA6:1;
207                 unsigned :1;
208         };
209 } LATAbits_t;
210
211 extern volatile LATAbits_t at 0xf89 LATAbits;
212
213 extern sfr at 0xf8a LATB;
214 typedef union {
215         struct {
216                 unsigned LATB0:1;
217                 unsigned LATB1:1;
218                 unsigned LATB2:1;
219                 unsigned LATB3:1;
220                 unsigned LATB4:1;
221                 unsigned LATB5:1;
222                 unsigned LATB6:1;
223                 unsigned LATB7:1;
224         };
225 } LATBbits_t;
226
227 extern volatile LATBbits_t at 0xf8a LATBbits;
228
229 extern sfr at 0xf8b LATC;
230 typedef union {
231         struct {
232                 unsigned LATC0:1;
233                 unsigned LATC1:1;
234                 unsigned LATC2:1;
235                 unsigned LATC3:1;
236                 unsigned LATC4:1;
237                 unsigned LATC5:1;
238                 unsigned LATC6:1;
239                 unsigned LATC7:1;
240         };
241 } LATCbits_t;
242
243 extern volatile LATCbits_t at 0xf8b LATCbits;
244
245 extern sfr at 0xf8c LATD;
246 typedef union {
247         struct {
248                 unsigned LATD0:1;
249                 unsigned LATD1:1;
250                 unsigned LATD2:1;
251                 unsigned LATD3:1;
252                 unsigned LATD4:1;
253                 unsigned LATD5:1;
254                 unsigned LATD6:1;
255                 unsigned LATD7:1;
256         };
257 } LATDbits_t;
258
259 extern volatile LATDbits_t at 0xf8c LATDbits;
260
261 extern sfr at 0xf8d LATE;
262 typedef union {
263         struct {
264                 unsigned LATE0:1;
265                 unsigned LATE1:1;
266                 unsigned LATE2:1;
267                 unsigned LATE3:1;
268                 unsigned LATE4:1;
269                 unsigned LATE5:1;
270                 unsigned LATE6:1;
271                 unsigned LATE7:1;
272         };
273 } LATEbits_t;
274
275 extern volatile LATEbits_t at 0xf8d LATEbits;
276
277 extern sfr at 0xf92 TRISA;
278 typedef union {
279         struct {
280                 unsigned TRISA0:1;
281                 unsigned TRISA1:1;
282                 unsigned TRISA2:1;
283                 unsigned TRISA3:1;
284                 unsigned TRISA4:1;
285                 unsigned TRISA5:1;
286                 unsigned TRISA6:1;
287                 unsigned :1;
288         };
289 } TRISAbits_t;
290
291 extern volatile TRISAbits_t at 0xf92 TRISAbits;
292
293 extern sfr at 0xf93 TRISB;
294 typedef union {
295         struct {
296                 unsigned TRISB0:1;
297                 unsigned TRISB1:1;
298                 unsigned TRISB2:1;
299                 unsigned TRISB3:1;
300                 unsigned TRISB4:1;
301                 unsigned TRISB5:1;
302                 unsigned TRISB6:1;
303                 unsigned TRISB7:1;
304         };
305 } TRISBbits_t;
306
307 extern volatile TRISBbits_t at 0xf93 TRISBbits;
308
309 extern sfr at 0xf94 TRISC;
310 typedef union {
311         struct {
312                 unsigned TRISC0:1;
313                 unsigned TRISC1:1;
314                 unsigned TRISC2:1;
315                 unsigned TRISC3:1;
316                 unsigned TRISC4:1;
317                 unsigned TRISC5:1;
318                 unsigned TRISC6:1;
319                 unsigned TRISC7:1;
320         };
321 } TRISCbits_t;
322
323 extern volatile TRISCbits_t at 0xf94 TRISCbits;
324
325 extern sfr at 0xf95 TRISD;
326 typedef union {
327         struct {
328                 unsigned TRISD0:1;
329                 unsigned TRISD1:1;
330                 unsigned TRISD2:1;
331                 unsigned TRISD3:1;
332                 unsigned TRISD4:1;
333                 unsigned TRISD5:1;
334                 unsigned TRISD6:1;
335                 unsigned TRISD7:1;
336         };
337 } TRISDbits_t;
338
339 extern volatile TRISDbits_t at 0xf95 TRISDbits;
340
341 extern sfr at 0xf96 TRISE;
342 typedef union {
343         struct {
344                 unsigned :1;
345                 unsigned TRISE0:1;
346                 unsigned TRISE1:1;
347                 unsigned TRISE2:1;
348                 unsigned :1;
349                 unsigned IBOV:1;
350                 unsigned OBF:1;
351                 unsigned IBF:1;
352         };
353 } TRISEbits_t;
354
355 extern volatile TRISEbits_t at 0xf96 TRISEbits;
356
357 extern sfr at 0xf9d PIE1;
358 typedef union {
359         struct {
360                 unsigned TMR1IE:1;
361                 unsigned TMR2IE:1;
362                 unsigned CCP1IE:1;
363                 unsigned SSPIE:1;
364                 unsigned TXIE:1;
365                 unsigned RCIE:1;
366                 unsigned ADIE:1;
367                 unsigned PSPIE:1;
368         };
369 } PIE1bits_t;
370
371 extern volatile PIE1bits_t at 0xf9d PIE1bits;
372
373 extern sfr at 0xf9e PIR1;
374 typedef union {
375         struct {
376                 unsigned TMR1IF:1;
377                 unsigned TMR2IF:1;
378                 unsigned CCP1IF:1;
379                 unsigned SSPIF:1;
380                 unsigned TXIF:1;
381                 unsigned RCIF:1;
382                 unsigned ADIF:1;
383                 unsigned PSPIF:1;
384         };
385 } PIR1bits_t;
386
387 extern volatile PIR1bits_t at 0xf9e PIR1bits;
388
389 extern sfr at 0xf9f IPR1;
390 typedef union {
391         struct {
392                 unsigned TMR1IP:1;
393                 unsigned TMR2IP:1;
394                 unsigned CCP1IP:1;
395                 unsigned SSPIP:1;
396                 unsigned TXIP:1;
397                 unsigned RCIP:1;
398                 unsigned ADIP:1;
399                 unsigned PSPIP:1;
400         };
401 } IPR1bits_t;
402
403 extern volatile IPR1bits_t at 0xf9f IPR1bits;
404
405 extern sfr at 0xfa0 PIE2;
406 typedef union {
407         struct {
408                 unsigned CCP2IE:1;
409                 unsigned TMR3IE:1;
410                 unsigned LVDIE:1;
411                 unsigned BCLIE:1;
412                 unsigned EEIE:1;
413                 unsigned :1;
414                 unsigned :1;
415                 unsigned :1;
416         };
417 } PIE2bits_t;
418
419 extern volatile PIE2bits_t at 0xfa0 PIE2bits;
420
421 extern sfr at 0xfa1 PIR2;
422 typedef union {
423         struct {
424                 unsigned CCP2IF:1;
425                 unsigned TMR3IF:1;
426                 unsigned LVDIF:1;
427                 unsigned BCLIF:1;
428                 unsigned EEIF:1;
429                 unsigned :1;
430                 unsigned :1;
431                 unsigned :1;
432         };
433 } PIR2bits_t;
434
435 extern volatile PIR2bits_t at 0xfa1 PIR2bits;
436
437 extern sfr at 0xfa2 IPR2;
438 typedef union {
439         struct {
440                 unsigned CCP2IP:1;
441                 unsigned TMR3IP:1;
442                 unsigned LVDIP:1;
443                 unsigned BCLIP:1;
444                 unsigned EEIP:1;
445                 unsigned :1;
446                 unsigned :1;
447                 unsigned :1;
448         };
449 } IPR2bits_t;
450
451 extern volatile IPR2bits_t at 0xfa2 IPR2bits;
452
453 extern sfr at 0xfa6 EECON1;
454 typedef union {
455         struct {
456                 unsigned RD:1;
457                 unsigned WR:1;
458                 unsigned WREN:1;
459                 unsigned WRERR:1;
460                 unsigned FREE:1;
461                 unsigned :1;
462                 unsigned CFGS:1;
463                 unsigned EEPGD:1;
464         };
465 } EECON1bits_t;
466
467 extern volatile EECON1bits_t at 0xfa6 EECON1bits;
468
469 extern sfr at 0xfa7 EECON2;
470 extern sfr at 0xfa8 EEDATA;
471 extern sfr at 0xfa9 EEADR;
472 extern sfr at 0xfab RCSTA;
473 typedef union {
474         struct {
475                 unsigned RX9D:1;
476                 unsigned OERR:1;
477                 unsigned FERR:1;
478                 unsigned ADDEN:1;
479                 unsigned CREN:1;
480                 unsigned SREN:1;
481                 unsigned RX9:1;
482                 unsigned SPEN:1;
483         };
484 } RCSTAbits_t;
485
486 extern volatile RCSTAbits_t at 0xfab RCSTAbits;
487
488 extern sfr at 0xfac TXSTA;
489 typedef union {
490         struct {
491                 unsigned TX9D:1;
492                 unsigned TRMT:1;
493                 unsigned BRGH:1;
494                 unsigned :1;
495                 unsigned SYNC:1;
496                 unsigned TXEN:1;
497                 unsigned TX9:1;
498                 unsigned CSRC:1;
499         };
500 } TXSTAbits_t;
501
502 extern volatile TXSTAbits_t at 0xfac TXSTAbits;
503
504 extern sfr at 0xfad TXREG;
505 extern sfr at 0xfae RCREG;
506 extern sfr at 0xfaf SPBRG;
507 extern sfr at 0xfb1 T3CON;
508 typedef union {
509         struct {
510                 unsigned TMR3ON:1;
511                 unsigned TMR3CS:1;
512                 unsigned T3SYNC:1;
513                 unsigned T3CCP1:1;
514                 unsigned T3CKPS0:1;
515                 unsigned T3CKPS1:1;
516                 unsigned T3CCP2:1;
517                 unsigned RD16:1;
518         };
519 } T3CONbits_t;
520
521 extern volatile T3CONbits_t at 0xfb1 T3CONbits;
522
523 extern sfr at 0xfb2 TMR3L;
524 extern sfr at 0xfb3 TMR3H;
525 extern sfr at 0xfba CCP2CON;
526 typedef union {
527         struct {
528                 unsigned CCP2M0:1;
529                 unsigned CCP2M1:1;
530                 unsigned CCP2M2:1;
531                 unsigned CCP2M3:1;
532                 unsigned DCCP2Y:1;
533                 unsigned DCCP2X:1;
534                 unsigned :1;
535                 unsigned :1;
536         };
537 } CCP2CONbits_t;
538
539 extern volatile CCP2CONbits_t at 0xfba CCP2CONbits;
540
541 extern sfr at 0xfbb CCPR2L;
542 extern sfr at 0xfbc CCPR2H;
543 extern sfr at 0xfbd CCP1CON;
544 typedef union {
545         struct {
546                 unsigned CCP1M0:1;
547                 unsigned CCP1M1:1;
548                 unsigned CCP1M2:1;
549                 unsigned CCP1M3:1;
550                 unsigned DCCP1Y:1;
551                 unsigned DCCP1X:1;
552                 unsigned :1;
553                 unsigned :1;
554         };
555 } CCP1CONbits_t;
556
557 extern volatile CCP1CONbits_t at 0xfbd CCP1CONbits;
558
559 extern sfr at 0xfbe CCPR1L;
560 extern sfr at 0xfbf CCPR1H;
561 extern sfr at 0xfc1 ADCON1;
562 typedef union {
563         struct {
564                 unsigned PCFG0:1;
565                 unsigned PCFG1:1;
566                 unsigned PCFG2:1;
567                 unsigned PCFG3:1;
568                 unsigned :1;
569                 unsigned :1;
570                 unsigned ADCS2:1;
571                 unsigned ADFM:1;
572         };
573 } ADCON1bits_t;
574
575 extern volatile ADCON1bits_t at 0xfc1 ADCON1bits;
576
577 extern sfr at 0xfc2 ADCON0;
578 typedef union {
579         struct {
580                 unsigned ADON:1;
581                 unsigned :1;
582                 unsigned GO:1;
583                 unsigned CHS0:1;
584                 unsigned CHS1:1;
585                 unsigned CHS2:1;
586                 unsigned ADCS0:1;
587                 unsigned ADCS1:1;
588         };
589 } ADCON0bits_t;
590
591 extern volatile ADCON0bits_t at 0xfc2 ADCON0bits;
592
593 extern sfr at 0xfc3 ADRESL;
594 extern sfr at 0xfc4 ADRESH;
595 extern sfr at 0xfc5 SSPCON2;
596 typedef union {
597         struct {
598                 unsigned SEN:1;
599                 unsigned RSEN:1;
600                 unsigned PEN:1;
601                 unsigned RCEN:1;
602                 unsigned ACKEN:1;
603                 unsigned ACKDT:1;
604                 unsigned ACKSTAT:1;
605                 unsigned GCEN:1;
606         };
607 } SSPCON2bits_t;
608
609 extern volatile SSPCON2bits_t at 0xfc5 SSPCON2bits;
610
611 extern sfr at 0xfc6 SSPCON1;
612 typedef union {
613         struct {
614                 unsigned SSPM0:1;
615                 unsigned SSPM1:1;
616                 unsigned SSPM2:1;
617                 unsigned SSPM3:1;
618                 unsigned CKP:1;
619                 unsigned SSPEN:1;
620                 unsigned SSPOV:1;
621                 unsigned WCOL:1;
622         };
623 } SSPCON1bits_t;
624
625 extern volatile SSPCON1bits_t at 0xfc6 SSPCON1bits;
626
627 extern sfr at 0xfc7 SSPSTAT;
628 typedef union {
629         struct {
630                 unsigned BF:1;
631                 unsigned UA:1;
632                 unsigned R_W:1;
633                 unsigned S:1;
634                 unsigned P:1;
635                 unsigned D_A:1;
636                 unsigned CKE:1;
637                 unsigned SMP:1;
638         };
639 } SSPSTATbits_t;
640
641 extern volatile SSPSTATbits_t at 0xfc7 SSPSTATbits;
642
643 extern sfr at 0xfc8 SSPADD;
644 extern sfr at 0xfc9 SSPBUF;
645 extern sfr at 0xfca T2CON;
646 typedef union {
647         struct {
648                 unsigned T2CKPS0:1;
649                 unsigned T2CKPS1:1;
650                 unsigned TMR2ON:1;
651                 unsigned TOUTPS0:1;
652                 unsigned TOUTPS1:1;
653                 unsigned TOUTPS2:1;
654                 unsigned TOUTPS3:1;
655                 unsigned :1;
656         };
657 } T2CONbits_t;
658
659 extern volatile T2CONbits_t at 0xfca T2CONbits;
660
661 extern sfr at 0xfcb PR2;
662 extern sfr at 0xfcc TMR2;
663 extern sfr at 0xfcd T1CON;
664 typedef union {
665         struct {
666                 unsigned TMR1ON:1;
667                 unsigned TMR1CS:1;
668                 unsigned NOT_T1SYNC:1;
669                 unsigned T1OSCEN:1;
670                 unsigned T1CKPS0:1;
671                 unsigned T1CKPS1:1;
672                 unsigned :1;
673                 unsigned RD16:1;
674         };
675 } T1CONbits_t;
676
677 extern volatile T1CONbits_t at 0xfcd T1CONbits;
678
679 extern sfr at 0xfce TMR1L;
680 extern sfr at 0xfcf TMR1H;
681 extern sfr at 0xfd0 RCON;
682 typedef union {
683         struct {
684                 unsigned BOR:1;
685                 unsigned POR:1;
686                 unsigned PD:1;
687                 unsigned TO:1;
688                 unsigned RI:1;
689                 unsigned :1;
690                 unsigned :1;
691                 unsigned IPEN:1;
692         };
693 } RCONbits_t;
694
695 extern volatile RCONbits_t at 0xfd0 RCONbits;
696
697 extern sfr at 0xfd1 WDTCON;
698 typedef union {
699         struct {
700                 unsigned SWDTEN:1;
701                 unsigned :1;
702                 unsigned :1;
703                 unsigned :1;
704                 unsigned :1;
705                 unsigned :1;
706                 unsigned :1;
707                 unsigned :1;
708         };
709
710         struct {
711                 unsigned SWDTE:1;
712                 unsigned :1;
713                 unsigned :1;
714                 unsigned :1;
715                 unsigned :1;
716                 unsigned :1;
717                 unsigned :1;
718                 unsigned :1;
719         };
720 } WDTCONbits_t;
721
722 extern volatile WDTCONbits_t at 0xfd1 WDTCONbits;
723
724 extern sfr at 0xfd2 LVDCON;
725 typedef union {
726         struct {
727                 unsigned LVDL0:1;
728                 unsigned LVDL1:1;
729                 unsigned LVDL2:1;
730                 unsigned LVDL3:1;
731                 unsigned LVDEN:1;
732                 unsigned VRST:1;
733                 unsigned :1;
734                 unsigned :1;
735         };
736
737         struct {
738                 unsigned LVV0:1;
739                 unsigned LVV1:1;
740                 unsigned LVV2:1;
741                 unsigned LVV3:1;
742                 unsigned :1;
743                 unsigned BGST:1;
744                 unsigned :1;
745                 unsigned :1;
746         };
747 } LVDCONbits_t;
748
749 extern volatile LVDCONbits_t at 0xfd2 LVDCONbits;
750
751 extern sfr at 0xfd3 OSCCON;
752 typedef union {
753         struct {
754                 unsigned SCS:1;
755                 unsigned :1;
756                 unsigned :1;
757                 unsigned :1;
758                 unsigned :1;
759                 unsigned :1;
760                 unsigned :1;
761                 unsigned :1;
762         };
763 } OSCCONbits_t;
764
765 extern volatile OSCCONbits_t at 0xfd3 OSCCONbits;
766
767 extern sfr at 0xfd5 T0CON;
768 extern sfr at 0xfd6 TMR0L;
769 extern sfr at 0xfd7 TMR0H;
770 extern sfr at 0xfd8 STATUS;
771 typedef union {
772         struct {
773                 unsigned C:1;
774                 unsigned DC:1;
775                 unsigned Z:1;
776                 unsigned OV:1;
777                 unsigned N:1;
778                 unsigned :1;
779                 unsigned :1;
780                 unsigned :1;
781         };
782 } STATUSbits_t;
783
784 extern volatile STATUSbits_t at 0xfd8 STATUSbits;
785
786 extern sfr at 0xfd9 FSR2L;
787 extern sfr at 0xfda FSR2H;
788 extern sfr at 0xfdb PLUSW2;
789 extern sfr at 0xfdc PREINC2;
790 extern sfr at 0xfdd POSTDEC2;
791 extern sfr at 0xfde POSTINC2;
792 extern sfr at 0xfdf INDF2;
793 extern sfr at 0xfe0 BSR;
794 extern sfr at 0xfe1 FSR1L;
795 extern sfr at 0xfe2 FSR1H;
796 extern sfr at 0xfe3 PLUSW1;
797 extern sfr at 0xfe4 PREINC1;
798 extern sfr at 0xfe5 POSTDEC1;
799 extern sfr at 0xfe6 POSTINC1;
800 extern sfr at 0xfe7 INDF1;
801 extern sfr at 0xfe8 WREG;
802 extern sfr at 0xfe9 FSR0L;
803 extern sfr at 0xfea FSR0H;
804 extern sfr at 0xfeb PLUSW0;
805 extern sfr at 0xfec PREINC0;
806 extern sfr at 0xfed POSTDEC0;
807 extern sfr at 0xfee POSTINC0;
808 extern sfr at 0xfef INDF0;
809 extern sfr at 0xff0 INTCON3;
810 typedef union {
811         struct {
812                 unsigned INT1F:1;
813                 unsigned INT2F:1;
814                 unsigned :1;
815                 unsigned INT1E:1;
816                 unsigned INT2E:1;
817                 unsigned :1;
818                 unsigned INT1P:1;
819                 unsigned INT2P:1;
820         };
821
822         struct {
823                 unsigned INT1IF:1;
824                 unsigned INT2IF:1;
825                 unsigned :1;
826                 unsigned INT1IE:1;
827                 unsigned INT2IE:1;
828                 unsigned :1;
829                 unsigned INT1IP:1;
830                 unsigned INT2IP:1;
831         };
832 } INTCON3bits_t;
833
834 extern volatile INTCON3bits_t at 0xff0 INTCON3bits;
835
836 extern sfr at 0xff1 INTCON2;
837 typedef union {
838         struct {
839                 unsigned RBIP:1;
840                 unsigned :1;
841                 unsigned T0IP:1;
842                 unsigned :1;
843                 unsigned INTEDG2:1;
844                 unsigned INTEDG1:1;
845                 unsigned INTEDG0:1;
846                 unsigned RBPU:1;
847         };
848 } INTCON2bits_t;
849
850 extern volatile INTCON2bits_t at 0xff1 INTCON2bits;
851
852 extern sfr at 0xff2 INTCON;
853 typedef union {
854         struct {
855                 unsigned RBIF:1;
856                 unsigned INT0F:1;
857                 unsigned T0IF:1;
858                 unsigned RBIE:1;
859                 unsigned INT0E:1;
860                 unsigned T0IE:1;
861                 unsigned PEIE:1;
862                 unsigned GIE:1;
863         };
864 } INTCONbits_t;
865
866 extern volatile INTCONbits_t at 0xff2 INTCONbits;
867
868 extern sfr at 0xff3 PRODL;
869 extern sfr at 0xff4 PRODH;
870 extern sfr at 0xff5 TABLAT;
871 extern sfr at 0xff6 TBLPTRL;
872 extern sfr at 0xff7 TBLPTRH;
873 extern sfr at 0xff8 TBLPTRU;
874 extern sfr at 0xff9 PCL;
875 extern sfr at 0xffa PCLATH;
876 extern sfr at 0xffb PCLATU;
877 extern sfr at 0xffc STKPTR;
878 typedef union {
879         struct {
880                 unsigned STKPTR0:1;
881                 unsigned STKPTR1:1;
882                 unsigned STKPTR2:1;
883                 unsigned STKPTR3:1;
884                 unsigned STKPTR4:1;
885                 unsigned :1;
886                 unsigned STKUNF:1;
887                 unsigned STKFUL:1;
888         };
889 } STKPTRbits_t;
890
891 extern volatile STKPTRbits_t at 0xffc STKPTRbits;
892
893 extern sfr at 0xffd TOSL;
894 extern sfr at 0xffe TOSH;
895 extern sfr at 0xfff TOSU;
896
897
898 #endif
899