Dallas DS5000 MCON register definition corrected
[fw/sdcc] / device / include / mcs51reg.h
1 /*-------------------------------------------------------------------------
2    Register Declarations for the mcs51 compatible microcontrollers
3
4    Written By -  Bela Torok / bela.torok@kssg.ch (November 2000)
5
6    This program is free software; you can redistribute it and/or modify it
7    under the terms of the GNU General Public License as published by the
8    Free Software Foundation; either version 2, or (at your option) any
9    later version.
10
11    This program is distributed in the hope that it will be useful,
12    but WITHOUT ANY WARRANTY; without even the implied warranty of
13    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14    GNU General Public License for more details.
15
16    You should have received a copy of the GNU General Public License
17    along with this program; if not, write to the Free Software
18    Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19
20    In other words, you are welcome to use, share and improve this program.
21    You are forbidden to forbid anyone else to use, share and improve
22    what you give them.   Help stamp out software-hoarding!
23
24
25    History:
26    --------
27    Version 1.0 Nov 2, 2000 - B. Torok  / bela.torok@kssg.ch
28    Initial release, supported microcontrollers:
29    8051, 8052, Atmel AT89C1051, AT89C2051, AT89C4051,
30    Infineon / Siemens SAB80515, SAB80535, SAB80515A
31
32    Version 1.0.1 (Nov 3, 2000)
33    SAB80515A definitions revised by Michael Schmitt / michael.schmitt@t-online.de
34
35    Version 1.0.2 (Nov 6, 2000)
36    T2CON bug corrected 8052 and SABX microcontrollers have different T2CONs
37    Support for the Atmel AT89C52, AT80LV52, AT89C55, AT80LV55
38    Support for the Dallas DS80C320 and DS80C323
39    B. Torok / bela.torok@kssg.ch
40
41    Version 1.0.3 (Nov 7, 2000)
42    SAB80517 definitions added by Michael Schmitt / michael.schmitt@t-online.de
43    Dallas AT89S53 definitions added by B. Torok / bela.torok@kssg.ch
44    Dallas DS87C520 and DS83C520 definitions added by B. Torok / bela.torok@kssg.ch
45
46    Version 1.0.4 (Nov 9, 2000)
47    To simplify the identication of registers, a large number of definitios
48    were renamed. Long register names now (hopefully) clearly define the
49    function of the registers.
50    Dallas DS89C420 definitions added by B. Torok / bela.torok@kssg.ch
51
52    Version 1.0.5 (Dec 15, 2000)
53    Definitions added: #ifdef MCS51REG_EXTERNAL_ROM
54                       #ifdef MCS51REG_EXTERNAL_RAM
55                       #ifndef MCS51REG_DISABLE_WARNINGS
56
57
58    Version 1.0.6 (March 10, 2001)
59    Support for the Dallas DS5000 & DS2250
60    Support for the Dallas DS5001 & DS2251
61    Support for the Dallas DS80C390
62    microcontrollers - B. Torok / bela.torok@kssg.ch
63
64    Version 1.0.7 (June 7, 2001)
65    #ifndef MCS51REG_DISABLE_WARNINGS removed
66    #ifdef MCS51REG_DISABLE_WARNINGS added - B. Torok / bela.torok@kssg.ch
67    Support for the Philips P80C552 added - Bernhard Held / Bernhard.Held@otelo-online.de
68
69    Version 1.0.8 (Feb 28, 2002)
70    Dallas DS89C420 definitions corrected by B. Torok / bela.torok@kssg.ch
71    Revised by lanius@ewetel.net
72
73    Version 1.0.9 (Sept 9, 2002)
74    Register declarations for the Atmel T89C51RD2 added by Johannes Hoelzl / johannes.hoelzl@gmx.de
75
76    Version 1.0.10 (Sept 19, 2002)
77    Register declarations for the Philips P89C668 added by Eric Limpens / Eric@limpens.net
78
79    Version 1.0.11 (Sept 19, 2004)
80    Dallas DS5000 MCON Register declarations corrected by Radek Zadera / a2i@swipnet.se
81
82    Adding support for additional microcontrollers:
83    -----------------------------------------------
84
85    1. Don't modify this file!!!
86
87    2. Insert your code in a separate file e.g.: mcs51reg_update.h and include
88       this after the #define HEADER_MCS51REG statement in this file
89
90    3. The mcs51reg_update.h file should contain following definitions:
91
92           a. An entry with the inventory of the register set of the
93              microcontroller in the  "Describe microcontrollers" section.
94
95           b. If necessary add entry(s) for registers not defined in this file
96
97           c. Define interrupt vectors
98
99    4. Compile a program for the microcontroller using the Preprocessor only, e.g.:,
100       sdcc -E test.c > t.txt
101       and check definitions for validity in the t.txt file.
102
103    5. If everithing seems to be OK send me the mcs51reg_update.h file. --> bela.torok@kssg.ch
104       I'm going to resolve conflicts & verify/merge new definitions to this file.
105
106
107    Microcontroller support:
108
109    Use one of the following options:
110
111    1. use #include <mcs51reg.h> in your program & define MICROCONTROLLER_XXXX in your makefile.
112
113    2. use following definitions prior the
114       #include <mcs51reg.h> line in your program:
115       e.g.:
116       #define MICROCONTROLLER_8052       -> 8052 type microcontroller
117       or
118       #define MICROCONTROLLER_AT89CX051  -> Atmel AT89C1051, AT89C2051 and AT89C4051 microcontrollers
119
120
121    Use only one of the following definitions!!!
122
123    Supported Microcontrollers:
124
125    No definition                8051
126    MICROCONTROLLER_8051         8051
127    MICROCONTROLLER_8052         8052
128    MICROCONTROLLER_AT89CX051    Atmel AT89C1051, AT89C2051 and AT89C4051
129    MICROCONTROLLER_AT89S53      Atmel AT89S53 microcontroller
130    MICROCONTROLLER_AT89X52      Atmel AT89C52 and AT80LV52 microcontrollers
131    MICROCONTROLLER_AT89X55      Atmel AT89C55 and AT80LV55 microcontrollers
132    MICROCONTROLLER_DS5000       Dallas DS5000 & DS2250 microcontroller
133    MICROCONTROLLER_DS5001       Dallas DS5001 & DS2251 microcontroller
134    MICROCONTROLLER_DS80C32X     Dallas DS80C320 and DS80C323 microcontrollers
135    MICROCONTROLLER_DS80C390     Dallas DS80C390 microcontroller
136    MICROCONTROLLER_DS89C420     Dallas DS89C420 microcontroller
137    MICROCONTROLLER_DS8XC520     Dallas DS87C520 and DS83C520 microcontrollers
138    MICROCONTROLLER_P80C552      Philips P80C552
139    MICROCONTROLLER_P89C668      Philips P89C668
140    MICROCONTROLLER_SAB80515     Infineon / Siemens SAB80515 & SAB80535
141    MICROCONTROLLER_SAB80515A    Infineon / Siemens SAB80515A
142    MICROCONTROLLER_SAB80517     Infineon / Siemens SAB80517
143    MICROCONTROLLER_T89C51RD2    Atmel T89C51RD2
144
145    Additional definitions (use them prior the #include mcs51reg.h statement):
146
147    Ports P0 & P2 are not available if external ROM used.
148    Use statement "#define MCS51REG_EXTERNAL_ROM" to undefine P0 & P2.
149
150    Ports P0, P2, P3_6, WR, P3_7 & RD are not available if external RAM is used.
151    Use statement "#define MCS51REG_EXTERNAL_RAM" to undefine P0, P2,
152    P3_6, WR, P3_7 & RD.
153
154    #define MCS51REG_ENABLE_WARNINGS -> enable warnings
155
156 -----------------------------------------------------------------------*/
157
158
159 #ifndef HEADER_MCS51REG
160 #define HEADER_MCS51REG
161
162 ///////////////////////////////////////////////////////
163 ///  Insert header here (for developers only)       ///
164 ///  remove "//" from the begining of the next line ///
165 //#include "mcs51reg_update.h"                      ///
166 ///////////////////////////////////////////////////////
167
168 //////////////////////////////////
169 ///  Describe microcontrollers ///
170 ///  (inventory of registers)  ///
171 //////////////////////////////////
172
173 // definitions for the 8051
174 #ifdef MICROCONTROLLER_8051
175 #ifdef MICROCONTROLLER_DEFINED
176 #define MCS51REG_ERROR
177 #endif
178 #ifndef MICROCONTROLLER_DEFINED
179 #define MICROCONTROLLER_DEFINED
180 #endif
181 #ifdef MCS51REG_ENABLE_WARNINGS
182 #warning Selected HW: 8051
183 #endif
184 #define P0
185 #define SP
186 #define DPL
187 #define DPH
188 #define PCON__SMOD__x__x__x__GF1__GF0__PD__IDL
189 #define TCON
190 #define TMOD
191 #define TL0
192 #define TL1
193 #define TH0
194 #define TH1
195 #define P1
196 #define SCON
197 #define SBUF
198 #define P2
199 #define IE__EA__x__x__ES__ET1__EX1__ET0__EX0
200 #define P3
201 #define IP__x__x__x__PS__PT1__PX1__PT0__PX0
202 #define PSW
203 #define ACC
204 #define B
205 #endif
206 // end of definitions for the 8051
207
208
209 // definitions for the 8052 microcontroller
210 #ifdef MICROCONTROLLER_8052
211 #ifdef MICROCONTROLLER_DEFINED
212 #define MCS51REG_ERROR
213 #endif
214 #ifndef MICROCONTROLLER_DEFINED
215 #define MICROCONTROLLER_DEFINED
216 #endif
217 #ifdef MCS51REG_ENABLE_WARNINGS
218 #warning Selected HW: 8052
219 #endif
220 // 8051 register set
221 #define P0
222 #define SP
223 #define DPL
224 #define DPH
225 #define PCON__SMOD__x__x__x__GF1__GF0__PD__IDL
226 #define TCON
227 #define TMOD
228 #define TL0
229 #define TL1
230 #define TH0
231 #define TH1
232 #define P1
233 #define SCON
234 #define SBUF
235 #define P2
236 #define IE__EA__x__ET2__ES__ET1__EX1__ET0__EX0
237 #define P3
238 #define IP__x__x__PT2__PS__PT1__PX1__PT0__PX0
239 #define PSW
240 #define ACC
241 #define B
242 // 8052 specific registers
243 #define T2CON__TF2__EXF2__RCLK__TCLK__EXEN2__TR2__C_T2__CP_RL2
244 #define RCAP2L
245 #define RCAP2H
246 #define TL2
247 #define TH2
248 #endif
249 // end of definitions for the 8052 microcontroller
250
251
252 // definitionsons for the Atmel
253 // AT89C1051, AT89C2051 and AT89C4051 microcontrollers
254 #ifdef MICROCONTROLLER_AT89CX051
255 #ifdef MICROCONTROLLER_DEFINED
256 #define MCS51REG_ERROR
257 #endif
258 #ifndef MICROCONTROLLER_DEFINED
259 #define MICROCONTROLLER_DEFINED
260 #endif
261 #ifdef MCS51REG_ENABLE_WARNINGS
262 #warning Selected HW: Atmel AT89Cx051
263 #endif
264 // 8051 register set without P0 & P2
265 #define SP
266 #define DPL
267 #define DPH
268 #define PCON__SMOD__x__x__x__GF1__GF0__PD__IDL
269 #define TCON
270 #define TMOD
271 #define TL0
272 #define TL1
273 #define TH0
274 #define TH1
275 #define P1
276 #define SCON
277 #define SBUF
278 #define IE__EA__x__x__ES__ET1__EX1__ET0__EX0
279 #define P3
280 #define IP__x__x__x__PS__PT1__PX1__PT0__PX0
281 #define PSW
282 #define ACC
283 #define B
284 #endif
285 // end of definitionsons for the Atmel
286 // AT89C1051, AT89C2051 and AT89C4051 microcontrollers
287
288
289 // definitions for the Atmel AT89S53
290 #ifdef MICROCONTROLLER_AT89S53
291 #ifdef MICROCONTROLLER_DEFINED
292 #define MCS51REG_ERROR
293 #endif
294 #ifndef MICROCONTROLLER_DEFINED
295 #define MICROCONTROLLER_DEFINED
296 #endif
297 #ifdef MCS51REG_ENABLE_WARNINGS
298 #warning Selected HW: AT89S53
299 #endif
300 // 8051 register set
301 #define P0
302 #define SP
303 #define DPL
304 #define DPH
305 #define PCON__SMOD__x__x__x__GF1__GF0__PD__IDL
306 #define TCON
307 #define TMOD
308 #define TL0
309 #define TL1
310 #define TH0
311 #define TH1
312 #define P1
313 #define SCON
314 #define SBUF
315 #define P2
316 #define IE__EA__x__ET2__ES__ET1__EX1__ET0__EX0
317 #define P3
318 #define IP__x__x__PT2__PS__PT1__PX1__PT0__PX0
319 #define PSW
320 #define ACC
321 #define B
322 // 8052 specific registers
323 #define T2CON__TF2__EXF2__RCLK__TCLK__EXEN2__TR2__C_T2__CP_RL2
324 #define RCAP2L
325 #define RCAP2H
326 #define TL2
327 #define TH2
328 // AT89S53 specific register
329 #define T2MOD__x__x__x__x__x__x__T2OE__DCEN
330 #define P1_EXT__x__x__x__x__x__x__T2EX__T2
331 #define SPCR
332 #define SPDR
333 #define SPSR
334 #define WCOM
335 #define DPL1
336 #define DPH1
337 #endif
338 // end of definitions for the Atmel AT89S53 microcontroller
339
340
341 // definitions for the Atmel AT89C52 and AT89LV52 microcontrollers
342 #ifdef MICROCONTROLLER_AT89X52
343 #ifdef MICROCONTROLLER_DEFINED
344 #define MCS51REG_ERROR
345 #endif
346 #ifndef MICROCONTROLLER_DEFINED
347 #define MICROCONTROLLER_DEFINED
348 #endif
349 #ifdef MCS51REG_ENABLE_WARNINGS
350 #warning Selected HW: AT89C52 or AT89LV52
351 #endif
352 // 8051 register set
353 #define P0
354 #define SP
355 #define DPL
356 #define DPH
357 #define PCON__SMOD__x__x__x__GF1__GF0__PD__IDL
358 #define TCON
359 #define TMOD
360 #define TL0
361 #define TL1
362 #define TH0
363 #define TH1
364 #define P1
365 #define SCON
366 #define SBUF
367 #define P2
368 #define IE__EA__x__ET2__ES__ET1__EX1__ET0__EX0
369 #define P3
370 #define IP__x__x__PT2__PS__PT1__PX1__PT0__PX0
371 #define PSW
372 #define ACC
373 #define B
374 // 8052 specific registers
375 #define T2CON__TF2__EXF2__RCLK__TCLK__EXEN2__TR2__C_T2__CP_RL2
376 #define RCAP2L
377 #define RCAP2H
378 #define TL2
379 #define TH2
380 // AT89X55 specific register
381 #define T2MOD__x__x__x__x__x__x__T2OE__DCEN
382 #define P1_EXT__x__x__x__x__x__x__T2EX__T2
383 #endif
384 // end of definitions for the Atmel AT89C52 and AT89LV52 microcontrollers
385
386
387 // definitions for the Atmel AT89C55 and AT89LV55 microcontrollers
388 #ifdef MICROCONTROLLER_AT89X55
389 #ifdef MICROCONTROLLER_DEFINED
390 #define MCS51REG_ERROR
391 #endif
392 #ifndef MICROCONTROLLER_DEFINED
393 #define MICROCONTROLLER_DEFINED
394 #endif
395 #ifdef MCS51REG_ENABLE_WARNINGS
396 #warning Selected HW: AT89C55 or AT89LV55
397 #endif
398 // 8051 register set
399 #define P0
400 #define SP
401 #define DPL
402 #define DPH
403 #define PCON__SMOD__x__x__x__GF1__GF0__PD__IDL
404 #define TCON
405 #define TMOD
406 #define TL0
407 #define TL1
408 #define TH0
409 #define TH1
410 #define P1
411 #define SCON
412 #define SBUF
413 #define P2
414 #define IE__EA__x__ET2__ES__ET1__EX1__ET0__EX0
415 #define P3
416 #define IP__x__x__PT2__PS__PT1__PX1__PT0__PX0
417 #define PSW
418 #define ACC
419 #define B
420 // 8052 specific registers
421 #define T2CON__TF2__EXF2__RCLK__TCLK__EXEN2__TR2__C_T2__CP_RL2
422 #define RCAP2L
423 #define RCAP2H
424 #define TL2
425 #define TH2
426 // AT89X55 specific register
427 #define T2MOD__x__x__x__x__x__x__T2OE__DCEN
428 #define P1_EXT__x__x__x__x__x__x__T2EX__T2
429 #endif
430 // end of definitions for the Atmel AT89C55 and AT89LV55 microcontrollers
431
432
433 // definitions for the Dallas DS5000
434 #ifdef MICROCONTROLLER_DS5000
435 #ifdef MICROCONTROLLER_DEFINED
436 #define MCS51REG_ERROR
437 #endif
438 #ifndef MICROCONTROLLER_DEFINED
439 #define MICROCONTROLLER_DEFINED
440 #endif
441 #ifdef MCS51REG_ENABLE_WARNINGS
442 #warning Selected HW: DS5000
443 #endif
444 #define P0
445 #define SP
446 #define DPL
447 #define DPH
448 #define PCON__SMOD__POR__PFW__WTR__EPFW__EWT__STOP__IDL
449 #define TCON
450 #define TMOD
451 #define TL0
452 #define TL1
453 #define TH0
454 #define TH1
455 #define P1
456 #define SCON
457 #define SBUF
458 #define P2
459 #define IE__EA__x__x__ES__ET1__EX1__ET0__EX0
460 #define P3
461 #define IP__RWT__x__x__PS__PT1__PX1__PT0__PX0
462 #define MCON__PA3__PA2__PA1__PA0__RA32_8__ECE2__PAA__SL
463 #define TA
464 #define PSW
465 #define ACC
466 #define B
467 #endif
468 // end of definitions for the Dallas DS5000
469
470
471 // definitions for the Dallas DS5001
472 #ifdef MICROCONTROLLER_DS5001
473 #ifdef MICROCONTROLLER_DEFINED
474 #define MCS51REG_ERROR
475 #endif
476 #ifndef MICROCONTROLLER_DEFINED
477 #define MICROCONTROLLER_DEFINED
478 #endif
479 #ifdef MCS51REG_ENABLE_WARNINGS
480 #warning Selected HW: DS5001
481 #endif
482 #define P0
483 #define SP
484 #define DPL
485 #define DPH
486 #define PCON__SMOD__POR__PFW__WTR__EPFW__EWT__STOP__IDL
487 #define TCON
488 #define TMOD
489 #define TL0
490 #define TL1
491 #define TH0
492 #define TH1
493 #define P1
494 #define SCON
495 #define SBUF
496 #define P2
497 #define IE__EA__x__x__ES__ET1__EX1__ET0__EX0
498 #define P3
499 #define IP__RWT__x__x__PS__PT1__PX1__PT0__PX0
500 #define CRC
501 #define CRCLOW
502 #define CRCHIGH
503 #define MCON__PA3__PA2__PA1__PA0__RG1__PES__PM__SL
504 #define TA
505 #define RNR
506 #define PSW
507 #define RPCTL
508 #define STATUS__ST7__ST6__ST5__ST4__IA0__F0__IBF__OBF
509 #define ACC
510 #define B
511 #endif
512 // end of definitions for the Dallas DS5001
513
514
515 // definitions for the Dallas DS80C320 and DS80C323 microcontrollers
516 #ifdef MICROCONTROLLER_DS80C32X
517 #ifdef MICROCONTROLLER_DEFINED
518 #define MCS51REG_ERROR
519 #endif
520 #ifndef MICROCONTROLLER_DEFINED
521 #define MICROCONTROLLER_DEFINED
522 #endif
523 #ifdef MCS51REG_ENABLE_WARNINGS
524 #warning Selected HW: Dallas DS80C320 or DS80C323
525 #endif
526 // 8051 register set
527 #define P0
528 #define SP
529 #define DPL
530 #define DPH
531 #define PCON__SMOD__SMOD0__x__x__GF1__GF0__STOP__IDLE
532 #define TCON
533 #define TMOD
534 #define TL0
535 #define TL1
536 #define TH0
537 #define TH1
538 #define P1
539 #define SCON
540 #define SCON0
541 #define SBUF
542 #define P2
543 #define IE__EA__ES1__ET2__ES__ET1__EX1__ET0__EX0
544 #define P3
545 #define IP__x__PS1__PT2__PS__PT1_PX1__PT0__PX0
546 #define PSW
547 #define ACC
548 #define B
549 // 8052 specific registers
550 #define T2CON__TF2__EXF2__RCLK__TCLK__EXEN2__TR2__C_T2__CP_RL2
551 #define RCAP2L
552 #define RCAP2H
553 #define TL2
554 #define TH2
555 // DS80C320 specific register
556 #define DPL1
557 #define DPH1
558 #define DPS__x__x__x__x__x__x__x__SEL
559 #define CKCON__WD1__WD0__T2M__T1M__TOM__MD2__MD1__MD0
560 #define EXIF__IE5__IE4__IE3__IE2__x__RGMD__RGSL__BGS
561 #define SADDR0
562 #define SADDR1
563 #define SADEN0
564 #define SADEN1
565 #define SCON1
566 #define SBUF1
567 #define STATUS__PIP__HIP__LIP__x__x__x__x__x
568 #define TA
569 #define T2MOD__x__x__x__x__x__x__T2OE__DCEN
570 #define P1_EXT__INT5__INT4__INT3__INT2__TXD1__RXD1__T2EX__T2
571 #define WDCON
572 #define EIE__x__x__x__EWDI__EX5__EX4__EX3__EX2
573 #define EIP__x__x__x__PWDI__PX5__PX4__PX3__PX2
574 #endif
575 // end of definitions for the Dallas DS80C320 and DS80C323 microcontrollers
576
577
578 // definitions for the Dallas DS80C390
579 #ifdef MICROCONTROLLER_DS80C390
580 #ifdef MICROCONTROLLER_DEFINED
581 #define MCS51REG_ERROR
582 #endif
583 #ifndef MICROCONTROLLER_DEFINED
584 #define MICROCONTROLLER_DEFINED
585 #endif
586 #ifdef MCS51REG_ENABLE_WARNINGS
587 #warning Selected HW: Dallas DS80C390
588 #endif
589 // 8051 register set
590 #define P0
591 #define SP
592 #define DPL
593 #define DPH
594 #define PCON__SMOD__SMOD0__OFDF__OFDE__GF1__GF0__STOP__IDLE
595 #define TCON
596 #define TMOD
597 #define TL0
598 #define TL1
599 #define TH0
600 #define TH1
601 #define P1
602 #define SCON
603 #define SCON0
604 #define SBUF
605 #define P2
606 #define IE__EA__ES1__ET2__ES__ET1__EX1__ET0__EX0
607 #define P3
608 #define IP__x__PS1__PT2__PS__PT1_PX1__PT0__PX0
609 #define PSW
610 #define ACC
611 #define B
612 // 8052 specific registers
613 #define T2CON__TF2__EXF2__RCLK__TCLK__EXEN2__TR2__C_T2__CP_RL2
614 #define RCAP2L
615 #define RCAP2H
616 #define TL2
617 #define TH2
618 // DS80C390 specific register
619 #define P4_AT_0X80
620 #define DPL1
621 #define DPH1
622 #define DPS__ID1__ID0__TSL__x__x__x__x__SEL
623 #define CKCON__WD1__WD0__T2M__T1M__TOM__MD2__MD1__MD0
624 #define EXIF__IE5__IE4__IE3__IE2__CKRY__RGMD__RGSL__BGS
625 #define P4CNT
626 #define DPX
627 #define DPX1
628 #define C0RMS0
629 #define C0RMS1
630 #define ESP
631 #define AP
632 #define ACON__x__x__x__x__x__SA__AM1__AM0
633 #define C0TMA0
634 #define C0TMA1
635 #define P5_AT_0XA1
636 #define P5CNT
637 #define C0C
638 #define C0S
639 #define C0IR
640 #define C0TE
641 #define C0RE
642 #define SADDR0
643 #define SADDR1
644 #define C0M1C
645 #define C0M2C
646 #define C0M3C
647 #define C0M4C
648 #define C0M5C
649 #define C0M6C
650 #define C0M7C
651 #define C0M8C
652 #define C0M9C
653 #define C0M10C
654 #define SADEN0
655 #define SADEN1
656 #define C0M11C
657 #define C0M12C
658 #define C0M13C
659 #define C0M14C
660 #define C0M15C
661 #define SCON1
662 #define SBUF1
663 #define PMR__CD1__CD0__SWB__CTM__4X_2X__ALEOFF__x__x
664 #define STATUS__PIP__HIP__LIP__x__SPTA1__SPRA1__SPTA0__SPRA0
665 #define MCON__IDM1__IDM0__CMA__x__PDCE3__PDCE2__PDCE1__PDCE0
666 #define TA
667 #define T2MOD__x__x__x__D13T1__D13T2__x__T2OE__DCEN
668 #define COR
669 #define MCNT0
670 #define MCNT1
671 #define MA
672 #define MB
673 #define MC
674 #define C1RSM0
675 #define C1RSM1
676 #define WDCON
677 #define C1TMA0
678 #define C1TMA1
679 #define C1C
680 #define C1S
681 #define C1IR
682 #define C1TE
683 #define C1RE
684 #define EIE__CANBIE__C0IE__C1IE__EWDI__EX5__EX4__EX3__EX2
685 #define MXMAX
686 #define C1M1C
687 #define C1M2C
688 #define C1M3C
689 #define C1M4C
690 #define C1M5C
691 #define C1M6C
692 #define C1M7C
693 #define C1M8C
694 #define C1M9C
695 #define EIP__CANBIP__C0IP__C1IP__PWDI__PX5__PX4__PX3__PX2__PX1__PX0
696 #define C1M10C
697 #define C1M11C
698 #define C1M12C
699 #define C1M13C
700 #define C1M14C
701 #define C1M15C
702 #define P1_EXT__INT5__INT4__INT3__INT2__TXD1__RXD1__T2EX__T2
703 #endif
704 // end of definitions for the Dallas DS80C390
705
706 // definitions for the Dallas DS89C420 microcontroller
707 #ifdef MICROCONTROLLER_DS89C420
708 #ifdef MICROCONTROLLER_DEFINED
709 #define MCS51REG_ERROR
710 #endif
711 #ifndef MICROCONTROLLER_DEFINED
712 #define MICROCONTROLLER_DEFINED
713 #endif
714 #ifdef MCS51REG_ENABLE_WARNINGS
715 #warning Selected HW: Dallas DS89C420
716 #endif
717 // 8051 register set
718 #define P0
719 #define SP
720 #define DPL
721 #define DPH
722 #define PCON__SMOD__SMOD0__OFDF__OFDE__GF1__GF0__STOP__IDLE
723 #define TCON
724 #define TMOD
725 #define TL0
726 #define TL1
727 #define TH0
728 #define TH1
729 #define P1
730 #define SCON
731 #define SCON0
732 #define SBUF
733 #define P2
734 #define IE__EA__ES1__ET2__ES__ET1__EX1__ET0__EX0
735 #define P3
736 #define IP__x__PS1__PT2__PS__PT1_PX1__PT0__PX0
737 #define PSW
738 #define ACC
739 #define B
740 // 8052 specific registers
741 #define T2CON__TF2__EXF2__RCLK__TCLK__EXEN2__TR2__C_T2__CP_RL2
742 #define RCAP2L
743 #define RCAP2H
744 #define TL2
745 #define TH2
746 // DS8XC420 specific registers
747 #define ACON__PAGEE__PAGES1__PAGES0__x__x__x__x__x
748 #define DPL1
749 #define DPH1
750 #define DPS__ID1__ID0__TSL__AID__x__x__x__SEL
751 #define CKCON__WD1__WD0__T2M__T1M__TOM__MD2__MD1__MD0
752 #define CKMOD
753 #define IP0__x__LPS1__LPT2__LPS0__LPT1__LPX1__LPT0__LPX0
754 #define IP1__x__MPS1__MPT2__MPS0__MPT1__MPX1__MPT0__MPX0
755 #define EXIF__IE5__IE4__IE3__IE2__CKRY__RGMD__RGSL__BGS
756 #define PMR__CD1__CD0__SWB__CTM__4X_2X__ALEON__DME1__DME0
757 #define SADDR0
758 #define SADDR1
759 #define SADEN0
760 #define SADEN1
761 #define SCON1
762 #define SBUF1
763 #define STATUS__PIS2__PIS1__PIS0__x__SPTA1__SPRA1__SPTA0__SPRA0
764 #define TA
765 #define T2MOD__x__x__x__x__x__x__T2OE__DCEN
766 #define P1_EXT__INT5__INT4__INT3__INT2__TXD1__RXD1__T2EX__T2
767 #define ROMSIZE__x__x__x__x__PRAME__RMS2__RMS1__RMS0
768 #define WDCON
769 #define EIE__x__x__x__EWDI__EX5__EX4__EX3__EX2
770 #define EIP0__x__x__x__LPWDI__LPX5__LPX4__LPX3__LPX2
771 #define EIP1__x__x__x__MPWDI__MPX5__MPX4__MPX3__MPX2
772 #define FCNTL__FBUSY__FERR__x__x__FC3__FC2__FC1__FC0
773 #endif
774 // end of definitions for the Dallas DS89C420 microcontroller
775
776 // definitions for the Dallas DS87C520 and DS83C520 microcontrollers
777 #ifdef MICROCONTROLLER_DS8XC520
778 #ifdef MICROCONTROLLER_DEFINED
779 #define MCS51REG_ERROR
780 #endif
781 #ifndef MICROCONTROLLER_DEFINED
782 #define MICROCONTROLLER_DEFINED
783 #endif
784 #ifdef MCS51REG_ENABLE_WARNINGS
785 #warning Selected HW: Dallas DS87C520 or DS85C520
786 #endif
787 // 8051 register set
788 #define P0
789 #define SP
790 #define DPL
791 #define DPH
792 #define PCON__SMOD__SMOD0__x__x__GF1__GF0__STOP__IDLE
793 #define TCON
794 #define TMOD
795 #define TL0
796 #define TL1
797 #define TH0
798 #define TH1
799 #define P1
800 #define SCON
801 #define SCON0
802 #define SBUF
803 #define P2
804 #define IE__EA__ES1__ET2__ES__ET1__EX1__ET0__EX0
805 #define P3
806 #define IP__x__PS1__PT2__PS__PT1_PX1__PT0__PX0
807 #define PSW
808 #define ACC
809 #define B
810 // 8052 specific registers
811 #define T2CON__TF2__EXF2__RCLK__TCLK__EXEN2__TR2__C_T2__CP_RL2
812 #define RCAP2L
813 #define RCAP2H
814 #define TL2
815 #define TH2
816 // DS8XC520 specific registers
817 #define DPL1
818 #define DPH1
819 #define DPS__x__x__x__x__x__x__x__SEL
820 #define CKCON__WD1__WD0__T2M__T1M__TOM__MD2__MD1__MD0
821 #define EXIF__IE5__IE4__IE3__IE2__XT_RG__RGMD__RGSL__BGS
822 #define PMR__CD1__CD0__SWB__x__XTOFF__ALEOFF__DME1__DME0
823 #define SADDR0
824 #define SADDR1
825 #define SADEN0
826 #define SADEN1
827 #define SCON1
828 #define SBUF1
829 #define STATUS__PIP__HIP__LIP__XTUP__SPTA2__SPTA1__SPTA0__SPRA0
830 #define TA
831 #define T2MOD__x__x__x__x__x__x__T2OE__DCEN
832 #define P1_EXT__INT5__INT4__INT3__INT2__TXD1__RXD1__T2EX__T2
833 #define WDCON
834 #define ROMSIZE__x__x__x__x__x__RMS2__RMS1__RMS0
835 #define BP2
836 #define WDCON
837 #define EIE__x__x__x__EWDI__EX5__EX4__EX3__EX2
838 #define EIP__x__x__x__PWDI__PX5__PX4__PX3__PX2
839 #endif
840 // end of definitions for the Dallas DS87C520 and DS83C520 microcontrollers
841
842
843 // definitions for the Philips P80C552 microcontroller
844 #ifdef MICROCONTROLLER_P80C552
845 #ifdef MICROCONTROLLER_DEFINED
846 #define MCS51REG_ERROR
847 #endif
848 #ifndef MICROCONTROLLER_DEFINED
849 #define MICROCONTROLLER_DEFINED
850 #endif
851 #ifdef MCS51REG_ENABLE_WARNINGS
852 #warning Selected HW: Philips P80C552
853 #endif
854 // 8051 register set
855 #define P0
856 #define SP
857 #define DPL
858 #define DPH
859 #define PCON__SMOD__x__x__WLE__GF1__GF0__PD__IDL
860 #define TCON
861 #define TMOD
862 #define TL0
863 #define TL1
864 #define TH0
865 #define TH1
866 #define P1
867 #define SCON
868 #define SBUF
869 #define P2
870 #define IE__EA__EAD__ES1__ES0__ET1__EX1__ET0__EX0
871 #define P3
872 #define IP__x__PAD__PS1__PS0__PT1__PX1__PT0__PX0
873 #define PSW
874 #define ACC
875 #define B
876 // P80C552 specific register-names
877 #define S0BUF           // same as SBUF, set in mcs51reg.h
878 #define S0CON__SM0__SM1__SM2__REN__TB8__RB8__TI__RI
879 // P80C552 specific registers
880 #define ADCH_AT_0XC6
881 #define ADCON__ADC_1__ADC_0__ADEX__ADCI__ADCS__AADR2__AADR1__AADR0
882 #define CTCON__CTN3__CTP3__CTN2__CTP2__CTN1__CTP1__CTN0__CTP0
883 #define CTH0_AT_0XCC
884 #define CTH1_AT_0XCD
885 #define CTH2_AT_0XCE
886 #define CTH3_AT_0XCF
887 #define CMH0_AT_0XC9
888 #define CMH1_AT_0XCA
889 #define CMH2_AT_0XCB
890 #define CTL0_AT_0XAC
891 #define CTL1_AT_0XAD
892 #define CTL2_AT_0XAE
893 #define CTL3_AT_0XAF
894 #define CML0_AT_0XA9
895 #define CML1_AT_0XAA
896 #define CML2_AT_0XAB
897 #define IEN1__ET2__ECM2__ECM1__ECM0__ECT3__ECT2__ECT1__ECT0
898 #define IP1__PT2__PCM2__PCM1__PCM0__PCT3__PCT2__PCT1__PCT0
899 #define PWM0_AT_0XFC
900 #define PWM1_AT_0XFD
901 #define PWMP_AT_0XFE
902 #define P1_EXT__SDA__SCL__RT2__T2__CT3I__CT2I__CT1I__CT0I
903 #define P4_AT_0XC0__CMT0__CMT1__CMSR5__CMSR4__CMSR3__CMSR2__CMSR1__CMSR0
904 #define P5_AT_0XC4
905 #define RTE__TP47__TP46__RP45__RP44__RP43__RP42__RP41__RP40
906 #define S1ADR__x__x__x__x__x__x__x__GC
907 #define S1DAT_AT_0XDA
908 #define S1STA__SC4__SC3__SC2__SC1__SC0__x__x__x
909 #define S1CON__CR2__ENS1__STA__ST0__SI__AA__CR1__CR0
910 #define STE__TG47__TG46__SP45__SP44__SP43__SP42__SP41__SP40
911 #define TMH2_AT_0XED
912 #define TML2_AT_0XEC
913 #define TM2CON__T2IS1__T2IS0__T2ER__T2B0__T2P1__T2P0__T2MS1__T2MS0
914 #define TM2IR__T20V__CMI2__CMI1__CMI0__CTI3__CTI2__CTI1__CTI0
915 #define T3_AT_0XFF
916 #endif
917 // end of definitions for the Philips P80C552 microcontroller
918
919
920 // definitions for the Philips P89C668
921 #ifdef MICROCONTROLLER_P89C668
922 #ifdef MICROCONTROLLER_DEFINED
923 #define MCS51REG_ERROR
924 #endif
925 #ifndef MICROCONTROLLER_DEFINED
926 #define MICROCONTROLLER_DEFINED
927 #endif
928 #ifdef MCS51REG_ENABLE_WARNINGS
929 #warning Selected HW: P89C668
930 #endif
931 #define P0
932 #define P0_EXT__AD7__AD6__AD5__AD4__AD3__AD2__AD1__AD0
933 #define P1
934 #define P1_EXT__SDA__SCL__CEX2__CEX1__CEX0__ECI__T2EX__T2
935 #define P2
936 #define P2_EXT__AD15__AD14__AD13__AD12__AD11__AD10__AD9__AD8
937 #define P3
938 #define P3_EXT__x__x__CEX4__CEX3__x__x__x__x
939 #define SP
940 #define DPL
941 #define DPH
942 #define TCON
943 #define TMOD
944 #define PCON__SMOD1__SMOD0__x__POF__GF1__GF0__PD__IDL
945 #define TL0
946 #define TL1
947 #define TH0
948 #define TH1
949 #define SCON
950 #define S0CON__SM0__SM1__SM2__REN__TB8__RB8__TI__RI
951 #define S1CON__CR2__ENS1__STA__ST0__SI__AA__CR1__CR0
952 #define SBUF
953 #define S0BUF SBUF
954 #define PSW
955 #define ACC
956 #define B
957 #define SADR_AT_0XA9
958 #define SADEN_AT_0XB9
959 #define S1IST_AT_0XDC
960 #define S1STA__SC4__SC3__SC2__SC1__SC0__x__x__x
961 #define S1DAT_AT_0XDA
962 #define S1ADR__x__x__x__x__x__x__x__GC
963 #define SBUF
964 #define T2CON__TF2__EXF2__RCLK__TCLK__EXEN2__TR2__C_T2__CP_RL2
965 #define T2MOD__x__x__x__x__x__x__T2OE__DCEN
966 #define RCAP2L
967 #define RCAP2H
968 #define TL2
969 #define TH2
970 #define IEN0__EA__EC__ES1__ES0__ET1__EX1__ET0__EX0
971 #define IEN1__x__x__x__x__x__x__x__ET2
972 #define IP__PT2__PPC__PS1__PS0__PT1__PX1__PT0__PX0
973 #define IPH__PT2H__PPCH__PS1H__PS0H__PT1H__PX1H__PT0H__PX0H
974 #define CCON__CF__CR__x__CCF4__CCF3__CCF2__CCF1__CCF0
975 #define CMOD__CIDL__WDTE__x__x__x__CPS1__CPS0__ECF
976 #define AUXR__x__x__x__x__x__x__EXTRAM__A0
977 #define AUXR1__x__x__ENBOOT__x__GF2__0__x__DPS
978 #define WDTRST_AT_0XA6
979 #define CCAPM0_AT_0XC2
980 #define CCAPM1_AT_0XC3
981 #define CCAPM2_AT_0XC4
982 #define CCAPM3_AT_0XC5
983 #define CCAPM4_AT_0XC6
984 #define CCAP0L_AT_0XEA
985 #define CCAP1L_AT_0XEB
986 #define CCAP2L_AT_0XEC
987 #define CCAP3L_AT_0XED
988 #define CCAP4L_AT_0XEE
989 #define CH_AT_0XF9
990 #define CL_AT_0XE9
991 #define CCAP0H_AT_0XFA
992 #define CCAP1H_AT_0XFB
993 #define CCAP2H_AT_0XFC
994 #define CCAP3H_AT_0XFD
995 #define CCAP4H_AT_0XFE
996 #endif
997 // end of definitions for the Philips P89C668
998
999
1000 // definitions for the Infineon / Siemens SAB80515 & SAB80535
1001 #ifdef MICROCONTROLLER_SAB80515
1002 #ifdef MICROCONTROLLER_DEFINED
1003 #define MCS51REG_ERROR
1004 #endif
1005 #ifndef MICROCONTROLLER_DEFINED
1006 #define MICROCONTROLLER_DEFINED
1007 #endif
1008 #ifdef MCS51REG_ENABLE_WARNINGS
1009 #warning Selected HW: Infineon / Siemens SAB80515 & SAB80535
1010 #endif
1011 // 8051 register set without IP
1012 #define P0
1013 #define SP
1014 #define DPL
1015 #define DPH
1016 #define PCON__SMOD__x__x__x__x__x__x__x
1017 #define TCON
1018 #define TMOD
1019 #define TL0
1020 #define TL1
1021 #define TH0
1022 #define TH1
1023 #define P1
1024 #define SCON
1025 #define SBUF
1026 #define P2
1027 #define IE__EA_WDT_ET2_ES_ET1_EX1_ET0_EX0
1028 #define P3
1029 #define PSW
1030 #define ACC
1031 #define B
1032 // SAB80515 specific registers
1033 #define P1_EXT__T2__CLKOUT__T2EX__INT2__INT6_CC3__INT5_CC2__INT4_CC1__INT3_CC0
1034 #define IP0__x__WDTS__IP0_5__IP0_4__IP0_3__IP0_2__IP0_1__IP0_0
1035 #define IEN1__EXEN2__SWDT__EX6__EX5__EX4__EX3__EX2__EADC
1036 #define IRCON
1037 #define CCEN
1038 #define CCL1
1039 #define CCH1
1040 #define CCL2
1041 #define CCH2
1042 #define CCL3
1043 #define CCH3
1044 #define T2CON__T2PS__I3FR__I2FR__T2R1__T2R0__T2CM__T2I1__T2I0
1045 #define CRCL
1046 #define CRCH
1047 #define TL2
1048 #define TH2
1049 #define ADCON
1050 #define ADDAT
1051 #define DAPR__SAB80515
1052 #define P4_AT_0XE8
1053 #define P5_AT_0XF8
1054 #define P6_AT_0XDB
1055 #endif
1056 // end of definitions for the Infineon / Siemens SAB80515
1057
1058
1059 // definitions for the Infineon / Siemens SAB80515A
1060 #ifdef MICROCONTROLLER_SAB80515A
1061 #ifdef MICROCONTROLLER_DEFINED
1062 #define MCS51REG_ERROR
1063 #endif
1064 #ifndef MICROCONTROLLER_DEFINED
1065 #define MICROCONTROLLER_DEFINED
1066 #endif
1067 #ifdef MCS51REG_ENABLE_WARNINGS
1068 #warning Selected HW: Infineon / Siemens SAB80515A
1069 #endif
1070 // 8051 register set without IP
1071 #define P0
1072 #define SP
1073 #define DPL
1074 #define DPH
1075 #define PCON__SMOD__PDS__IDLS__x__x__x__PD__IDL
1076 #define TCON
1077 #define TMOD
1078 #define TL0
1079 #define TL1
1080 #define TH0
1081 #define TH1
1082 #define P1
1083 #define SCON
1084 #define SBUF
1085 #define P2
1086 #define IE__EA_WDT_ET2_ES_ET1_EX1_ET0_EX0
1087 #define P3
1088 #define PSW
1089 #define ACC
1090 #define B
1091 // SAB80515A specific registers
1092 #define P1_EXT__T2__CLKOUT__T2EX__INT2__INT6_CC3__INT5_CC2__INT4_CC1__INT3_CC0
1093 #define IP0__x__WDTS__IP0_5__IP0_4__IP0_3__IP0_2__IP0_1__IP0_0
1094 #define IP1__x__x__IP1_5__IP1_4__IP1_3__IP1_2__IP1_1__IP1_0
1095 #define IEN1__EXEN2__SWDT__EX6__EX5__EX4__EX3__EX2__EADC
1096 #define IRCON
1097 #define CCEN
1098 #define CCL1
1099 #define CCH1
1100 #define CCL2
1101 #define CCH2
1102 #define CCL3
1103 #define CCH3
1104 #define T2CON__T2PS__I3FR__I2FR__T2R1__T2R0__T2CM__T2I1__T2I0
1105 #define CRCL
1106 #define CRCH
1107 #define TL2
1108 #define TH2
1109 #define ADCON0
1110 #define ADDATH
1111 #define ADDATL
1112 #define ADCON1
1113 #define SRELL
1114 #define SYSCON
1115 #define SRELH
1116 #define P4_AT_0XE8
1117 #define P5_AT_0XF8
1118 #define P6_AT_0XDB
1119 #define XPAGE
1120 #endif
1121 // end of definitions for the Infineon / Siemens SAB80515A
1122
1123
1124 // definitions for the Infineon / Siemens SAB80517
1125 #ifdef MICROCONTROLLER_SAB80517
1126 #ifdef MICROCONTROLLER_DEFINED
1127 #define MCS51REG_ERROR
1128 #endif
1129 #ifndef MICROCONTROLLER_DEFINED
1130 #define MICROCONTROLLER_DEFINED
1131 #endif
1132 #ifdef MCS51REG_ENABLE_WARNINGS
1133 #warning Selected HW: Infineon / Siemens SAB80517
1134 #endif
1135 // 8051 register set without IP, SCON & SBUF
1136 #define P0
1137 #define SP
1138 #define DPL
1139 #define DPH
1140 #define PCON__SMOD__PDS__IDLS__x__x__x__PD__IDL
1141 #define TCON
1142 #define TMOD
1143 #define TL0
1144 #define TL1
1145 #define TH0
1146 #define TH1
1147 #define P1
1148 // #define SCON
1149 // #define SBUF
1150 #define P2
1151 #define IE__EA_WDT_ET2_ES_ET1_EX1_ET0_EX0
1152 #define P3
1153 #define PSW
1154 #define ACC
1155 #define B
1156 // SAB80517 specific registers
1157 #define P1_EXT__T2__CLKOUT__T2EX__INT2__INT6_CC3__INT5_CC2__INT4_CC1__INT3_CC0
1158 #define IP0__x__WDTS__IP0_5__IP0_4__IP0_3__IP0_2__IP0_1__IP0_0
1159 #define IP1__x__x__IP1_5__IP1_4__IP1_3__IP1_2__IP1_1__IP1_0
1160 #define IEN1__EXEN2__SWDT__EX6__EX5__EX4__EX3__EX2__EADC
1161 #define IEN2__SAB80517
1162 #define IRCON
1163 #define CCEN
1164 #define CCL1
1165 #define CCH1
1166 #define CCL2
1167 #define CCH2
1168 #define CCL3
1169 #define CCH3
1170 #define CCL4
1171 #define CCH4
1172 #define CC4EN
1173 #define CMEN
1174 #define CMH0
1175 #define CML0
1176 #define CMH1
1177 #define CML1
1178 #define CMH2
1179 #define CML2
1180 #define CMH3
1181 #define CML3
1182 #define CMH4
1183 #define CML4
1184 #define CMH5
1185 #define CML5
1186 #define CMH6
1187 #define CML6
1188 #define CMH7
1189 #define CML7
1190 #define CMSEL
1191 #define T2CON__T2PS__I3FR__I2FR__T2R1__T2R0__T2CM__T2I1__T2I0
1192 #define CRCL
1193 #define CRCH
1194 #define CTCOM_AT_0XE1
1195 #define CTRELH
1196 #define CTRELL
1197 #define TL2
1198 #define TH2
1199 #define ADCON0
1200 #define ADCON1
1201 #define ADDAT
1202 #define DAPR__SAB80517
1203 #define P4_AT_0XE8
1204 #define P5_AT_0XF8
1205 #define P6_AT_0XFA
1206 #define P7_AT_0XDB
1207 #define P8_AT_0XDD
1208 #define DPSEL
1209 #define ARCON
1210 #define MD0
1211 #define MD1
1212 #define MD2
1213 #define MD3
1214 #define MD4
1215 #define MD5
1216 #define S0BUF
1217 #define S0CON__SM0__SM1__SM20__REN0__TB80__RB80__TI0__RI0
1218 #define S0RELH
1219 #define S0RELL
1220 #define S1BUF
1221 #define S1CON_AT_0X9B
1222 #define S1RELH
1223 #define S1RELL
1224 #define WDTH
1225 #define WDTL
1226 #define WDTREL
1227 #endif
1228 // end of definitions for the Infineon / Siemens SAB80517
1229
1230
1231 // definitions for the Atmel T89C51RD2
1232 #ifdef MICROCONTROLLER_T89C51RD2
1233 #ifdef MICROCONTROLLER_DEFINED
1234 #define MCS51REG_ERROR
1235 #endif
1236 #ifndef MICROCONTROLLER_DEFINED
1237 #define MICROCONTROLLER_DEFINED
1238 #endif
1239 #ifdef MCS51REG_ENABLE_WARNINGS
1240 #warning Selected HW: T89C51RD2
1241 #endif
1242
1243 // 8051 register set
1244 #define P0
1245 #define SP
1246 #define DPL
1247 #define DPH
1248 #define PCON__SMOD1__SMOD0__x__POF__GF1__GF0__PD__IDL
1249 #define TCON
1250 #define TMOD
1251 #define TL0
1252 #define TL1
1253 #define TH0
1254 #define TH1
1255 #define P1
1256 #define SCON
1257 #define SBUF
1258 #define P2
1259 #define IE__EA__EC__ET2__ES__ET1__EX1__ET0__EX0
1260 #define SADDR
1261 #define P3
1262 #define IP__x__PPC__PT2__PS__PT1__PX1__PT0__PX0
1263 #define PSW
1264 #define ACC
1265 #define B
1266
1267 // 8052 register set
1268 #define T2CON__TF2__EXF2__RCLK__TCLK__EXEN2__TR2__C_T2__CP_RL2
1269 #define RCAP2L
1270 #define RCAP2H
1271 #define TL2
1272 #define TH2
1273
1274 // T89C51RD2 register set
1275 #define P4_AT_0XC0__P4_7__P4_6__P4_5__P4_3__P4_2__P4_1__P4_0
1276 #define P5_AT_0XE8
1277 #define SADEN0
1278
1279 #define AUXR1__x__x__x__x__GF3__x__x__DPS
1280 #define WDTRST_AT_0XA6
1281 #define WDTPRG_AT_0XA7
1282 #define AUXR__x__x__M0__x__XRS1__XRS0__EXTRAM__A0
1283 #define IPH__x__PPCH__PT2H__PSH__PT1H__PX1H__PT0H__PX0H
1284 #define FCON
1285 #define EECON
1286 #define EETIM
1287 #define CKCON__X2__T0X2__T1X2__T2X2__SiX2__PcaX2__WdX2__x
1288 #define CCON__0xD8__CF__CR__x__CCF4__CCF3__CCF2__CCF1__CCF0
1289 #define CMOD__0xD9__CIDL__WDTE__x__x__x__CPS1__CPS0__ECF
1290 #define CCAPM0_AT_0XDA
1291 #define CCAPM1_AT_0XDB
1292 #define CCAPM2_AT_0XDC
1293 #define CCAPM3_AT_0XDD
1294 #define CCAPM4_AT_0XDE
1295 #define CL_AT_0XE9
1296 #define CCAP0L_AT_0XEA
1297 #define CCAP1L_AT_0XEB
1298 #define CCAP2L_AT_0XEC
1299 #define CCAP3L_AT_0XED
1300 #define CCAP4L_AT_0XEE
1301 #define CH_AT_0XF9
1302 #define CCAP0H_AT_0XFA
1303 #define CCAP1H_AT_0XFB
1304 #define CCAP2H_AT_0XFC
1305 #define CCAP3H_AT_0XFD
1306 #define CCAP4H_AT_0XFE
1307 #endif /* MICROCONTROLLER_T89C51RD2 */
1308 /* end of definition for the Atmel T89C51RD2 */
1309
1310
1311 /////////////////////////////////////////////////////////
1312 ///  don't specify microcontrollers below this line!  ///
1313 /////////////////////////////////////////////////////////
1314
1315
1316 // default microcontroller -> 8051
1317 // use default if no microcontroller specified
1318 #ifndef MICROCONTROLLER_DEFINED
1319 #define MICROCONTROLLER_DEFINED
1320 #ifdef MCS51REG_ENABLE_WARNINGS
1321 #warning No microcontroller defined!
1322 #warning Code generated for the 8051
1323 #endif
1324 // 8051 register set
1325 #define P0
1326 #define SP
1327 #define DPL
1328 #define DPH
1329 #define PCON__SMOD__x__x__x__GF1__GF0__PD__IDL
1330 #define TCON
1331 #define TMOD
1332 #define TL0
1333 #define TL1
1334 #define TH0
1335 #define TH1
1336 #define P1
1337 #define SCON
1338 #define SBUF
1339 #define P2
1340 #define IE__EA__x__x__ES__ET1__EX1__ET0__EX0
1341 #define P3
1342 #define IP__x__x__x__PS__PT1__PX1__PT0__PX0
1343 #define PSW
1344 #define ACC
1345 #define B
1346 #endif
1347 // end of definitions for the default microcontroller
1348
1349
1350 #ifdef MCS51REG_ERROR
1351 #error Two or more microcontrollers defined!
1352 #endif
1353
1354 #ifdef MCS51REG_EXTERNAL_ROM
1355 #ifndef MCS51REG_UNDEFINE_P0
1356 #define MCS51REG_UNDEFINE_P0
1357 #endif
1358 #ifndef MCS51REG_UNDEFINE_P2
1359 #define MCS51REG_UNDEFINE_P2
1360 #endif
1361 #endif
1362
1363 #ifdef MCS51REG_EXTERNAL_RAM
1364 #ifndef MCS51REG_UNDEFINE_P0
1365 #define MCS51REG_UNDEFINE_P0
1366 #endif
1367 #ifndef MCS51REG_UNDEFINE_P2
1368 #define MCS51REG_UNDEFINE_P2
1369 #endif
1370 #endif
1371
1372 #ifdef MCS51REG_UNDEFINE_P0
1373 #undef P0
1374 #endif
1375
1376 #ifdef MCS51REG_UNDEFINE_P2
1377 #undef P2
1378 #endif
1379
1380 ////////////////////////////////
1381 ///  Register definitions    ///
1382 ///  (In alphabetical order) ///
1383 ////////////////////////////////
1384
1385 #ifdef ACC
1386 #undef ACC
1387 sfr at 0xE0 ACC         ;
1388 #endif
1389
1390 #ifdef ACON__PAGEE__PAGES1__PAGES0__x__x__x__x__x
1391 #undef ACON__PAGEE__PAGES1__PAGES0__x__x__x__x__x
1392 sfr at 0x9D ACON        ; // DS89C420 specific
1393 // Not directly accessible bits
1394 #define PAGES0      0x20
1395 #define PAGES1      0x40
1396 #define PAGEE       0x80
1397 #endif
1398
1399 #ifdef ACON__x__x__x__x__x__SA__AM1__AM0
1400 #undef ACON__x__x__x__x__x__SA__AM1__AM0
1401 sfr at 0x9D ACON        ; // DS89C390 specific
1402 // Not directly accessible bits
1403 #define AM0         0x01
1404 #define AM1         0x02
1405 #define SA          0x04
1406 #endif
1407
1408 #ifdef ADCH_AT_0XC6
1409 #undef ADCH_AT_0XC6
1410 sfr at 0xC6 ADCH        ; // A/D converter high
1411 #endif
1412
1413 #ifdef ADCON
1414 #undef ADCON
1415 sfr at 0xD8 ADCON       ; // A/D-converter control register SAB80515 specific
1416 // Bit registers
1417 sbit at 0xD8 MX0        ;
1418 sbit at 0xD9 MX1        ;
1419 sbit at 0xDA MX2        ;
1420 sbit at 0xDB ADM        ;
1421 sbit at 0xDC BSY        ;
1422 sbit at 0xDE CLK        ;
1423 sbit at 0xDF BD         ;
1424 #endif
1425
1426 // ADCON0 ... Infineon / Siemens also called this register ADCON in the User Manual
1427 #ifdef ADCON0
1428 #undef ADCON0
1429 sfr at 0xD8 ADCON0      ; // A/D-converter control register 0 SAB80515A &
1430 // Bit registers          // SAB80517 specific
1431 sbit at 0xD8 MX0        ;
1432 sbit at 0xD9 MX1        ;
1433 sbit at 0xDA MX2        ;
1434 sbit at 0xDB ADM        ;
1435 sbit at 0xDC BSY        ;
1436 sbit at 0xDD ADEX       ;
1437 sbit at 0xDE CLK        ;
1438 sbit at 0xDF BD         ;
1439 // Not directly accessible ADCON0
1440 #define ADCON0_MX0  0x01
1441 #define ADCON0_MX1  0x02
1442 #define ADCON0_MX2  0x04
1443 #define ADCON0_ADM  0x08
1444 #define ADCON0_BSY  0x10
1445 #define ADCON0_ADEX 0x20
1446 #define ADCON0_CLK  0x40
1447 #define ADCON0_BD   0x80
1448 #endif
1449
1450 #ifdef ADCON1
1451 #undef ADCON1
1452 sfr at 0xDC ADCON1      ; // A/D-converter control register 1 SAB80515A & SAB80517 specific
1453 // Not directly accessible ADCON1
1454 #define ADCON1_MX0  0x01
1455 #define ADCON1_MX1  0x02
1456 #define ADCON1_MX2  0x04
1457 #define ADCON1_ADCL 0x80
1458 #endif
1459
1460 #ifdef ADCON__ADC_1__ADC_0__ADEX__ADCI__ADCS__AADR2__AADR1__AADR0
1461 #undef ADCON__ADC_1__ADC_0__ADEX__ADCI__ADCS__AADR2__AADR1__AADR0
1462 sfr at 0xC5 ADCON       ; // A/D control, P80C552 specific
1463 // Not directly accessible Bits.
1464 #define AADR0       0x01
1465 #define AADR1       0x02
1466 #define AADR2       0x04
1467 #define ADCS        0x08
1468 #define ADCI        0x10
1469 #define ADEX        0x20
1470 #define ADC_0       0x40    // different name as ADC0 in P5
1471 #define ADC_1       0x80    // different name as ADC1 in P5
1472 #endif
1473
1474 #ifdef ADDAT
1475 #undef ADDAT
1476 sfr at 0xD9 ADDAT       ; // A/D-converter data register SAB80515 specific
1477 #endif
1478
1479 #ifdef ADDATH
1480 #undef ADDATH
1481 sfr at 0xD9 ADDATH      ; // A/D data high byte SAB80515A specific
1482 #endif
1483
1484 #ifdef ADDATL
1485 #undef ADDATL
1486 sfr at 0xDA ADDATL      ; // A/D data low byte SAB80515A specific
1487 #endif
1488
1489 #ifdef ARCON
1490 #undef ARCON
1491 sfr at 0xEF ARCON       ; // arithmetic control register SAB80517
1492 #endif
1493
1494 #ifdef AP
1495 #undef AP
1496 sfr at 0x9C AP          ; // DS80C390
1497 #endif
1498
1499 #ifdef AUXR__x__x__x__x__x__x__EXTRAM__A0
1500 #undef AUXR__x__x__x__x__x__x__EXTRAM__A0
1501 // P89C668 specific, Auxilary
1502 sfr at 0x8E AUXR        ;
1503 // not bit addressable:
1504 #define EXTRAM      0x02
1505 #define A0          0x01
1506 #endif
1507
1508 #ifdef AUXR__x__x__M0__x__XRS1__XRS0__EXTRAM__A0
1509 #undef AUXR__x__x__M0__x__XRS1__XRS0__EXTRAM__A0
1510 sfr at 0x8E AUXR        ;
1511 #define AO          0x01
1512 #define EXTRAM      0x02
1513 #define XRS0        0x04
1514 #define XRS1        0x08
1515 #define M0          0x20
1516 #endif
1517 #ifdef B
1518 #undef B
1519 sfr at 0xF0 B           ;
1520 // Bit registers
1521 sbit at 0xF0 BREG_F0    ;
1522 sbit at 0xF1 BREG_F1    ;
1523 sbit at 0xF2 BREG_F2    ;
1524 sbit at 0xF3 BREG_F3    ;
1525 sbit at 0xF4 BREG_F4    ;
1526 sbit at 0xF5 BREG_F5    ;
1527 sbit at 0xF6 BREG_F6    ;
1528 sbit at 0xF7 BREG_F7    ;
1529 #endif
1530
1531 #ifdef AUXR1__x__x__x__x__GF3__x__x__DPS
1532 #undef AUXR1__x__x__x__x__GF3__x__x__DPS
1533 sfr at 0xA2 AUXR1       ;
1534 #define DPS         0x01
1535 #define GF3         0x08
1536 #endif
1537
1538 #ifdef AUXR1__x__x__ENBOOT__x__GF2__0__x__DPS
1539 #undef AUXR1__x__x__ENBOOT__x__GF2__0__x__DPS
1540 // P89C668 specific, Auxilary 1
1541 sfr at 0xA2 AUXR1       ;
1542 #define ENBOOT      0x20
1543 #define GF2         0x08
1544 #define ALWAYS_ZERO 0x04
1545 #define DPS         0x01
1546 #endif
1547
1548 #ifdef BP2
1549 #undef BP2
1550 sfr at 0xC3 BP2         ;
1551 // Not directly accessible bits
1552 #define MS0         0x01
1553 #define MS1         0x02
1554 #define MS2         0x04
1555 #define LB1         0x08
1556 #define LB2         0x10
1557 #define LB3         0x20
1558 #endif
1559
1560 #ifdef C0C
1561 #undef C0C
1562 sfr at 0xA3 C0C         ; // DS80C390 specific
1563 // Not directly accessible bits
1564 #define SWINT       0x01
1565 #define ERCS        0x02
1566 #define AUTOB       0x04
1567 #define CRST        0x08
1568 #define SIESTA      0x10
1569 #define PDE         0x20
1570 #define STIE        0x40
1571 #define ERIE        0x80
1572 #endif
1573
1574 #ifdef C0IR
1575 #undef C0IR
1576 sfr at 0xA5 C0IR        ; // DS80C390 specific
1577 // Not directly accessible bits
1578 #define INTIN0      0x01
1579 #define INTIN1      0x02
1580 #define INTIN2      0x04
1581 #define INTIN3      0x08
1582 #define INTIN4      0x10
1583 #define INTIN5      0x20
1584 #define INTIN6      0x40
1585 #define INTIN7      0x80
1586 #endif
1587
1588 #ifdef C0M1C
1589 #undef C0M1C
1590 sfr at 0xAB C0M1C       ; // DS80C390 specific
1591 // Not directly accessible bits
1592 #define DTUP        0x01
1593 #define ROW_TIH     0x02
1594 #define MTRQ        0x04
1595 #define EXTRQ       0x08
1596 #define INTRQ       0x10
1597 #define ERI         0x20
1598 #define ETI         0x40
1599 #define MSRDY       0x80
1600 #endif
1601
1602 #ifdef C0M2C
1603 #undef C0M2C
1604 sfr at 0xAC C0M2C       ; // DS80C390 specific
1605 #endif
1606
1607 #ifdef C0M3C
1608 #undef C0M3C
1609 sfr at 0xAD C0M3C       ; // DS80C390 specific
1610 #endif
1611
1612 #ifdef C0M4C
1613 #undef C0M4C
1614 sfr at 0xAE C0M4C       ; // DS80C390 specific
1615 #endif
1616
1617 #ifdef C0M5C
1618 #undef C0M5C
1619 sfr at 0xAF C0M5C       ; // DS80C390 specific
1620 #endif
1621
1622 #ifdef C0M6C
1623 #undef C0M6C
1624 sfr at 0xB3 C0M6C       ; // DS80C390 specific
1625 #endif
1626
1627 #ifdef C0M7C
1628 #undef C0M7C
1629 sfr at 0xB4 C0M7C       ; // DS80C390 specific
1630 #endif
1631
1632 #ifdef C0M8C
1633 #undef C0M8C
1634 sfr at 0xB5 C0M8C       ; // DS80C390 specific
1635 #endif
1636
1637 #ifdef C0M9C
1638 #undef C0M9C
1639 sfr at 0xB6 C0M9C       ; // DS80C390 specific
1640 #endif
1641
1642 #ifdef C0M10C
1643 #undef C0M10C
1644 sfr at 0xB7 C0M10C      ; // DS80C390 specific
1645 #endif
1646
1647 #ifdef C0M11C
1648 #undef C0M11C
1649 sfr at 0xBB C0M11C      ; // DS80C390 specific
1650 #endif
1651
1652 #ifdef C0M12C
1653 #undef C0M12C
1654 sfr at 0xBC C0M12C      ; // DS80C390 specific
1655 #endif
1656
1657 #ifdef C0M13C
1658 #undef C0M13C
1659 sfr at 0xBD C0M13C      ; // DS80C390 specific
1660 #endif
1661
1662 #ifdef C0M14C
1663 #undef C0M14C
1664 sfr at 0xBE C0M14C      ; // DS80C390 specific
1665 #endif
1666
1667 #ifdef C0M15C
1668 #undef C0M15C
1669 sfr at 0xBF C0M15C      ; // DS80C390 specific
1670 #endif
1671
1672 #ifdef C0RE
1673 #undef C0RE
1674 sfr at 0xA7 C0RE        ; // DS80C390 specific
1675 #endif
1676
1677 #ifdef C0RMS0
1678 #undef C0RMS0
1679 sfr at 0x96 C0RMS0      ; // DS80C390 specific
1680 #endif
1681
1682 #ifdef C0RMS1
1683 #undef C0RMS1
1684 sfr at 0x97 C0RMS1      ; // DS80C390 specific
1685 #endif
1686
1687 #ifdef C0S
1688 #undef C0S
1689 sfr at 0xA4 C0S         ; // DS80C390 specific
1690 // Not directly accessible bits
1691 #define ER0         0x01
1692 #define ER1         0x02
1693 #define ER2         0x04
1694 #define TXS         0x08
1695 #define RXS         0x10
1696 #define WKS         0x20
1697 #define EC96_128    0x40
1698 #define BSS         0x80
1699 #endif
1700
1701 #ifdef C0TE
1702 #undef C0TE
1703 sfr at 0xA6 C0TE        ; // DS80C390 specific
1704 #endif
1705
1706 #ifdef C0TMA0
1707 #undef C0TMA0
1708 sfr at 0x9E C0TMA0      ; // DS80C390 specific
1709 #endif
1710
1711 #ifdef C0TMA1
1712 #undef C0TMA1
1713 sfr at 0x9F C0TMA1      ; // DS80C390 specific
1714 #endif
1715
1716 #ifdef C1C
1717 #undef C1C
1718 sfr at 0xE3 C1C         ; // DS80C390 specific
1719 // Not directly accessible bits
1720 #define SWINT       0x01
1721 #define ERCS        0x02
1722 #define AUTOB       0x04
1723 #define CRST        0x08
1724 #define SIESTA      0x10
1725 #define PDE         0x20
1726 #define STIE        0x40
1727 #define ERIE        0x80
1728 #endif
1729
1730 #ifdef C1IR
1731 #undef C1IR
1732 sfr at 0xE5 C1IR        ; // DS80C390 specific
1733 // Not directly accessible bits
1734 #define INTIN0      0x01
1735 #define INTIN1      0x02
1736 #define INTIN2      0x04
1737 #define INTIN3      0x08
1738 #define INTIN4      0x10
1739 #define INTIN5      0x20
1740 #define INTIN6      0x40
1741 #define INTIN7      0x80
1742 #endif
1743
1744 #ifdef C1IRE
1745 #undef C1IRE
1746 sfr at 0xE7 C1RE        ; // DS80C390 specific
1747 #endif
1748
1749 #ifdef C1M1C
1750 #undef C1M1C
1751 sfr at 0xEB C1M1C       ; // DS80C390 specific
1752 #endif
1753
1754 #ifdef C1M2C
1755 #undef C1M2C
1756 sfr at 0xEC C1M2C       ; // DS80C390 specific
1757 #endif
1758
1759 #ifdef C1M3C
1760 #undef C1M3C
1761 sfr at 0xED C1M3C       ; // DS80C390 specific
1762 #endif
1763
1764 #ifdef C1M4C
1765 #undef C1M4C
1766 sfr at 0xEE C1M4C       ; // DS80C390 specific
1767 #endif
1768
1769 #ifdef C1M5C
1770 #undef C1M5C
1771 sfr at 0xEF C1M5C       ; // DS80C390 specific
1772 #endif
1773
1774 #ifdef C1M6C
1775 #undef C1M6C
1776 sfr at 0xF3 C1M6C       ; // DS80C390 specific
1777 #endif
1778
1779 #ifdef C1M7C
1780 #undef C1M7C
1781 sfr at 0xF4 C1M7C       ; // DS80C390 specific
1782 #endif
1783
1784 #ifdef C1M8C
1785 #undef C1M8C
1786 sfr at 0xF5 C1M8C       ; // DS80C390 specific
1787 #endif
1788
1789 #ifdef C1M9C
1790 #undef C1M9C
1791 sfr at 0xF6 C1M9C       ; // DS80C390 specific
1792 #endif
1793
1794 #ifdef C1M10C
1795 #undef C1M10C
1796 sfr at 0xF7 C1M10C      ; // DS80C390 specific
1797 #endif
1798
1799 #ifdef C1M11C
1800 #undef C1M11C
1801 sfr at 0xFB C1M11C      ; // DS80C390 specific
1802 #endif
1803
1804 #ifdef C1M12C
1805 #undef C1M12C
1806 sfr at 0xFC C1M12C      ; // DS80C390 specific
1807 #endif
1808
1809 #ifdef C1M13C
1810 #undef C1M13C
1811 sfr at 0xFD C1M13C      ; // DS80C390 specific
1812 #endif
1813
1814 #ifdef C1M14C
1815 #undef C1M14C
1816 sfr at 0xFE C1M14C      ; // DS80C390 specific
1817 #endif
1818
1819 #ifdef C1M15C
1820 #undef C1M15C
1821 sfr at 0xFF C1M15C      ; // DS80C390 specific
1822 #endif
1823
1824 #ifdef C1S
1825 #undef C1S
1826 sfr at 0xE4 C1S         ; // DS80C390 specific
1827 // Not directly accessible bits
1828 #define ER0         0x01
1829 #define ER1         0x02
1830 #define ER2         0x04
1831 #define TXS         0x08
1832 #define RXS         0x10
1833 #define WKS         0x20
1834 #define CECE        0x40
1835 #define BSS         0x80
1836 #endif
1837
1838 #ifdef C1ITE
1839 #undef C1ITE
1840 sfr at 0xE6 C1TE        ; // DS80C390 specific
1841 #endif
1842
1843 #ifdef C1RSM0
1844 #undef C1RSM0
1845 sfr at 0xD6 C1RSM0      ; // DS80C390 specific
1846 #endif
1847
1848 #ifdef C1RSM1
1849 #undef C1RSM1
1850 sfr at 0xD7 C1RSM1      ; // DS80C390 specific
1851 #endif
1852
1853 #ifdef C1TMA0
1854 #undef C1TMA0
1855 sfr at 0xDE C1TMA0      ; // DS80C390 specific
1856 #endif
1857
1858 #ifdef C1TMA1
1859 #undef C1TMA1
1860 sfr at 0xDF C1TMA1      ; // DS80C390 specific
1861 #endif
1862
1863 #ifdef CC4EN
1864 #undef CC4EN
1865 sfr at 0xC9 CC4EN       ; // compare/capture 4 enable register SAB80517 specific
1866 #endif
1867
1868 #ifdef CCAP0H_AT_0XFA
1869 #undef CCAP0H_AT_0XFA
1870 sfr at 0xFA CCAP0H      ;
1871 #endif
1872
1873 #ifdef CCAP1H_AT_0XFB
1874 #undef CCAP1H_AT_0XFB
1875 sfr at 0xFB CCAP1H      ;
1876 #endif
1877
1878 #ifdef CCAP2H_AT_0XFC
1879 #undef CCAP2H_AT_0XFC
1880 sfr at 0xFC CCAP2H      ;
1881 #endif
1882
1883 #ifdef CCAP3H_AT_0XFD
1884 #undef CCAP3H_AT_0XFD
1885 sfr at 0xFD CCAP3H      ;
1886 #endif
1887
1888 #ifdef CCAP4H_AT_0XFE
1889 #undef CCAP4H_AT_0XFE
1890 sfr at 0xFE CCAP4H      ;
1891 #endif
1892
1893 #ifdef CCAP0L_AT_0XEA
1894 #undef CCAP0L_AT_0XEA
1895 sfr at 0xEA CCAP0L      ;
1896 #endif
1897
1898 #ifdef CCAP1L_AT_0XEB
1899 #undef CCAP1L_AT_0XEB
1900 sfr at 0xEB CCAP1L      ;
1901 #endif
1902
1903 #ifdef CCAP2L_AT_0XEC
1904 #undef CCAP2L_AT_0XEC
1905 sfr at 0xEC CCAP2L      ;
1906 #endif
1907
1908 #ifdef CCAP3L_AT_0XED
1909 #undef CCAP3L_AT_0XED
1910 sfr at 0xED CCAP3L      ;
1911 #endif
1912
1913 #ifdef CCAP4L_AT_0XEE
1914 #undef CCAP4L_AT_0XEE
1915 sfr at 0xEE CCAP4L      ;
1916 #endif
1917
1918 #ifdef CCAPM0_AT_0XC2
1919 #undef CCAPM0_AT_0XC2
1920 // P89C668 specific, Capture module:
1921 sfr at 0xC2 CCAPM0      ;
1922 #endif
1923
1924 #ifdef CCAPM0_AT_0XDA
1925 #undef CCAPM0_AT_0XDA
1926 sfr at 0xDA CCAPM0      ;
1927 #define ECCF        0x01
1928 #define PWM         0x02
1929 #define TOG         0x04
1930 #define MAT         0x08
1931 #define CAPN        0x10
1932 #define CAPP        0x20
1933 #define ECOM        0x40
1934 #endif
1935
1936 #ifdef CCAPM1_AT_0XC3
1937 #undef CCAPM1_AT_0XC3
1938 sfr at 0xC3 CCAPM1      ;
1939 #endif
1940
1941 #ifdef CCAPM1_AT_0XDB
1942 #undef CCAPM1_AT_0XDB
1943 sfr at 0xDB CCAPM1      ;
1944 #endif
1945
1946 #ifdef CCAPM2_AT_0XC4
1947 #undef CCAPM2_AT_0XC4
1948 sfr at 0xC4 CCAPM2      ;
1949 #endif
1950
1951 #ifdef CCAPM2_AT_0XDC
1952 #undef CCAPM2_AT_0XDC
1953 sfr at 0x0DC CCAPM2     ;
1954 #endif
1955
1956 #ifdef CCAPM3_AT_0XC5
1957 #undef CCAPM3_AT_0XC5
1958 sfr at 0xC5 CCAPM3      ;
1959 #endif
1960
1961 #ifdef CCAPM3_AT_0XDD
1962 #undef CCAPM3_AT_0XDD
1963 sfr at 0x0DD CCAPM3     ;
1964 #endif
1965
1966 #ifdef CCAPM4_AT_0XDE
1967 #undef CCAPM4_AT_0XDE
1968 sfr at 0x0DE CCAPM4     ;
1969 #endif
1970
1971 #ifdef CCAPM4_AT_0XC6
1972 #undef CCAPM4_AT_0XC6
1973 sfr at 0xC6 CCAPM4      ;
1974 #endif
1975
1976 #ifdef CCEN
1977 #undef CCEN
1978 sfr at 0xC1 CCEN        ; // compare/capture enable register SAB80515 specific
1979 #endif
1980
1981 #ifdef CCH1
1982 #undef CCH1
1983 sfr at 0xC3 CCH1        ; // compare/capture register 1, high byte SAB80515 specific
1984 #endif
1985
1986 #ifdef CCH2
1987 #undef CCH2
1988 sfr at 0xC5 CCH2        ; // compare/capture register 2, high byte SAB80515 specific
1989 #endif
1990
1991 #ifdef CCH3
1992 #undef CCH3
1993 sfr at 0xC7 CCH3        ; // compare/capture register 3, high byte SAB80515 specific
1994 #endif
1995
1996 #ifdef CCH4
1997 #undef CCH4
1998 sfr at 0xCF CCH4        ; // compare/capture register 4, high byte SAB80515 specific
1999 #endif
2000
2001 #ifdef CCL1
2002 #undef CCL1
2003 sfr at 0xC2 CCL1        ; // compare/capture register 1, low byte SAB80515 specific
2004 #endif
2005
2006 #ifdef CCL2
2007 #undef CCL2
2008 sfr at 0xC4 CCL2        ; // compare/capture register 2, low byte SAB80515 specific
2009 #endif
2010
2011 #ifdef CCL3
2012 #undef CCL3
2013 sfr at 0xC6 CCL3        ; // compare/capture register 3, low byte SAB80515 specific
2014 #endif
2015
2016 #ifdef CCL4
2017 #undef CCL4
2018 sfr at 0xCE CCL4        ; // compare/capture register 4, low byte SAB80515 specific
2019 #endif
2020
2021 #ifdef CCON__0xD8__CF__CR__x__CCF4__CCF3__CCF2__CCF1__CCF0
2022 #undef CCON__0xD8__CF__CR__x__CCF4__CCF3__CCF2__CCF1__CCF0
2023 sfr at 0xD8 CCON        ; // T89C51RD2 specific register
2024 // Bit registers
2025 sbit at 0xD8 CCF0       ;
2026 sbit at 0xD9 CCF1       ;
2027 sbit at 0xDA CCF2       ;
2028 sbit at 0xDB CCF3       ;
2029 sbit at 0xDC CCF4       ;
2030 sbit at 0xDE CR         ;
2031 sbit at 0xDF CF         ;
2032 #endif
2033
2034 #ifdef CCON__CF__CR__x__CCF4__CCF3__CCF2__CCF1__CCF0
2035 #undef CCON__CF__CR__x__CCF4__CCF3__CCF2__CCF1__CCF0
2036 // P89C668 specific, PCA Counter control:
2037 sfr at 0xC0 CCON        ;
2038 // Bit registers
2039 sbit at 0xC0 CCF0       ;
2040 sbit at 0xC1 CCF1       ;
2041 sbit at 0xC2 CCF2       ;
2042 sbit at 0xC3 CCF3       ;
2043 sbit at 0xC4 CCF4       ;
2044 //sbit at 0xC5 -
2045 sbit at 0xC6 CR         ;
2046 sbit at 0xC7 CF         ;
2047 #endif
2048
2049 #ifdef CH_AT_0XF9
2050 #undef CH_AT_0XF9
2051 sfr at 0xF9 CH          ;
2052 #endif
2053
2054 #ifdef CMOD__CIDL__WDTE__x__x__x__CPS1__CPS0__ECF
2055 #undef CMOD__CIDL__WDTE__x__x__x__CPS1__CPS0__ECF
2056 // P89C668 specific, PCA Counter mode:
2057 sfr at 0xC1 CMOD        ;
2058 // not bit addressable:
2059 #define CIDL        0x80
2060 #define WDTE        0x40
2061 #define CPS1        0x04
2062 #define CPS0        0x02
2063 #define ECF         0x01
2064 #endif
2065
2066 #ifdef CKCON__WD1__WD0__T2M__T1M__TOM__MD2__MD1__MD0
2067 #undef CKCON__WD1__WD0__T2M__T1M__TOM__MD2__MD1__MD0
2068 sfr at 0x8E CKCON       ; // DS80C320 & DS80C390 specific
2069 // Not directly accessible Bits.
2070 #define MD0         0x01
2071 #define MD1         0x02
2072 #define MD2         0x04
2073 #define T0M         0x08
2074 #define T1M         0x10
2075 #define T2M         0x20
2076 #define WD0         0x40
2077 #define WD1         0x80
2078 #endif
2079
2080 #ifdef CKCON__X2__T0X2__T1X2__T2X2__SiX2__PcaX2__WdX2__x
2081 #undef CKCON__X2__T0X2__T1X2__T2X2__SiX2__PcaX2__WdX2__x
2082 sfr at 0x8F CKCON       ;
2083 #define X2          0x01
2084 #define T0X2        0x02
2085 #define T1X2        0x04
2086 #define T2X2        0x08
2087 #define SiX2        0x10
2088 #define PcaX2       0x20
2089 #define WdX2        0x40
2090 #endif
2091
2092 #ifdef CKMOD
2093 #undef CKMOD
2094 sfr at 0x96 CKMOD       ; // DS89C420 specific
2095 // Not directly accessible Bits.
2096 #define T0MH        0x08
2097 #define T1MH        0x10
2098 #define T2MH        0x20
2099 #endif
2100
2101 #ifdef CL_AT_0XE9
2102 #undef CL_AT_0XE9
2103 sfr at 0xE9 CL          ;
2104 #endif
2105
2106 #ifdef CMEN
2107 #undef CMEN
2108 sfr at 0xF6 CMEN        ; // compare enable register SAB80517 specific
2109 #endif
2110
2111 #ifdef CMH0
2112 #undef CMH0
2113 sfr at 0xD3 CMH0        ; // compare register 0 high byte SAB80517 specific
2114 #endif
2115
2116 #ifdef CMH1
2117 #undef CMH1
2118 sfr at 0xD5 CMH1        ; // compare register 1 high byte SAB80517 specific
2119 #endif
2120
2121 #ifdef CMH2
2122 #undef CMH2
2123 sfr at 0xD7 CMH2        ; // compare register 2 high byte SAB80517 specific
2124 #endif
2125
2126 #ifdef CMH3
2127 #undef CMH3
2128 sfr at 0xE3 CMH3        ; // compare register 3 high byte SAB80517 specific
2129 #endif
2130
2131 #ifdef CMH4
2132 #undef CMH4
2133 sfr at 0xE5 CMH4        ; // compare register 4 high byte SAB80517 specific
2134 #endif
2135
2136 #ifdef CMH5
2137 #undef CMH5
2138 sfr at 0xE7 CMH5        ; // compare register 5 high byte SAB80517 specific
2139 #endif
2140
2141 #ifdef CMH6
2142 #undef CMH6
2143 sfr at 0xF3 CMH6        ; // compare register 6 high byte SAB80517 specific
2144 #endif
2145
2146 #ifdef CMH7
2147 #undef CMH7
2148 sfr at 0xF5 CMH7        ; // compare register 7 high byte SAB80517 specific
2149 #endif
2150
2151 #ifdef CMH0_AT_0XC9
2152 #undef CMH0_AT_0XC9
2153 sfr at 0xC9 CMH0        ; // Compare high 0, P80C552 specific
2154 #endif
2155
2156 #ifdef CMH1_AT_0XCA
2157 #undef CMH1_AT_0XCA
2158 sfr at 0xCA CMH1        ; // Compare high 1, P80C552 specific
2159 #endif
2160
2161 #ifdef CMH2_AT_0XCB
2162 #undef CMH2_AT_0XCB
2163 sfr at 0xCB CMH2        ; // Compare high 2, P80C552 specific
2164 #endif
2165
2166 #ifdef CML0
2167 #undef CML0
2168 sfr at 0xD2 CML0        ; // compare register 0 low byte SAB80517 specific
2169 #endif
2170
2171 #ifdef CML1
2172 #undef CML1
2173 sfr at 0xD4 CML1        ; // compare register 1 low byte SAB80517 specific
2174 #endif
2175
2176 #ifdef CML2
2177 #undef CML2
2178 sfr at 0xD6 CML2        ; // compare register 2 low byte SAB80517 specific
2179 #endif
2180
2181 #ifdef CML3
2182 #undef CML3
2183 sfr at 0xE2 CML3        ; // compare register 3 low byte SAB80517 specific
2184 #endif
2185
2186 #ifdef CML4
2187 #undef CML4
2188 sfr at 0xE4 CML4        ; // compare register 4 low byte SAB80517 specific
2189 #endif
2190
2191 #ifdef CML5
2192 #undef CML5
2193 sfr at 0xE6 CML5        ; // compare register 5 low byte SAB80517 specific
2194 #endif
2195
2196 #ifdef CML6
2197 #undef CML6
2198 sfr at 0xF2 CML6        ; // compare register 6 low byte SAB80517 specific
2199 #endif
2200
2201 #ifdef CML7
2202 #undef CML7
2203 sfr at 0xF4 CML7        ; // compare register 7 low byte SAB80517 specific
2204 #endif
2205
2206 #ifdef CML0_AT_0XA9
2207 #undef CML0_AT_0XA9
2208 sfr at 0xA9 CML0        ; // Compare low 0, P80C552 specific
2209 #endif
2210
2211 #ifdef CML1_AT_0XAA
2212 #undef CML1_AT_0XAA
2213 sfr at 0xAA CML1        ; // Compare low 1, P80C552 specific
2214 #endif
2215
2216 #ifdef CML2_AT_0XAB
2217 #undef CML2_AT_0XAB
2218 sfr at 0xAB CML2        ; // Compare low 2, P80C552 specific
2219 #endif
2220
2221 #ifdef CMOD__0xD9__CIDL__WDTE__x__x__x__CPS1__CPS0__ECF
2222 #undef CMOD__0xD9__CIDL__WDTE__x__x__x__CPS1__CPS0__ECF
2223 sfr at 0xD9 CMOD        ;
2224 #define ECF         0x01
2225 #define CPS0        0x02
2226 #define CPS1        0x04
2227 #define WDTE        0x40
2228 #define CIDL        0x80
2229 #endif
2230
2231 #ifdef CMSEL
2232 #undef CMSEL
2233 sfr at 0xF7 CMSEL       ; // compare input select SAB80517
2234 #endif
2235
2236 #ifdef COR
2237 #undef COR
2238 sfr at 0xCE COR         ; // Dallas DS80C390 specific
2239 #define CLKOE       0x01
2240 #define COD0        0x02
2241 #define COD1        0x04
2242 #define C0BPR6      0x08
2243 #define C0BPR7      0x10
2244 #define C1BPR6      0x20
2245 #define C1BPR7      0x40
2246 #define IRDACK      0x80
2247 #endif
2248
2249 #ifdef CRC
2250 #undef CRC
2251 sfr at 0xC1 CRC         ; // Dallas DS5001 specific
2252 #define CRC_        0x01
2253 #define MDM         0x02
2254 #define RNGE0       0x10
2255 #define RNGE1       0x20
2256 #define RNGE2       0x40
2257 #define RNGE3       0x80
2258 #endif
2259
2260 #ifdef CRCH
2261 #undef CRCH
2262 sfr at 0xCB CRCH        ; // compare/reload/capture register, high byte SAB80515 specific
2263 #endif
2264
2265 #ifdef CRCHIGH
2266 #undef CRCHIGH
2267 sfr at 0xC3 CRCHIGH     ; // DS5001 specific
2268 #endif
2269
2270 #ifdef CRCL
2271 #undef CRCL
2272 sfr at 0xCA CRCL        ; // compare/reload/capture register, low byte SAB80515 specific
2273 #endif
2274
2275 #ifdef CRCLOW
2276 #undef CRCLOW
2277 sfr at 0xC2 CRCLOW      ; // DS5001 specific
2278 #endif
2279
2280 #ifdef CTCOM_AT_0XE1
2281 #undef CTCOM_AT_0XE1
2282 sfr at 0xE1 CTCON       ; // com.timer control register SAB80517
2283 #endif
2284
2285 #ifdef CTCON__CTN3__CTP3__CTN2__CTP2__CTN1__CTP1__CTN0__CTP0
2286 #undef CTCON__CTN3__CTP3__CTN2__CTP2__CTN1__CTP1__CTN0__CTP0
2287 sfr at 0xEB CTCON       ; // Capture control, P80C552 specific
2288 // Not directly accessible Bits.
2289 #define CTP0        0x01
2290 #define CTN0        0x02
2291 #define CTP1        0x04
2292 #define CTN1        0x08
2293 #define CTP2        0x10
2294 #define CTN2        0x20
2295 #define CTP3        0x40
2296 #define CTN3        0x80
2297 #endif
2298
2299 #ifdef CTH0_AT_0XCC
2300 #undef CTH0_AT_0XCC
2301 sfr at 0xCC CTH0        ; // Capture high 0, P80C552 specific
2302 #endif
2303
2304 #ifdef CTH1_AT_0XCD
2305 #undef CTH1_AT_0XCD
2306 sfr at 0xCD CTH1        ; // Capture high 1, P80C552 specific
2307 #endif
2308
2309 #ifdef CTH2_AT_0XCE
2310 #undef CTH2_AT_0XCE
2311 sfr at 0xCE CTH2        ; // Capture high 2, P80C552 specific
2312 #endif
2313
2314 #ifdef CTH3_AT_0XCF
2315 #undef CTH3_AT_0XCF
2316 sfr at 0xCF CTH3        ; // Capture high 3, P80C552 specific
2317 #endif
2318
2319 #ifdef CTL0_AT_0XAC
2320 #undef CTL0_AT_0XAC
2321 sfr at 0xAC CTL0        ; // Capture low 0, P80C552 specific
2322 #endif
2323
2324 #ifdef CTL1_AT_0XAD
2325 #undef CTL1_AT_0XAD
2326 sfr at 0xAD CTL1        ; // Capture low 1, P80C552 specific
2327 #endif
2328
2329 #ifdef CTL2_AT_0XAE
2330 #undef CTL2_AT_0XAE
2331 sfr at 0xAE CTL2        ; // Capture low 2, P80C552 specific
2332 #endif
2333
2334 #ifdef CTL3_AT_0XAF
2335 #undef CTL3_AT_0XAF
2336 sfr at 0xAF CTL3        ; // Capture low 3, P80C552 specific
2337 #endif
2338
2339 #ifdef CTRELH
2340 #undef CTRELH
2341 sfr at 0xDF CTRELH      ; // com.timer rel register high byte SAB80517
2342 #endif
2343
2344 #ifdef CTRELL
2345 #undef CTRELL
2346 sfr at 0xDE CTRELL      ; // com.timer rel register low byte SAB80517
2347 #endif
2348
2349 #ifdef DAPR__SAB80515
2350 #undef DAPR__SAB80515
2351 sfr at 0xDA DAPR        ; // D/A-converter program register SAB80515 specific
2352 #endif
2353
2354 #ifdef DAPR__SAB80517
2355 #undef DAPR__SAB80517
2356 sfr at 0xDA DAPR        ; // D/A-converter program register SAB80517 specific
2357 #endif
2358
2359 #ifdef DPH
2360 #undef DPH
2361 sfr at 0x83 DPH         ;
2362 sfr at 0x83 DP0H        ;  // Alternate name for AT89S53
2363 #endif
2364
2365 #ifdef DPH1
2366 #undef DPH1
2367 sfr at 0x85 DPH1        ; // DS80C320 specific
2368 sfr at 0x85 DP1H        ; // Alternate name for AT89S53
2369 #endif
2370
2371 #ifdef DPL
2372 #undef DPL
2373 sfr at 0x82 DPL         ;  // Alternate name for AT89S53
2374 sfr at 0x82 DP0L        ;
2375 #endif
2376
2377 #ifdef DPL1
2378 #undef DPL1
2379 sfr at 0x84 DPL1        ; // DS80C320 specific
2380 sfr at 0x84 DP1L        ; // Alternate name for AT89S53
2381 #endif
2382
2383 #ifdef DPS__x__x__x__x__x__x__x__SEL
2384 #undef DPS__x__x__x__x__x__x__x__SEL
2385 sfr at 0x86 DPS         ;
2386 // Not directly accessible DPS Bit. DS80C320 & DPS8XC520 specific
2387 #define SEL         0x01
2388 #endif
2389
2390 #ifdef DPS__ID1__ID0__TSL__x__x__x__x__SEL
2391 #undef DPS__ID1__ID0__TSL__x__x__x__x__SEL
2392 sfr at 0x86 DPS         ;
2393 // Not directly accessible DPS Bit. DS89C390 specific
2394 #define SEL         0x01
2395 #define TSL         0x20
2396 #define ID0         0x40
2397 #define ID1         0x80
2398 #endif
2399
2400 #ifdef DPS__ID1__ID0__TSL__AID__x__x__x__SEL
2401 #undef DPS__ID1__ID0__TSL__AID__x__x__x__SEL
2402 sfr at 0x86 DPS         ;
2403 // Not directly accessible DPS Bit. DS89C420 specific
2404 #define SEL         0x01
2405 #define AID         0x10
2406 #define TSL         0x20
2407 #define ID0         0x40
2408 #define ID1         0x80
2409 #endif
2410
2411 #ifdef DPSEL
2412 #undef DPSEL
2413 sfr at 0x92 DPSEL       ; // data pointer select register SAB80517
2414 #endif
2415
2416 #ifdef DPX
2417 #undef DPX
2418 sfr at 0x93 DPX1        ; // DS80C390 specific
2419 #endif
2420
2421 #ifdef DPX1
2422 #undef DPX1
2423 sfr at 0x95 DPX1        ; // DS80C390 specific
2424 #endif
2425
2426 #ifdef EECON
2427 #undef EECON
2428 sfr at 0xD2 EECON       ;
2429 #define EEBUSY      0x01
2430 #define EEE         0x02
2431 #define EEPL0       0x10
2432 #define EEPL1       0x20
2433 #define EEPL2       0x40
2434 #define EEPL3       0x80
2435 #define EEPL        0xF0
2436 #endif
2437
2438 #ifdef EETIM
2439 #undef EETIM
2440 sfr at 0xD3 EETIM       ;
2441 #endif
2442
2443 #ifdef EIE__x__x__x__EWDI__EX5__EX4__EX3__EX2
2444 #undef EIE__x__x__x__EWDI__EX5__EX4__EX3__EX2
2445 sfr at 0xE8 EIE         ;
2446 // Bit registers DS80C320 specific
2447 sbit at 0xE8 EX2        ;
2448 sbit at 0xE9 EX3        ;
2449 sbit at 0xEA EX4        ;
2450 sbit at 0xEB EX5        ;
2451 sbit at 0xEC EWDI       ;
2452 #endif
2453
2454 #ifdef EIE__CANBIE__C0IE__C1IE__EWDI__EX5__EX4__EX3__EX2
2455 #undef EIE__CANBIE__C0IE__C1IE__EWDI__EX5__EX4__EX3__EX2
2456 sfr at 0xE8 EIE         ;
2457 // Bit registers DS80C390 specific
2458 sbit at 0xE8 EX2        ;
2459 sbit at 0xE9 EX3        ;
2460 sbit at 0xEA EX4        ;
2461 sbit at 0xEB EX5        ;
2462 sbit at 0xEC EWDI       ;
2463 sbit at 0xED C1IE       ;
2464 sbit at 0xEE C0IE       ;
2465 sbit at 0xEF CANBIE     ;
2466 #endif
2467
2468 #ifdef EIP__x__x__x__PWDI__PX5__PX4__PX3__PX2
2469 #undef EIP__x__x__x__PWDI__PX5__PX4__PX3__PX2
2470 sfr at 0xF8 EIP         ;
2471 // Bit registers DS80C320 specific
2472 sbit at 0xF8 PX2        ;
2473 sbit at 0xF9 PX3        ;
2474 sbit at 0xFA PX4        ;
2475 sbit at 0xFB PX5        ;
2476 sbit at 0xFC PWDI       ;
2477 #endif
2478
2479 #ifdef EIP__CANBIP__C0IP__C1IP__PWDI__PX5__PX4__PX3__PX2__PX1__PX0
2480 #undef EIP__CANBIP__C0IP__C1IP__PWDI__PX5__PX4__PX3__PX2__PX1__PX0
2481 sfr at 0xF8 EIP         ;
2482 // Bit registers DS80C320 specific
2483 sbit at 0xF8 PX2        ;
2484 sbit at 0xF9 PX3        ;
2485 sbit at 0xFA PX4        ;
2486 sbit at 0xFB PX5        ;
2487 sbit at 0xFC PWDI       ;
2488 sbit at 0xFD C1IP       ;
2489 sbit at 0xFE C0IP       ;
2490 sbit at 0xFF CANBIP     ;
2491 #endif
2492
2493 #ifdef EIP0__x__x__x__LPWDI__LPX5__LPX4__LPX3__LPX2
2494 #undef EIP0__x__x__x__LPWDI__LPX5__LPX4__LPX3__LPX2
2495 sfr at 0xF8 EIP0        ;
2496 // Bit registers DS89C420 specific
2497 sbit at 0xF8 LPX2       ;
2498 sbit at 0xF9 LPX3       ;
2499 sbit at 0xFA LPX4       ;
2500 sbit at 0xFB LPX5       ;
2501 sbit at 0xFC LPWDI      ;
2502 #endif
2503
2504 #ifdef EIP1__x__x__x__MPWDI__MPX5__MPX4__MPX3__MPX2
2505 #undef EIP1__x__x__x__MPWDI__MPX5__MPX4__MPX3__MPX2
2506 sfr at 0xF1 EIP1        ;
2507 // Not directly accessible Bits DS89C420 specific
2508 #define MPX2        0x01
2509 #define MPX3        0x02
2510 #define MPX4        0x04
2511 #define MPX5        0x08
2512 #define MPWDI       0x10
2513 #endif
2514
2515 #ifdef ESP
2516 #undef ESP
2517 sfr at 0x9B ESP         ;
2518 // Not directly accessible Bits DS80C390 specific
2519 #define ESP_0       0x01
2520 #define ESP_1       0x02
2521 #endif
2522
2523 #ifdef EXIF__IE5__IE4__IE3__IE2__x__RGMD__RGSL__BGS
2524 #undef EXIF__IE5__IE4__IE3__IE2__x__RGMD__RGSL__BGS
2525 sfr at 0x91 EXIF        ;
2526 // Not directly accessible EXIF Bits DS80C320 specific
2527 #define BGS         0x01
2528 #define RGSL        0x02
2529 #define RGMD        0x04
2530 #define IE2         0x10
2531 #define IE3         0x20
2532 #define IE4         0x40
2533 #define IE5         0x80
2534 #endif
2535
2536 #ifdef EXIF__IE5__IE4__IE3__IE2__XT_RG__RGMD__RGSL__BGS
2537 #undef EXIF__IE5__IE4__IE3__IE2__XT_RG__RGMD__RGSL__BGS
2538 sfr at 0x91 EXIF        ;
2539 // Not directly accessible EXIF Bits DS87C520 specific
2540 #define BGS         0x01
2541 #define RGSL        0x02
2542 #define RGMD        0x04
2543 #define XT_RG       0x08
2544 #define IE2         0x10
2545 #define IE3         0x20
2546 #define IE4         0x40
2547 #define IE5         0x80
2548 #endif
2549
2550 #ifdef EXIF__IE5__IE4__IE3__IE2__CKRY__RGMD__RGSL__BGS
2551 #undef EXIF__IE5__IE4__IE3__IE2__CKRY__RGMD__RGSL__BGS
2552 sfr at 0x91 EXIF        ;
2553 // Not directly accessible EXIF Bits DS80C390 & DS89C420 specific
2554 #define BGS         0x01
2555 #define RGSL        0x02
2556 #define RGMD        0x04
2557 #define CKRY        0x08
2558 #define IE2         0x10
2559 #define IE3         0x20
2560 #define IE4         0x40
2561 #define IE5         0x80
2562 #endif
2563
2564 #ifdef FCNTL__FBUSY__FERR__x__x__FC3__FC2__FC1__FC0
2565 #undef FCNTL__FBUSY__FERR__x__x__FC3__FC2__FC1__FC0
2566 sfr at 0xD5 FCNTL       ;
2567 // Not directly accessible DS89C420 specific
2568 #define FC0         0x01
2569 #define FC1         0x02
2570 #define FC2         0x04
2571 #define FC3         0x08
2572 #define FERR        0x40
2573 #define FBUSY       0x80
2574 #endif
2575
2576 #ifdef FCON
2577 #undef FCON
2578 sfr at 0xD1 FCON        ;
2579 #define FBUSY       0x01
2580 #define FMOD0       0x02
2581 #define FMOD1       0x04
2582 #define FPS         0x08
2583 #define FPL0        0x10
2584 #define FPL1        0x20
2585 #define FPL2        0x40
2586 #define FPL3        0x80
2587 #define FPL         0xF0
2588 #endif
2589
2590 #ifdef FDATA
2591 #undef FDATA
2592 sfr at 0xD6 FDATA       ;
2593 #endif
2594
2595 #ifdef IE__EA__x__x__ES__ET1__EX1__ET0__EX0
2596 #undef IE__EA__x__x__ES__ET1__EX1__ET0__EX0
2597 sfr at 0xA8 IE          ;
2598 // Bit registers
2599 sbit at 0xA8 EX0        ;
2600 sbit at 0xA9 ET0        ;
2601 sbit at 0xAA EX1        ;
2602 sbit at 0xAB ET1        ;
2603 sbit at 0xAC ES         ;
2604 sbit at 0xAF EA         ;
2605 #endif
2606
2607 #ifdef IE__EA__x__ET2__ES__ET1__EX1__ET0__EX0
2608 #undef IE__EA__x__ET2__ES__ET1__EX1__ET0__EX0
2609 sfr at 0xA8 IE          ;
2610 // Bit registers
2611 sbit at 0xA8 EX0        ;
2612 sbit at 0xA9 ET0        ;
2613 sbit at 0xAA EX1        ;
2614 sbit at 0xAB ET1        ;
2615 sbit at 0xAC ES         ;
2616 sbit at 0xAD ET2        ; // Enable timer2 interrupt
2617 sbit at 0xAF EA         ;
2618 #endif // IE
2619
2620 #ifdef IE__EA__EAD__ES1__ES0__ET1__EX1__ET0__EX0
2621 #undef IE__EA__EAD__ES1__ES0__ET1__EX1__ET0__EX0
2622 sfr at 0xA8 IE          ; // same as IEN0 - Interrupt enable 0, P80C552 specific
2623 sfr at 0xA8 IEN0        ; // alternate name
2624 // Bit registers
2625 sbit at 0xA8 EX0        ;
2626 sbit at 0xA9 ET0        ;
2627 sbit at 0xAA EX1        ;
2628 sbit at 0xAB ET1        ;
2629 sbit at 0xAC ES0        ;
2630 sbit at 0xAD ES1        ;
2631 sbit at 0xAE EAD        ;
2632 sbit at 0xAF EEA        ;
2633 #endif
2634
2635 #ifdef IE__EA__EC__ET2__ES__ET1__EX1__ET0__EX0
2636 #undef IE__EA__EC__ET2__ES__ET1__EX1__ET0__EX0
2637 sfr at 0xA8 IE          ;
2638 sbit at 0xA8 EX0        ;
2639 sbit at 0xA9 ET0        ;
2640 sbit at 0xAA EX1        ;
2641 sbit at 0xAB ET1        ;
2642 sbit at 0xAC ES         ;
2643 sbit at 0xAD ET2        ;
2644 sbit at 0xAE EC         ;
2645 sbit at 0xAF EA         ;
2646 #endif
2647
2648 #ifdef IE__EA__ES1__ET2__ES__ET1__EX1__ET0__EX0
2649 #undef IE__EA__ES1__ET2__ES__ET1__EX1__ET0__EX0
2650 sfr at 0xA8 IE          ;
2651 // Bit registers
2652 sbit at 0xA8 EX0        ;
2653 sbit at 0xA9 ET0        ;
2654 sbit at 0xAA EX1        ;
2655 sbit at 0xAB ET1        ;
2656 sbit at 0xAC ES         ;
2657 sbit at 0xAC ES0        ; // Alternate name
2658 sbit at 0xAD ET2        ; // Enable timer2 interrupt
2659 sbit at 0xAE ES1        ;
2660 sbit at 0xAF EA         ;
2661 #endif // IE
2662
2663 #ifdef IE__EA_WDT_ET2_ES_ET1_EX1_ET0_EX0
2664 #undef IE__EA_WDT_ET2_ES_ET1_EX1_ET0_EX0
2665 sfr at 0xA8 IE          ;
2666 sfr at 0xA8 IEN0        ; // Alternate name
2667 // Bit registers for the SAB80515 and compatible IE
2668 sbit at 0xA8 EX0        ;
2669 sbit at 0xA9 ET0        ;
2670 sbit at 0xAA EX1        ;
2671 sbit at 0xAB ET1        ;
2672 sbit at 0xAC ES         ;
2673 sbit at 0xAC ES0        ;
2674 sbit at 0xAD ET2        ; // Enable timer 2 overflow SAB80515 specific
2675 sbit at 0xAE WDT        ; // watchdog timer reset - SAB80515 specific
2676 sbit at 0xAF EA         ;
2677 sbit at 0xAF EAL        ; // EA as called by Infineon / Siemens
2678 #endif
2679
2680 #ifdef IEN0__EA__EC__ES1__ES0__ET1__EX1__ET0__EX0
2681 #undef IEN0__EA__EC__ES1__ES0__ET1__EX1__ET0__EX0
2682 // P89C668 specific
2683 sfr at 0xA8 IEN0        ;
2684 // Bit registers
2685 sbit at 0xA8 EX0        ;
2686 sbit at 0xA9 ET0        ;
2687 sbit at 0xAA EX1        ;
2688 sbit at 0xAB ET1        ;
2689 sbit at 0xAC ES0        ;
2690 sbit at 0xAD ES1        ;
2691 sbit at 0xAE EC         ;
2692 sbit at 0xAF EA         ;
2693 #endif
2694
2695 #ifdef IEN1__x__x__x__x__x__x__x__ET2
2696 #undef IEN1__x__x__x__x__x__x__x__ET2
2697 // P89C668 specific bit registers
2698 sfr at 0xE8 IEN1        ;
2699 // Bit registers
2700 sbit at 0xE8 ET2        ;
2701 #endif
2702
2703 #ifdef IEN1__ET2__ECM2__ECM1__ECM0__ECT3__ECT2__ECT1__ECT0
2704 #undef IEN1__ET2__ECM2__ECM1__ECM0__ECT3__ECT2__ECT1__ECT0
2705 sfr at 0xE8 IEN1        ; // Interrupt enable 1, P80C552 specific
2706 // Bit registers
2707 sbit at 0xE8 ECT0       ;
2708 sbit at 0xE9 ECT1       ;
2709 sbit at 0xEA ECT2       ;
2710 sbit at 0xEB ECT3       ;
2711 sbit at 0xEC ECM0       ;
2712 sbit at 0xED ECM1       ;
2713 sbit at 0xEE ECM2       ;
2714 sbit at 0xEF ET2        ;
2715 #endif
2716
2717 #ifdef IEN1__EXEN2__SWDT__EX6__EX5__EX4__EX3__EX2__EADC
2718 #undef IEN1__EXEN2__SWDT__EX6__EX5__EX4__EX3__EX2__EADC
2719 sfr at 0xB8 IEN1        ; // interrupt enable register - SAB80515 specific
2720 // Bit registers
2721 sbit at 0xB8 EADC       ; // A/D converter interrupt enable
2722 sbit at 0xB9 EX2        ;
2723 sbit at 0xBA EX3        ;
2724 sbit at 0xBB EX4        ;
2725 sbit at 0xBC EX5        ;
2726 sbit at 0xBD EX6        ;
2727 sbit at 0xBE SWDT       ; // watchdog timer start/reset
2728 sbit at 0xBF EXEN2      ; // timer2 external reload interrupt enable
2729 #endif
2730
2731 #ifdef IEN2__SAB80517
2732 #undef IEN2__SAB80517
2733 sfr at 0x9A IEN2        ; // interrupt enable register 2 SAB80517
2734 #endif
2735
2736 #ifdef IP__x__x__x__PS__PT1__PX1__PT0__PX0
2737 #undef IP__x__x__x__PS__PT1__PX1__PT0__PX0
2738 sfr at 0xB8 IP          ;
2739 // Bit registers
2740 sbit at 0xB8 PX0        ;
2741 sbit at 0xB9 PT0        ;
2742 sbit at 0xBA PX1        ;
2743 sbit at 0xBB PT1        ;
2744 sbit at 0xBC PS         ;
2745 #endif
2746
2747 #ifdef IP__x__x__PT2__PS__PT1__PX1__PT0__PX0
2748 #undef IP__x__x__PT2__PS__PT1__PX1__PT0__PX0
2749 sfr at 0xB8 IP          ;
2750 // Bit registers
2751 sbit at 0xB8 PX0        ;
2752 sbit at 0xB9 PT0        ;
2753 sbit at 0xBA PX1        ;
2754 sbit at 0xBB PT1        ;
2755 sbit at 0xBC PS         ;
2756 sbit at 0xBC PS0        ;  // alternate name
2757 sbit at 0xBD PT2        ;
2758 #endif
2759
2760 #ifdef IP__x__PAD__PS1__PS0__PT1__PX1__PT0__PX0
2761 #undef IP__x__PAD__PS1__PS0__PT1__PX1__PT0__PX0
2762 sfr at 0xB8 IP          ; // Interrupt priority 0, P80C552 specific
2763 sfr at 0xB8 IP0         ; // alternate name
2764 // Bit registers
2765 sbit at 0xB8 PX0        ;
2766 sbit at 0xB9 PT0        ;
2767 sbit at 0xBA PX1        ;
2768 sbit at 0xBB PT1        ;
2769 sbit at 0xBC PS0        ;
2770 sbit at 0xBD PS1        ;
2771 sbit at 0xBE PAD        ;
2772 #endif
2773
2774 #ifdef IP__x__PPC__PT2__PS__PT1__PX1__PT0__PX0
2775 #undef IP__x__PPC__PT2__PS__PT1__PX1__PT0__PX0
2776 sfr at 0xB8 IP          ;
2777 // Bit registers
2778 sbit at 0xB8 PX0        ;
2779 sbit at 0xB9 PT0        ;
2780 sbit at 0xBA PX1        ;
2781 sbit at 0xBB PT1        ;
2782 sbit at 0xBC PS         ;
2783 sbit at 0xBD PT2        ;
2784 sbit at 0xBE PPC        ;
2785 #endif
2786
2787 #ifdef IP__x__PS1__PT2__PS__PT1_PX1__PT0__PX0
2788 #undef IP__x__PS1__PT2__PS__PT1_PX1__PT0__PX0
2789 sfr at 0xB8 IP          ;
2790 // Bit registers
2791 sbit at 0xB8 PX0        ;
2792 sbit at 0xB9 PT0        ;
2793 sbit at 0xBA PX1        ;
2794 sbit at 0xBB PT1        ;
2795 sbit at 0xBC PS         ;
2796 sbit at 0xBD PT2        ;
2797 sbit at 0xBE PS1        ;
2798 #endif
2799
2800 #ifdef IP__PT2__PPC__PS1__PS0__PT1__PX1__PT0__PX0
2801 #undef IP__PT2__PPC__PS1__PS0__PT1__PX1__PT0__PX0
2802 // P89C668 specific:
2803 sfr at 0xB8 IP          ;
2804 // Bit registers
2805 sbit at 0xB8 PX0        ;
2806 sbit at 0xB9 PT0        ;
2807 sbit at 0xBA PX1        ;
2808 sbit at 0xBB PT1        ;
2809 sbit at 0xBC PS0        ;
2810 sbit at 0xBD PS1        ;
2811 sbit at 0xBE PPC        ;
2812 sbit at 0xBF PT2        ;
2813 #endif
2814
2815 #ifdef IP__RWT__x__x__PS__PT1__PX1__PT0__PX0
2816 #undef IP__RWT__x__x__PS__PT1__PX1__PT0__PX0
2817 sfr at 0xB8 IP          ;
2818 // Bit registers
2819 sbit at 0xB8 PX0        ;
2820 sbit at 0xB9 PT0        ;
2821 sbit at 0xBA PX1        ;
2822 sbit at 0xBB PT1        ;
2823 sbit at 0xBC PS         ;
2824 sbit at 0xBF RWT        ;
2825 #endif
2826
2827 #ifdef IP0__x__WDTS__IP0_5__IP0_4__IP0_3__IP0_2__IP0_1__IP0_0
2828 #undef IP0__x__WDTS__IP0_5__IP0_4__IP0_3__IP0_2__IP0_1__IP0_0
2829 sfr at 0xA9 IP0         ; // interrupt priority register SAB80515 specific
2830 // Not directly accessible IP0 bits
2831 #define IP0_0       0x01
2832 #define IP0_1       0x02
2833 #define IP0_2       0x04
2834 #define IP0_3       0x08
2835 #define IP0_4       0x10
2836 #define IP0_5       0x20
2837 #define WDTS        0x40
2838 #endif
2839
2840 #ifdef IP0__x__LPS1__LPT2__LPS0__LPT1__LPX1__LPT0__LPX0
2841 #undef IP0__x__LPS1__LPT2__LPS0__LPT1__LPX1__LPT0__LPX0
2842 sfr at 0xB8 IP0         ; // interrupt priority register DS89C420 specific
2843 // Not directly accessible IP0 bits
2844 #define LPX0        0x01
2845 #define LPT0        0x02
2846 #define LPX1        0x04
2847 #define LPT1        0x08
2848 #define LPS0        0x10
2849 #define LPT2        0x20
2850 #define LPS1        0x40
2851 #endif
2852
2853 #ifdef IP1__x__x__IP1_5__IP1_4__IP1_3__IP1_2__IP1_1__IP1_0
2854 #undef IP1__x__x__IP1_5__IP1_4__IP1_3__IP1_2__IP1_1__IP1_0
2855 sfr at 0xB9 IP1         ; // interrupt priority register SAB80515 specific
2856 // Not directly accessible IP1 bits
2857 #define IP1_0       0x01
2858 #define IP1_1       0x02
2859 #define IP1_2       0x04
2860 #define IP1_3       0x08
2861 #define IP1_4       0x10
2862 #define IP1_5       0x20
2863 #endif
2864
2865 #ifdef IP1__x__MPS1__MPT2__MPS0__MPT1__MPX1__MPT0__MPX0
2866 #undef IP1__x__MPS1__MPT2__MPS0__MPT1__MPX1__MPT0__MPX0
2867 sfr at 0xB1 IP1         ; // interrupt priority register DS89C420 specific
2868 // Not directly accessible IP0 bits
2869 #define LPX0        0x01
2870 #define LPT0        0x02
2871 #define LPX1        0x04
2872 #define LPT1        0x08
2873 #define LPS0        0x10
2874 #define LPT2        0x20
2875 #define LPS1        0x40
2876 #endif
2877
2878 #ifdef IP1__PT2__PCM2__PCM1__PCM0__PCT3__PCT2__PCT1__PCT0
2879 #undef IP1__PT2__PCM2__PCM1__PCM0__PCT3__PCT2__PCT1__PCT0
2880 sfr at 0xF8 IP1         ; // Interrupt priority 1, P80C552 specific
2881 // Bit registers
2882 sbit at 0xF8 PCT0       ;
2883 sbit at 0xF9 PCT1       ;
2884 sbit at 0xFA PCT2       ;
2885 sbit at 0xFB PCT3       ;
2886 sbit at 0xFC PCM0       ;
2887 sbit at 0xFD PCM1       ;
2888 sbit at 0xFE PCM2       ;
2889 sbit at 0xFF PT2        ;
2890 #endif
2891
2892 #ifdef IPH__x__PPCH__PT2H__PSH__PT1H__PX1H__PT0H__PX0H
2893 #undef IPH__x__PPCH__PT2H__PSH__PT1H__PX1H__PT0H__PX0H
2894 sfr at 0xB7 IPH         ;
2895 #define PX0H        0x01
2896 #define PT0H        0x02
2897 #define PX1H        0x04
2898 #define PT1H        0x08
2899 #define PSH         0x10
2900 #define PT2H        0x20
2901 #define PPCH        0x40
2902 #endif
2903
2904 #ifdef IPH__PT2H__PPCH__PS1H__PS0H__PT1H__PX1H__PT0H__PX0H
2905 #undef IPH__PT2H__PPCH__PS1H__PS0H__PT1H__PX1H__PT0H__PX0H
2906 // P89C668 specific:
2907 sfr at 0xB7 IPH         ;
2908 // not bit addressable:
2909 #define PX0H        0x01
2910 #define PT0H        0x02
2911 #define PX1H        0x04
2912 #define PT1H        0x08
2913 #define PS0H        0x10
2914 #define PS1H        0x20
2915 #define PPCH        0x40
2916 #define PT2H        0x80
2917 #endif
2918
2919 #ifdef IRCON
2920 #undef IRCON
2921 sfr at 0xC0 IRCON       ; // interrupt control register - SAB80515 specific
2922 // Bit registers
2923 sbit at 0xC0 IADC       ; // A/D converter irq flag
2924 sbit at 0xC1 IEX2       ; // external interrupt edge detect flag
2925 sbit at 0xC2 IEX3       ;
2926 sbit at 0xC3 IEX4       ;
2927 sbit at 0xC4 IEX5       ;
2928 sbit at 0xC5 IEX6       ;
2929 sbit at 0xC6 TF2        ; // timer 2 owerflow flag
2930 sbit at 0xC7 EXF2       ; // timer2 reload flag
2931 #endif
2932
2933 #ifdef IRCON0
2934 #undef IRCON0
2935 sfr at 0xC0 IRCON0      ; // interrupt control register - SAB80515 specific
2936 // Bit registers
2937 sbit at 0xC0 IADC       ; // A/D converter irq flag
2938 sbit at 0xC1 IEX2       ; // external interrupt edge detect flag
2939 sbit at 0xC2 IEX3       ;
2940 sbit at 0xC3 IEX4       ;
2941 sbit at 0xC4 IEX5       ;
2942 sbit at 0xC5 IEX6       ;
2943 sbit at 0xC6 TF2        ; // timer 2 owerflow flag
2944 sbit at 0xC7 EXF2       ; // timer2 reload flag
2945 #endif
2946
2947 #ifdef IRCON1
2948 #undef IRCON1
2949 sfr at 0xD1 IRCON1      ; // interrupt control register - SAB80515 specific
2950 #endif
2951
2952 #ifdef MA
2953 #undef MA
2954 sfr at 0xD3 MA          ; // DS80C390
2955 #endif
2956
2957 #ifdef MB
2958 #undef MB
2959 sfr at 0xD4 MB          ; // DS80C390
2960 #endif
2961
2962 #ifdef MC
2963 #undef MC
2964 sfr at 0xD5 MC          ; // DS80C390
2965 #endif
2966
2967 #ifdef MCNT0
2968 #undef MCNT0
2969 sfr at 0xD1 MCNT0       ; // DS80C390
2970 #define MAS0        0x01
2971 #define MAS1        0x02
2972 #define MAS2        0x04
2973 #define MAS3        0x08
2974 #define MAS4        0x10
2975 #define SCB         0x20
2976 #define CSE         0x40
2977 #define LSHIFT      0x80
2978 #endif
2979
2980 #ifdef MCNT1
2981 #undef MCNT1
2982 sfr at 0xD2 MCNT1       ; // DS80C390
2983 #define CLM         0x10
2984 #define MOF         0x40
2985 #define MST         0x80
2986 #endif
2987
2988 #ifdef MCON__IDM1__IDM0__CMA__x__PDCE3__PDCE2__PDCE1__PDCE0
2989 #undef MCON__IDM1__IDM0__CMA__x__PDCE3__PDCE2__PDCE1__PDCE0
2990 sfr at 0xC6 MCON        ; // DS80C390
2991 #define PDCE0       0x01
2992 #define PDCE1       0x02
2993 #define PDCE2       0x04
2994 #define PDCE3       0x08
2995 #define CMA         0x20
2996 #define IDM0        0x40
2997 #define IDM1        0x80
2998 #endif
2999
3000 #ifdef MCON__PA3__PA2__PA1__PA0__RA32_8__ECE2__PAA__SL
3001 #undef MCON__PA3__PA2__PA1__PA0__RA32_8__ECE2__PAA__SL
3002 sfr at 0xC6 MCON        ; // DS5000
3003 #define SL          0x01
3004 #define PAA         0x02
3005 #define ECE2        0x04
3006 #define RA32_8      0x08
3007 #define PA0         0x10
3008 #define PA1         0x20
3009 #define PA2         0x40
3010 #define PA3         0x80
3011 #endif
3012
3013 #ifdef MCON__PA3__PA2__PA1__PA0__RG1__PES__PM__SL
3014 #undef MCON__PA3__PA2__PA1__PA0__RG1__PES__PM__SL
3015 sfr at 0xC6 MCON        ; // DS5001
3016 #define SL          0x01
3017 #define PM          0x02
3018 #define PES         0x04
3019 #define RG1         0x08
3020 #define PA0         0x10
3021 #define PA1         0x20
3022 #define PA2         0x40
3023 #define PA3         0x80
3024 #endif
3025
3026 #ifdef MD0
3027 #undef MD0
3028 sfr at 0xE9 MD0         ; // MUL / DIV register 0 SAB80517
3029 #endif
3030
3031 #ifdef MD1
3032 #undef MD1
3033 sfr at 0xEA MD1         ; // MUL / DIV register 1 SAB80517
3034 #endif
3035
3036 #ifdef MD2
3037 #undef MD2
3038 sfr at 0xEB MD2         ; // MUL / DIV register 2 SAB80517
3039 #endif
3040
3041 #ifdef MD3
3042 #undef MD3
3043 sfr at 0xEC MD3         ; // MUL / DIV register 3 SAB80517
3044 #endif
3045
3046 #ifdef MD4
3047 #undef MD4
3048 sfr at 0xED MD4         ; // MUL / DIV register 4 SAB80517
3049 #endif
3050
3051 #ifdef MD5
3052 #undef MD5
3053 sfr at 0xEE MD5         ; // MUL / DIV register 5 SAB80517
3054 #endif
3055
3056 #ifdef MXAX
3057 #undef MXAX
3058 sfr at 0xEA MXAX        ; // Dallas DS80C390
3059 #endif
3060
3061 #ifdef P0
3062 #undef P0
3063 sfr at 0x80 P0          ;
3064 //  Bit Registers
3065 sbit at 0x80 P0_0       ;
3066 sbit at 0x81 P0_1       ;
3067 sbit at 0x82 P0_2       ;
3068 sbit at 0x83 P0_3       ;
3069 sbit at 0x84 P0_4       ;
3070 sbit at 0x85 P0_5       ;
3071 sbit at 0x86 P0_6       ;
3072 sbit at 0x87 P0_7       ;
3073 #endif
3074
3075 #ifdef P0_EXT__AD7__AD6__AD5__AD4__AD3__AD2__AD1__AD0
3076 #undef P0_EXT__AD7__AD6__AD5__AD4__AD3__AD2__AD1__AD0
3077 // P89C668 alternate names for bits in P0
3078 sbit at 0x80 AD0        ;
3079 sbit at 0x81 AD1        ;
3080 sbit at 0x82 AD2        ;
3081 sbit at 0x83 AD3        ;
3082 sbit at 0x84 AD4        ;
3083 sbit at 0x85 AD5        ;
3084 sbit at 0x86 AD6        ;
3085 sbit at 0x87 AD7        ;
3086 #endif
3087
3088 #ifdef P1
3089 #undef P1
3090 sfr at 0x90 P1          ;
3091 // Bit registers
3092 sbit at 0x90 P1_0       ;
3093 sbit at 0x91 P1_1       ;
3094 sbit at 0x92 P1_2       ;
3095 sbit at 0x93 P1_3       ;
3096 sbit at 0x94 P1_4       ;
3097 sbit at 0x95 P1_5       ;
3098 sbit at 0x96 P1_6       ;
3099 sbit at 0x97 P1_7       ;
3100 #endif
3101
3102 #ifdef P1_EXT__INT5__INT4__INT3__INT2__TXD1__RXD1__T2EX__T2
3103 #undef P1_EXT__INT5__INT4__INT3__INT2__TXD1__RXD1__T2EX__T2
3104 // P1 alternate functions
3105 sbit at 0x90 T2         ;
3106 sbit at 0x91 T2EX       ;
3107 sbit at 0x92 RXD1       ;
3108 sbit at 0x93 TXD1       ;
3109 sbit at 0x94 INT2       ;
3110 sbit at 0x95 INT3       ;
3111 sbit at 0x96 INT4       ;
3112 sbit at 0x97 INT5       ;
3113 #endif
3114
3115 #ifdef P1_EXT__SDA__SCL__CEX2__CEX1__CEX0__ECI__T2EX__T2
3116 #undef P1_EXT__SDA__SCL__CEX2__CEX1__CEX0__ECI__T2EX__T2
3117 // P89C669 alternate names for bits at P1
3118 // P1_EXT__SDA__SCL__CEX2__CEX1__CEX0__ECI__T2EX__T2
3119 sbit at 0x90 T2         ;
3120 sbit at 0x91 T2EX       ;
3121 sbit at 0x92 ECI        ;
3122 sbit at 0x93 CEX0       ;
3123 sbit at 0x94 CEX1       ;
3124 sbit at 0x95 CEX2       ;
3125 sbit at 0x96 SCL        ;
3126 sbit at 0x97 SDA        ;
3127 #endif
3128
3129 #ifdef P1_EXT__T2__CLKOUT__T2EX__INT2__INT6_CC3__INT5_CC2__INT4_CC1__INT3_CC0
3130 sbit at 0x90 INT3_CC0   ; // P1 alternate functions - SAB80515 specific
3131 sbit at 0x91 INT4_CC1   ;
3132 sbit at 0x92 INT5_CC2   ;
3133 sbit at 0x93 INT6_CC3   ;
3134 sbit at 0x94 INT2       ;
3135 sbit at 0x95 T2EX       ;
3136 sbit at 0x96 CLKOUT     ;
3137 sbit at 0x97 T2         ;
3138 #endif
3139
3140 #ifdef P1_EXT__CT0I__CT1I__CT2I__CT3I__T2__RT2__SCL__SDA
3141 #undef P1_EXT__CT0I__CT1I__CT2I__CT3I__T2__RT2__SCL__SDA
3142 // Bit registers
3143 sbit at 0x90 CT0I       ; // Port 1 alternate functions, P80C552 specific
3144 sbit at 0x91 CT1I       ;
3145 sbit at 0x92 CT2I       ;
3146 sbit at 0x93 CT3I       ;
3147 sbit at 0x94 T2         ;
3148 sbit at 0x95 RT2        ;
3149 sbit at 0x96 SCL        ;
3150 sbit at 0x97 SDA        ;
3151 #endif
3152
3153 #ifdef P1_EXT__x__x__x__x__x__x__T2EX__T2
3154 #undef P1_EXT__x__x__x__x__x__x__T2EX__T2
3155 // P1 alternate functions
3156 sbit at 0x90 T2         ;
3157 sbit at 0x91 T2EX       ;
3158 #endif
3159
3160 #ifdef P2
3161 #undef P2
3162 sfr at 0xA0 P2          ;
3163 // Bit registers
3164 sbit at 0xA0 P2_0       ;
3165 sbit at 0xA1 P2_1       ;
3166 sbit at 0xA2 P2_2       ;
3167 sbit at 0xA3 P2_3       ;
3168 sbit at 0xA4 P2_4       ;
3169 sbit at 0xA5 P2_5       ;
3170 sbit at 0xA6 P2_6       ;
3171 sbit at 0xA7 P2_7       ;
3172 #endif
3173
3174 #ifdef P2_EXT__AD15__AD14__AD13__AD12__AD11__AD10__AD9__AD8
3175 #undef P2_EXT__AD15__AD14__AD13__AD12__AD11__AD10__AD9__AD8
3176 // P89C668 specific bit registers at P2:
3177 sbit at 0xA0 AD8        ;
3178 sbit at 0xA1 AD9        ;
3179 sbit at 0xA2 AD10       ;
3180 sbit at 0xA3 AD11       ;
3181 sbit at 0xA4 AD12       ;
3182 sbit at 0xA5 AD13       ;
3183 sbit at 0xA6 AD14       ;
3184 sbit at 0xA7 AD15       ;
3185 #endif
3186
3187 #ifdef P3
3188 #undef P3
3189 sfr at 0xB0 P3          ;
3190 // Bit registers
3191 sbit at 0xB0 P3_0       ;
3192 sbit at 0xB1 P3_1       ;
3193 sbit at 0xB2 P3_2       ;
3194 sbit at 0xB3 P3_3       ;
3195 sbit at 0xB4 P3_4       ;
3196 sbit at 0xB5 P3_5       ;
3197 #ifndef MCS51REG_EXTERNAL_RAM
3198 sbit at 0xB6 P3_6       ;
3199 sbit at 0xB7 P3_7       ;
3200 #endif
3201 // alternate names
3202 sbit at 0xB0 RXD        ;
3203 sbit at 0xB0 RXD0       ;
3204 sbit at 0xB1 TXD        ;
3205 sbit at 0xB1 TXD0       ;
3206 sbit at 0xB2 INT0       ;
3207 sbit at 0xB3 INT1       ;
3208 sbit at 0xB4 T0         ;
3209 sbit at 0xB5 T1         ;
3210 #ifndef MCS51REG_EXTERNAL_RAM
3211 sbit at 0xB6 WR         ;
3212 sbit at 0xB7 RD         ;
3213 #endif
3214 #endif
3215
3216 #ifdef P3_EXT__x__x__CEX4__CEX3__x__x__x__x
3217 #undef P3_EXT__x__x__CEX4__CEX3__x__x__x__x
3218 // P89C668 specific bit registers at P3 (alternate names)
3219 sbit at 0xB5 CEX4       ;
3220 sbit at 0xB4 CEX3       ;
3221 #endif
3222
3223 #ifdef P4_AT_0X80
3224 #undef P4_AT_0X80
3225 sfr at 0x80 P4          ; // Port 4 - DS80C390
3226 // Bit registers
3227 sbit at 0x80 P4_0       ;
3228 sbit at 0x81 P4_1       ;
3229 sbit at 0x82 P4_2       ;
3230 sbit at 0x83 P4_3       ;
3231 sbit at 0x84 P4_4       ;
3232 sbit at 0x85 P4_5       ;
3233 sbit at 0x86 P4_6       ;
3234 sbit at 0x87 P4_7       ;
3235 #endif
3236
3237 #ifdef P4_AT_0XC0__CMT0__CMT1__CMSR5__CMSR4__CMSR3__CMSR2__CMSR1__CMSR0
3238 #undef P4_AT_0XC0__CMT0__CMT1__CMSR5__CMSR4__CMSR3__CMSR2__CMSR1__CMSR0
3239 sfr at 0xC0 P4          ; // Port 4, P80C552 specific
3240 // Bit registers
3241 sbit at 0xC0 CMSR0      ;
3242 sbit at 0xC1 CMSR1      ;
3243 sbit at 0xC2 CMSR2      ;
3244 sbit at 0xC3 CMSR3      ;
3245 sbit at 0xC4 CMSR4      ;
3246 sbit at 0xC5 CMSR5      ;
3247 sbit at 0xC6 CMT0       ;
3248 sbit at 0xC7 CMT1       ;
3249 #endif
3250
3251 #ifdef P4_AT_0XC0__P4_7__P4_6__P4_5__P4_3__P4_2__P4_1__P4_0
3252 #undef P4_AT_0XC0__P4_7__P4_6__P4_5__P4_3__P4_2__P4_1__P4_0
3253 sfr at 0xC0 P4          ; // Port 4, T89C51 specific
3254 // Bit registers
3255 sbit at 0xC0 P4_0       ;
3256 sbit at 0xC1 P4_1       ;
3257 sbit at 0xC2 P4_2       ;
3258 sbit at 0xC3 P4_3       ;
3259 sbit at 0xC4 P4_4       ;
3260 sbit at 0xC5 P4_5       ;
3261 sbit at 0xC6 P4_6       ;
3262 sbit at 0xC7 P4_7       ;
3263 #endif
3264
3265 #ifdef P4_AT_0XE8
3266 #undef P4_AT_0XE8
3267 sfr at 0xE8 P4          ; // Port 4 - SAB80515 & compatible microcontrollers
3268 // Bit registers
3269 sbit at 0xE8 P4_0       ;
3270 sbit at 0xE9 P4_1       ;
3271 sbit at 0xEA P4_2       ;
3272 sbit at 0xEB P4_3       ;
3273 sbit at 0xEC P4_4       ;
3274 sbit at 0xED P4_5       ;
3275 sbit at 0xEE P4_6       ;
3276 sbit at 0xEF P4_7       ;
3277 #endif
3278
3279 #ifdef P4CNT
3280 #undef P4CNT
3281 sfr at 0x92 P4CNT       ; // DS80C390
3282 // Not directly accessible bits
3283 #define P4CNT_0     0x01
3284 #define P4CNT_1     0x02
3285 #define P4CNT_2     0x04
3286 #define P4CNT_3     0x08
3287 #define P4CNT_4     0x10
3288 #define P4CNT_5     0x20
3289 #define SBCAN       0x40
3290 #endif
3291
3292 #ifdef P5_AT_0XA1
3293 #undef P5_AT_0XA1
3294 sfr at 0xA1 P5          ; // Port 5 - DS80C390
3295 #endif
3296
3297 #ifdef P5_AT_0XE8
3298 #undef P5_AT_0XE8
3299 sfr at 0xE8 P5          ; // Port 5 - T89C51RD2
3300 // Bit registers
3301 sbit at 0xE8 P5_0       ;
3302 sbit at 0xE9 P5_1       ;
3303 sbit at 0xEA P5_2       ;
3304 sbit at 0xEB P5_3       ;
3305 sbit at 0xEC P5_4       ;
3306 sbit at 0xED P5_5       ;
3307 sbit at 0xEE P5_6       ;
3308 sbit at 0xEF P5_7       ;
3309 #endif
3310
3311 #ifdef P5CNT
3312 #undef P5CNT
3313 sfr at 0xA2 P5CNT       ; // DS80C390
3314 // Not directly accessible bits
3315 #define P5CNT_0     0x01
3316 #define P5CNT_1     0x02
3317 #define P5CNT_2     0x04
3318 #define C0_I_O      0x08
3319 #define C1_I_O      0x10
3320 #define SP1EC       0x20
3321 #define SBCAN0BA    0x40
3322 #define SBCAN1BA    0x80
3323 #endif
3324
3325 #ifdef P5_AT_0XC4
3326 #undef P5_AT_0XC4
3327 sfr at 0xC4 P5          ; // Port 5, P80C552 specific
3328 // Not directly accessible Bits.
3329 #define ADC0        0x01
3330 #define ADC1        0x02
3331 #define ADC2        0x04
3332 #define ADC3        0x08
3333 #define ADC4        0x10
3334 #define ADC5        0x20
3335 #define ADC6        0x40
3336 #define ADC7        0x80
3337 #endif
3338
3339 #ifdef P5_AT_0XF8
3340 #undef P5_AT_0XF8
3341 sfr at 0xF8 P5          ; // Port 5 - SAB80515 & compatible microcontrollers
3342 // Bit registers
3343 sbit at 0xF8 P5_0       ;
3344 sbit at 0xF9 P5_1       ;
3345 sbit at 0xFA P5_2       ;
3346 sbit at 0xFB P5_3       ;
3347 sbit at 0xFC P5_4       ;
3348 sbit at 0xFD P5_5       ;
3349 sbit at 0xFE P5_6       ;
3350 sbit at 0xFF P5_7       ;
3351 #endif
3352
3353 #ifdef P6_AT_0XDB
3354 #undef P6_AT_0XDB
3355 sfr at 0xDB P6          ; // Port 6 - SAB80515 & compatible microcontrollers
3356 #endif
3357
3358 #ifdef P6_AT_0XFA
3359 #undef P6_AT_0XFA
3360 sfr at 0xFA P6          ; // Port 6 - SAB80517 specific
3361 #endif
3362
3363 #ifdef P7_AT_0XDB
3364 #undef P7_AT_0XDB
3365 sfr at 0xDB P7          ; // Port 7 - SAB80517 specific
3366 #endif
3367
3368 #ifdef P8_AT_0XDD
3369 #undef P8_AT_0XDD
3370 sfr at 0xDD P8          ; // Port 6 - SAB80517 specific
3371 #endif
3372
3373 #ifdef PCON__SMOD__x__x__x__x__x__x__x
3374 #undef PCON__SMOD__x__x__x__x__x__x__x
3375 sfr at 0x87 PCON        ;
3376 // Not directly accessible PCON bits
3377 #define SMOD        0x80
3378 #endif
3379
3380 #ifdef PCON__SMOD__x__x__x__GF1__GF0__PD__IDL
3381 #undef PCON__SMOD__x__x__x__GF1__GF0__PD__IDL
3382 sfr at 0x87 PCON        ;
3383 // Not directly accessible PCON bits
3384 #define IDL         0x01
3385 #define PD          0x02
3386 #define GF0         0x04
3387 #define GF1         0x08
3388 #define SMOD        0x80
3389 #endif
3390
3391 #ifdef PCON__SMOD__x__x__WLE__GF1__GF0__PD__IDL
3392 #undef PCON__SMOD__x__x__WLE__GF1__GF0__PD__IDL
3393 sfr at 0x87 PCON        ; // PCON, P80C552 specific
3394 // Not directly accessible Bits.
3395 #define IDL         0x01
3396 #define IDLE        0x01 /* same as IDL */
3397 #define PD          0x02
3398 #define GF0         0x04
3399 #define GF1         0x08
3400 #define WLE         0x10
3401 #define SMOD        0x80
3402 #endif
3403
3404 #ifdef PCON__SMOD__PDS__IDLS__x__x__x__PD__IDL
3405 #undef PCON__SMOD__PDS__IDLS__x__x__x__PD__IDL
3406 sfr at 0x87 PCON        ;
3407 // Not directly accessible PCON bits
3408 #define IDL         0x01
3409 #define IDLE        0x01 /* same as IDL */
3410 #define PD          0x02
3411 #define PDE         0x02 /* same as PD */
3412 #define IDLS        0x20
3413 #define PDS         0x40
3414 #define SMOD        0x80
3415 // alternate names
3416 #define PCON_IDLE   0x01
3417 #define PCON_PDE    0x02
3418 #define PCON_GF0    0x04
3419 #define PCON_GF1    0x08
3420 #define PCON_IDLS   0x20
3421 #define PCON_PDS    0x40
3422 #define PCON_SMOD   0x80
3423 #endif
3424
3425 #ifdef PCON__SMOD__POR__PFW__WTR__EPFW__EWT__STOP__IDL
3426 #undef PCON__SMOD__POR__PFW__WTR__EPFW__EWT__STOP__IDL
3427 sfr at 0x87 PCON        ;
3428 // Not directly accessible PCON bits
3429 #define IDL         0x01
3430 #define IDLE        0x01 /* same as IDL */
3431 #define STOP        0x02
3432 #define EWT         0x04
3433 #define EPFW        0x08
3434 #define WTR         0x10
3435 #define PFW         0x20
3436 #define POR         0x40
3437 #define SMOD        0x80
3438 #endif
3439
3440 #ifdef PCON__SMOD__SMOD0__x__x__GF1__GF0__STOP__IDLE
3441 #undef PCON__SMOD__SMOD0__x__x__GF1__GF0__STOP__IDLE
3442 sfr at 0x87 PCON        ;
3443 // Not directly accessible PCON bits
3444 #define IDL         0x01
3445 #define IDLE        0x01  /* same as IDL */
3446 #define STOP        0x02
3447 #define GF0         0x04
3448 #define GF1         0x08
3449 #define SMOD0       0x40
3450 #define SMOD        0x80
3451 #endif
3452
3453 #ifdef PCON__SMOD__SMOD0__OFDF__OFDE__GF1__GF0__STOP__IDLE
3454 #undef PCON__SMOD__SMOD0__OFDF__OFDE__GF1__GF0__STOP__IDLE
3455 sfr at 0x87 PCON        ;
3456 // Not directly accessible PCON bits
3457 #define IDL         0x01
3458 #define IDLE        0x01 /* same as IDL */
3459 #define STOP        0x02
3460 #define GF0         0x04
3461 #define GF1         0x08
3462 #define OFDE        0x10
3463 #define OFDF        0x20
3464 #define SMOD0       0x40
3465 #define SMOD        0x80
3466 #define SMOD_0      0x80 /* same as SMOD */
3467 #endif
3468
3469 #ifdef PCON__SMOD1__SMOD0__x__POF__GF1__GF0__PD__IDL
3470 #undef PCON__SMOD1__SMOD0__x__POF__GF1__GF0__PD__IDL
3471 sfr at 0x87 PCON        ;
3472 #define IDL         0x01
3473 #define PD          0x02
3474 #define GF0         0x04
3475 #define GF1         0x08
3476 #define POF         0x10
3477 #define SMOD0       0x40
3478 #define SMOD1       0x80
3479 #endif
3480
3481 #ifdef PMR__CD1__CD0__SWB__x__XTOFF__ALEOFF__DME1__DME0
3482 #undef PMR__CD1__CD0__SWB__x__XTOFF__ALEOFF__DME1__DME0
3483 sfr at 0xC4 PMR         ; // DS87C520, DS83C520
3484 // Not directly accessible bits
3485 #define DME0        0x01
3486 #define DME1        0x02
3487 #define ALEOFF      0x04
3488 #define XTOFF       0x08
3489 #define SWB         0x20
3490 #define CD0         0x40
3491 #define CD1         0x80
3492 #endif
3493
3494 #ifdef PMR__CD1__CD0__SWB__CTM__4X_2X__ALEOFF__x__x
3495 #undef PMR__CD1__CD0__SWB__CTM__4X_2X__ALEOFF__x__x
3496 sfr at 0xC4 PMR         ; // DS80C390
3497 // Not directly accessible bits
3498 #define ALEOFF      0x04
3499 #define XTOFF       0x08
3500 #define _4X_2X      0x10
3501 #define SWB         0x20
3502 #define CD0         0x40
3503 #define CD1         0x80
3504 #endif
3505
3506 #ifdef PMR__CD1__CD0__SWB__CTM__4X_2X__ALEON__DME1__DME0
3507 #undef PMR__CD1__CD0__SWB__CTM__4X_2X__ALEON__DME1__DME0
3508 sfr at 0xC4 PMR         ; // DS89C420
3509 // Not directly accessible bits
3510 #define DME0        0x01
3511 #define DME1        0x02
3512 #define ALEON       0x04
3513 #define _4X_2X      0x08
3514 #define CTM         0x10
3515 #define SWB         0x20
3516 #define CD0         0x40
3517 #define CD1         0x80
3518 #endif
3519
3520 #ifdef PSW
3521 #undef PSW
3522 sfr at 0xD0 PSW         ;
3523 // Bit registers
3524 sbit at 0xD0 P          ;
3525 sbit at 0xD1 F1         ;
3526 sbit at 0xD2 OV         ;
3527 sbit at 0xD3 RS0        ;
3528 sbit at 0xD4 RS1        ;
3529 sbit at 0xD5 F0         ;
3530 sbit at 0xD6 AC         ;
3531 sbit at 0xD7 CY         ;
3532 #endif
3533
3534 #ifdef PWM0_AT_0XFC
3535 #undef PWM0_AT_0XFC
3536 sfr at 0xFC PWM0        ; // PWM register 0, P80C552 specific
3537 #endif
3538
3539 #ifdef PWM1_AT_0XFD
3540 #undef PWM1_AT_0XFD
3541 sfr at 0xFD PWM1        ; // PWM register 1, P80C552 specific
3542 #endif
3543
3544 #ifdef PWMP_AT_0XFE
3545 #undef PWMP_AT_0XFE
3546 sfr at 0xFE PWMP        ; // PWM prescaler, P80C552 specific
3547 #endif
3548
3549 #ifdef RCAP2H
3550 #undef RCAP2H
3551 sfr at 0xCB RCAP2H      ;
3552 #endif
3553
3554 #ifdef RCAP2L
3555 #undef RCAP2L
3556 sfr at 0xCA RCAP2L      ;
3557 #endif
3558
3559 #ifdef RNR
3560 #undef RNR
3561 sfr at 0xCF RNR         ;
3562 #endif
3563
3564 #ifdef ROMSIZE__x__x__x__x__x__RMS2__RMS1__RMS0
3565 #undef ROMSIZE__x__x__x__x__x__RMS2__RMS1__RMS0
3566 sfr at 0xC2 ROMSIZE     ; // DS87C520, DS83C520
3567 // Not directly accessible bits
3568 #define RSM0        0x01
3569 #define RSM1        0x02
3570 #define RSM2        0x04
3571 #endif
3572
3573 #ifdef ROMSIZE__x__x__x__x__PRAME__RMS2__RMS1__RMS0
3574 #undef ROMSIZE__x__x__x__x__PRAME__RMS2__RMS1__RMS0
3575 sfr at 0xC2 ROMSIZE     ; // DS89C420
3576 // Not directly accessible bits
3577 #define RSM0        0x01
3578 #define RSM1        0x02
3579 #define RSM2        0x04
3580 #define PRAME       0x08
3581 #endif
3582
3583 #ifdef ROMSIZE__HBPF__BPF__TE__MOVCX__PRAME__RMS2__RMS1__RMS0
3584 #undef ROMSIZE__HBPF__BPF__TE__MOVCX__PRAME__RMS2__RMS1__RMS0
3585 sfr at 0xC2 ROMSIZE     ; // DS87C520, DS83C520
3586 // Not directly accessible bits
3587 #define RSM0        0x01
3588 #define RSM1        0x02
3589 #define RSM2        0x04
3590 #define PRAME       0x08
3591 #define MOVCX       0x10
3592 #define TE          0x20
3593 #define BPF         0x40
3594 #define HBPF        0x80
3595 #endif
3596
3597 #ifdef RPCTL
3598 #undef RPCTL
3599 sfr at 0xD8 RPCTL       ;  // Dallas DS5001 specific
3600 sbit at 0xD8 RG0        ;
3601 sbit at 0xD9 RPCON      ;
3602 sbit at 0xDA DMA        ;
3603 sbit at 0xDB IBI        ;
3604 sbit at 0xDC AE         ;
3605 sbit at 0xDD EXBS       ;
3606 sbit at 0xDF RNR_FLAG   ;
3607 #endif
3608
3609 #ifdef RTE__TP47__TP46__RP45__RP44__RP43__RP42__RP41__RP40
3610 #undef RTE__TP47__TP46__RP45__RP44__RP43__RP42__RP41__RP40
3611 sfr at 0xEF RTE         ; // Reset/toggle enable, P80C552 specific
3612 // Not directly accessible Bits.
3613 #define RP40        0x01
3614 #define RP41        0x02
3615 #define RP42        0x04
3616 #define RP43        0x08
3617 #define RP44        0x10
3618 #define RP45        0x20
3619 #define TP46        0x40
3620 #define TP47        0x80
3621 #endif
3622
3623 #ifdef S0BUF
3624 #undef S0BUF
3625 sfr at 0x99 S0BUF       ; // serial channel 0 buffer register SAB80517 specific
3626 #endif
3627
3628 #ifdef S0CON__SM0__SM1__SM2__REN__TB8__RB8__TI__RI
3629 #undef S0CON__SM0__SM1__SM2__REN__TB8__RB8__TI__RI
3630 sfr at 0x98 S0CON       ; // serial channel 0 control register P80C552 specific
3631 // Bit registers
3632 // Already defined in SCON
3633 //sbit at 0x98 RI0  ;
3634 //sbit at 0x99 TI0  ;
3635 //sbit at 0x9A RB8  ;
3636 //sbit at 0x9B TB8  ;
3637 //sbit at 0x9C REN  ;
3638 //sbit at 0x9D SM2  ;
3639 //sbit at 0x9E SM1  ;
3640 //sbit at 0x9F SM0  ;
3641 #endif
3642
3643 #ifdef S0CON__SM0__SM1__SM20__REN0__TB80__RB80__TI0__RI0
3644 #undef S0CON__SM0__SM1__SM20__REN0__TB80__RB80__TI0__RI0
3645 // serial channel 0 buffer register SAB80517 specific(same as stock SCON)
3646 sfr at 0x98 S0CON       ;
3647 sbit at 0x98 RI0        ;
3648 sbit at 0x99 TI0        ;
3649 sbit at 0x9A RB80       ;
3650 sbit at 0x9B TB80       ;
3651 sbit at 0x9C REN0       ;
3652 sbit at 0x9D SM20       ;
3653 sbit at 0x9E SM1        ;
3654 sbit at 0x9F SM0        ;
3655 #endif
3656
3657 #ifdef S0RELL
3658 #undef S0RELL
3659 sfr at 0xAA S0RELL      ; // serial channel 0 reload register low byte SAB80517 specific
3660 #endif
3661
3662 #ifdef S0RELH
3663 #undef S0RELH
3664 sfr at 0xBA S0RELH      ; // serial channel 0 reload register high byte SAB80517 specific
3665 #endif
3666
3667 #ifdef S1ADR__x__x__x__x__x__x__x__GC
3668 #undef S1ADR__x__x__x__x__x__x__x__GC
3669 sfr at 0xDB S1ADR       ; // Serial 1 address, P80C552 specific
3670 // Not directly accessible Bits.
3671 #define GC      0x01
3672 #endif
3673
3674 #ifdef S1BUF
3675 #undef S1BUF
3676 sfr at 0x9C S1BUF       ; // serial channel 1 buffer register SAB80517 specific
3677 #endif
3678
3679 #ifdef S1CON_AT_0X9B
3680 #undef S1CON_AT_0X9B
3681 sfr at 0x9B S1CON       ; // serial channel 1 control register SAB80517 specific
3682 #endif
3683
3684 #ifdef S1CON__CR2__ENS1__STA__ST0__SI__AA__CR1__CR0
3685 #undef S1CON__CR2__ENS1__STA__ST0__SI__AA__CR1__CR0
3686 sfr at 0xD8 S1CON       ; // Serial 1 control, P80C552 specific
3687 sfr at 0xD8 SICON       ; // sometimes called SICON
3688 // Bit register
3689 sbit at 0xD8 CR0        ;
3690 sbit at 0xD9 CR1        ;
3691 sbit at 0xDA AA         ;
3692 sbit at 0xDB SI         ;
3693 sbit at 0xDC ST0        ;
3694 sbit at 0xDD STA        ;
3695 sbit at 0xDE ENS1       ;
3696 sbit at 0xDF CR2        ;
3697 #endif
3698
3699 #ifdef S1DAT_AT_0XDA
3700 #undef S1DAT_AT_0XDA
3701 sfr at 0xDA S1DAT       ; // Serial 1 data, P80C552 specific
3702 sfr at 0xDA SIDAT       ; // sometimes called SIDAT
3703 #endif
3704
3705 #ifdef S1IST_AT_0XDC
3706 #undef S1IST_AT_0XDC
3707 // P89C668 specific
3708 sfr at 0xDC S1IST       ;
3709 #endif
3710
3711 #ifdef S1RELL
3712 #undef S1RELL
3713 sfr at 0x9D S1RELL      ; // serial channel 1 reload register low byte SAB80517 specific
3714 #endif
3715
3716 #ifdef S1RELH
3717 #undef S1RELH
3718 sfr at 0xBB S1RELH      ; // serial channel 1 reload register high byte SAB80517 specific
3719 #endif
3720
3721 #ifdef S1STA__SC4__SC3__SC2__SC1__SC0__x__x__x
3722 #undef S1STA__SC4__SC3__SC2__SC1__SC0__x__x__x
3723 sfr at 0xD9 S1STA       ; // Serial 1 status, P80C552 specific
3724 // Not directly accessible Bits.
3725 #define SC0         0x08
3726 #define SC1         0x10
3727 #define SC2         0x20
3728 #define SC3         0x40
3729 #define SC4         0x80
3730 #endif
3731
3732 #ifdef SADR_AT_0XA9
3733 #undef SADR_AT_0XA9
3734 sfr at 0xA9 SADDR       ;
3735 #endif
3736
3737 #ifdef SADDR0
3738 #undef SADDR0
3739 // DS80C320 specific
3740 sfr at 0xA9 SADDR0      ;
3741 #endif
3742
3743 #ifdef SADDR1
3744 #undef SADDR1
3745 // DS80C320 specific
3746 sfr at 0xAA SADDR1      ;
3747 #endif
3748
3749 #ifdef SADEN_AT_0XB9
3750 #undef SADEN_AT_0XB9
3751 sfr at 0xB9 SADEN       ;
3752 #endif
3753
3754 #ifdef SADEN0
3755 #undef SADEN0
3756 // DS80C320 & DS80C390 specific
3757 sfr at 0xB9 SADEN0      ;
3758 #endif
3759
3760 #ifdef SADEN1
3761 #undef SADEN1
3762 // DS80C320 & DS80C390 specific
3763 sfr at 0xBA SADEN1      ;
3764 #endif
3765
3766 #ifdef SBUF
3767 #undef SBUF
3768 sfr at 0x99 SBUF        ;
3769 sfr at 0x99 SBUF0       ;
3770 #endif
3771
3772 #ifdef SBUF1
3773 #undef SBUF1
3774 // DS80C320 & DS80C390 specific
3775 sfr at 0xC1 SBUF1       ;
3776 #endif
3777
3778 #ifdef SCON
3779 #undef SCON
3780 sfr at 0x98 SCON        ;
3781 // Bit registers
3782 sbit at 0x98 RI         ;
3783 sbit at 0x99 TI         ;
3784 sbit at 0x9A RB8        ;
3785 sbit at 0x9B TB8        ;
3786 sbit at 0x9C REN        ;
3787 sbit at 0x9D SM2        ;
3788 sbit at 0x9E SM1        ;
3789 sbit at 0x9F SM0        ;
3790 #endif
3791
3792 #ifdef SCON0
3793 #undef SCON0
3794 sfr at 0x98 SCON0       ;
3795 // Bit registers
3796 sbit at 0x98 RI_0       ;
3797 sbit at 0x99 TI_0       ;
3798 sbit at 0x9A RB8_0      ;
3799 sbit at 0x9B TB8_0      ;
3800 sbit at 0x9C REN_0      ;
3801 sbit at 0x9D SM2_0      ;
3802 sbit at 0x9E SM1_0      ;
3803 sbit at 0x9F SM0_0      ;
3804 sbit at 0x9F FE_0       ;
3805 sbit at 0x9F SM0_FE_0   ;
3806 #endif
3807
3808 #ifdef SCON1
3809 #undef SCON1
3810 // DS80C320 - 80C390 specific
3811 sfr at 0xC0 SCON1       ;
3812 // Bit registers
3813 sbit at 0xC0 RI_1       ;
3814 sbit at 0xC1 TI_1       ;
3815 sbit at 0xC2 RB8_1      ;
3816 sbit at 0xC3 TB8_1      ;
3817 sbit at 0xC4 REN_1      ;
3818 sbit at 0xC5 SM2_1      ;
3819 sbit at 0xC6 SM1_1      ;
3820 sbit at 0xC7 SM0_1      ;
3821 sbit at 0xC7 FE_1       ;
3822 sbit at 0xC7 SM0_FE_1   ;
3823 #endif
3824
3825 #ifdef SP
3826 #undef SP
3827 sfr at 0x81 SP          ;
3828 #endif
3829
3830 #ifdef SPCR
3831 #undef SPCR
3832 sfr at 0xD5 SPCR        ; // AT89S53 specific
3833 // Not directly accesible bits
3834 #define SPR0        0x01
3835 #define SPR1        0x02
3836 #define CPHA        0x04
3837 #define CPOL        0x08
3838 #define MSTR        0x10
3839 #define DORD        0x20
3840 #define SPE         0x40
3841 #define SPIE        0x80
3842 #endif
3843
3844 #ifdef SPDR
3845 #undef SPDR
3846 sfr at 0x86 SPDR        ; // AT89S53 specific
3847 // Not directly accesible bits
3848 #define SPD_0       0x01
3849 #define SPD_1       0x02
3850 #define SPD_2       0x04
3851 #define SPD_3       0x08
3852 #define SPD_4       0x10
3853 #define SPD_5       0x20
3854 #define SPD_6       0x40
3855 #define SPD_7       0x80
3856 #endif
3857
3858 #ifdef SPSR
3859 #undef SPSR
3860 sfr at 0xAA SPSR        ; // AT89S53 specific
3861 // Not directly accesible bits
3862 #define SPIF        0x40
3863 #define WCOL        0x80
3864 #endif
3865
3866 #ifdef SRELH
3867 #undef SRELH
3868 sfr at 0xBA SRELH       ; // Baudrate generator reload high
3869 #endif
3870
3871 #ifdef SRELL
3872 #undef SRELL
3873 sfr at 0xAA SRELL       ; // Baudrate generator reload low
3874 #endif
3875
3876 #ifdef STATUS__PIP__HIP__LIP__x__x__x__x__x
3877 #undef STATUS__PIP__HIP__LIP__x__x__x__x__x
3878 // DS80C320 specific
3879 sfr at 0xC5 STATUS      ;
3880 // Not directly accessible Bits. DS80C320 specific
3881 #define LIP         0x20
3882 #define HIP         0x40
3883 #define PIP         0x80
3884 #endif
3885
3886 #ifdef STATUS__PIP__HIP__LIP__x__SPTA1__SPRA1__SPTA0__SPRA0
3887 #undef STATUS__PIP__HIP__LIP__x__SPTA1__SPRA1__SPTA0__SPRA0
3888 sfr at 0xC5 STATUS      ; // DS80C390 specific
3889 // Not directly accessible Bits.
3890 #define SPRA0       0x01
3891 #define SPTA0       0x02
3892 #define SPRA1       0x04
3893 #define SPTA1       0x08
3894 #define LIP         0x20
3895 #define HIP         0x40
3896 #define PIP         0x80
3897 #endif
3898
3899 #ifdef STATUS__PIS2__PIS1__PIS0__x__SPTA1__SPRA1__SPTA0__SPRA0
3900 #undef STATUS__PIS2__PIS1__PIS0__x__SPTA1__SPRA1__SPTA0__SPRA0
3901 sfr at 0xC5 STATUS      ; // DS89C420 specific
3902 // Not directly accessible Bits.
3903 #define SPRA0       0x01
3904 #define SPTA0       0x02
3905 #define SPRA1       0x04
3906 #define SPTA1       0x08
3907 #define PIS0        0x20
3908 #define PIS1        0x40
3909 #define PIS2        0x80
3910 #endif
3911
3912 #ifdef STATUS__PIP__HIP__LIP__x__SPTA1__SPRA1__SPTA0__SPRA0
3913 #undef STATUS__PIP__HIP__LIP__x__SPTA1__SPRA1__SPTA0__SPRA0
3914 sfr at 0xC5 STATUS      ; // DS80C390 specific
3915 // Not directly accessible Bits.
3916 #define SPRA0       0x01
3917 #define SPTA0       0x02
3918 #define SPRA1       0x04
3919 #define SPTA1       0x08
3920 #define LIP         0x20
3921 #define HIP         0x40
3922 #define PIP         0x80
3923 #endif
3924
3925 #ifdef STATUS__PIP__HIP__LIP__XTUP__SPTA2__SPTA1__SPTA0__SPRA0
3926 #undef STATUS__PIP__HIP__LIP__XTUP__SPTA2__SPTA1__SPTA0__SPRA0
3927 sfr at 0xC5 STATUS      ; // DS87C520 & DS83520specific
3928 // Not directly accessible Bits.
3929 #define SPRA0       0x01
3930 #define SPTA0       0x02
3931 #define SPTA1       0x04
3932 #define SPTA2       0x08
3933 #define XTUP        0x10
3934 #define LIP         0x20
3935 #define HIP         0x40
3936 #define PIP         0x80
3937 #endif
3938
3939 #ifdef STATUS__ST7__ST6__ST5__ST4__IA0__F0__IBF__OBF
3940 #undef STATUS__ST7__ST6__ST5__ST4__IA0__F0__IBF__OBF
3941 sfr at 0xDA STATUS      ; // DS5001specific
3942 // Not directly accessible Bits.
3943 #define OBF         0x01
3944 #define IBF         0x02
3945 #define F0          0x04
3946 #define IA0         0x08
3947 #define ST4         0x10
3948 #define ST5         0x20
3949 #define ST6         0x40
3950 #define ST7         0x80
3951 #endif
3952
3953 #ifdef STE__TG47__TG46__SP45__SP44__SP43__SP42__SP41__SP40
3954 #undef STE__TG47__TG46__SP45__SP44__SP43__SP42__SP41__SP40
3955 sfr at 0xEE STE         ; // Set enable, P80C552 specific
3956 // Not directly accessible Bits.
3957 #define SP40        0x01
3958 #define SP41        0x02
3959 #define SP42        0x04
3960 #define SP43        0x08
3961 #define SP44        0x10
3962 #define SP45        0x20
3963 #define TG46        0x40
3964 #define TG47        0x80
3965 #endif
3966
3967 #ifdef SYSCON
3968 #undef SYSCON
3969 sfr at 0xB1 SYSCON      ; // XRAM Controller Access Control
3970 // SYSCON bits
3971 #define SYSCON_XMAP0 0x01
3972 #define SYSCON_XMAP1 0x02
3973 #define SYSCON_RMAP  0x10
3974 #define SYSCON_EALE  0x20
3975 #endif
3976
3977 #ifdef T2CON__TF2__EXF2__RCLK__TCLK__EXEN2__TR2__C_T2__CP_RL2
3978 #undef T2CON__TF2__EXF2__RCLK__TCLK__EXEN2__TR2__C_T2__CP_RL2
3979 sfr at 0xC8 T2CON       ;
3980 // Definitions for the 8052 compatible microcontrollers.
3981 // Bit registers
3982 sbit at 0xC8 CP_RL2     ;
3983 sbit at 0xC9 C_T2       ;
3984 sbit at 0xCA TR2        ;
3985 sbit at 0xCB EXEN2      ;
3986 sbit at 0xCC TCLK       ;
3987 sbit at 0xCD RCLK       ;
3988 sbit at 0xCE EXF2       ;
3989 sbit at 0xCF TF2        ;
3990 // alternate names
3991 sbit at 0xC8 T2CON_0    ;
3992 sbit at 0xC9 T2CON_1    ;
3993 sbit at 0xCA T2CON_2    ;
3994 sbit at 0xCB T2CON_3    ;
3995 sbit at 0xCC T2CON_4    ;
3996 sbit at 0xCD T2CON_5    ;
3997 sbit at 0xCE T2CON_6    ;
3998 sbit at 0xCF T2CON_7    ;
3999 #endif
4000
4001 #ifdef T2CON__T2PS__I3FR__I2FR__T2R1__T2R0__T2CM__T2I1__T2I0
4002 #undef T2CON__T2PS__I3FR__I2FR__T2R1__T2R0__T2CM__T2I1__T2I0
4003 sfr at 0xC8 T2CON       ;
4004 // Definitions for the Infineon / Siemens SAB80515, SAB80515A, SAB80517
4005 // Bit registers
4006 sbit at 0xC8 T2I0       ;
4007 sbit at 0xC9 T2I1       ;
4008 sbit at 0xCA T2CM       ;
4009 sbit at 0xCB T2R0       ;
4010 sbit at 0xCC T2R1       ;
4011 sbit at 0xCD I2FR       ;
4012 sbit at 0xCE I3FR       ;
4013 sbit at 0xCF T2PS       ;
4014 // alternate names
4015 sbit at 0xC8 T2CON_0    ;
4016 sbit at 0xC9 T2CON_1    ;
4017 sbit at 0xCA T2CON_2    ;
4018 sbit at 0xCB T2CON_3    ;
4019 sbit at 0xCC T2CON_4    ;
4020 sbit at 0xCD T2CON_5    ;
4021 sbit at 0xCE T2CON_6    ;
4022 sbit at 0xCF T2CON_7    ;
4023 #endif
4024
4025 #ifdef T2MOD__x__x__x__D13T1__D13T2__x__T2OE__DCEN
4026 #undef T2MOD__x__x__x__D13T1__D13T2__x__T2OE__DCEN
4027 // Definitions for the timer/counter 2 of the Atmel & Dallas microcontrollers
4028 sfr at 0xC9 T2MOD       ;
4029 // Not not directly accessible T2MOD bits
4030 #define DCEN        0x01
4031 #define T2OE        0x02
4032 #define D13T2       0x08
4033 #define D13T1       0x10
4034 #endif
4035
4036 #ifdef T2MOD__x__x__x__x__x__x__T2OE__DCEN
4037 #undef T2MOD__x__x__x__x__x__x__T2OE__DCEN
4038 // Definitions for the timer/counter 2 of the Atmel 89x52 microcontroller
4039 sfr at 0xC9 T2MOD       ;
4040 // Not not directly accessible T2MOD bits
4041 #define DCEN        0x01
4042 #define T2OE        0x02
4043 // Alternate names
4044 #define DCEN_       0x01
4045 #define T2OE_       0x02
4046 #endif
4047
4048 #ifdef T3_AT_0XFF
4049 #undef T3_AT_0XFF
4050 sfr at 0xFF T3          ; // Timer 3, P80C552 specific
4051 #endif
4052
4053 #ifdef TA
4054 #undef TA
4055 // DS500x, DS80C320 & DS80C390 specific
4056 sfr at 0xC7 TA          ;
4057 #endif
4058
4059 #ifdef TCON
4060 #undef TCON
4061 sfr at 0x88 TCON        ;
4062 //  Bit registers
4063 sbit at 0x88 IT0        ;
4064 sbit at 0x89 IE0        ;
4065 sbit at 0x8A IT1        ;
4066 sbit at 0x8B IE1        ;
4067 sbit at 0x8C TR0        ;
4068 sbit at 0x8D TF0        ;
4069 sbit at 0x8E TR1        ;
4070 sbit at 0x8F TF1        ;
4071 #endif
4072
4073 #ifdef TH0
4074 #undef TH0
4075 sfr at 0x8C TH0         ;
4076 #endif
4077
4078 #ifdef TH1
4079 #undef TH1
4080 sfr at 0x8D TH1         ;
4081 #endif
4082
4083 #ifdef TH2
4084 #undef TH2
4085 sfr at 0xCD TH2         ;
4086 #endif
4087
4088 #ifdef TL0
4089 #undef TL0
4090 sfr at 0x8A TL0         ;
4091 #endif
4092
4093 #ifdef TL1
4094 #undef TL1
4095 sfr at 0x8B TL1         ;
4096 #endif
4097
4098 #ifdef TL2
4099 #undef TL2
4100 sfr at 0xCC TL2         ;
4101 #endif
4102
4103 #ifdef TMOD
4104 #undef TMOD
4105 sfr at 0x89 TMOD        ;
4106 // Not directly accessible TMOD bits
4107 #define T0_M0       0x01
4108 #define T0_M1       0x02
4109 #define T0_CT       0x04
4110 #define T0_GATE     0x08
4111 #define T1_M0       0x10
4112 #define T1_M1       0x20
4113 #define T1_CT       0x40
4114 #define T1_GATE     0x80
4115
4116 #define T0_MASK     0x0F
4117 #define T1_MASK     0xF0
4118 #endif
4119
4120 #ifdef TM2CON__T2IS1__T2IS0__T2ER__T2B0__T2P1__T2P0__T2MS1__T2MS0
4121 #undef TM2CON__T2IS1__T2IS0__T2ER__T2B0__T2P1__T2P0__T2MS1__T2MS0
4122 sfr at 0xEA TM2CON      ; // Timer 2 control, P80C552 specific
4123 // Not directly accessible Bits.
4124 #define T2MS0       0x01
4125 #define T2MS1       0x02
4126 #define T2P0        0x04
4127 #define T2P1        0x08
4128 #define T2B0        0x10
4129 #define T2ER        0x20
4130 #define T2IS0       0x40
4131 #define T2IS1       0x80
4132 #endif
4133
4134 #ifdef TM2IR__T20V__CMI2__CMI1__CMI0__CTI3__CTI2__CTI1__CTI0
4135 #undef TM2IR__T20V__CMI2__CMI1__CMI0__CTI3__CTI2__CTI1__CTI0
4136 sfr at 0xC8 TM2IR       ; // Timer 2 int flag reg, P80C552 specific
4137 // Bit register
4138 sbit at 0xC8 CTI0       ;
4139 sbit at 0xC9 CTI1       ;
4140 sbit at 0xCA CTI2       ;
4141 sbit at 0xCB CTI3       ;
4142 sbit at 0xCC CMI0       ;
4143 sbit at 0xCD CMI1       ;
4144 sbit at 0xCE CMI2       ;
4145 sbit at 0xCF T20V       ;
4146 #endif
4147
4148 #ifdef TMH2_AT_0XED
4149 #undef TMH2_AT_0XED
4150 sfr at 0xED TMH2        ; // Timer high 2, P80C552 specific
4151 #endif
4152
4153 #ifdef TML2_AT_0XEC
4154 #undef TML2_AT_0XEC
4155 sfr at 0xEC TML2        ; // Timer low 2, P80C552 specific
4156 #endif
4157
4158 #ifdef WCON
4159 #undef WCON
4160 sfr at 0x96 WCON        ;   // AT89S53 specific
4161 // Not directly accesible bits
4162 #define WDTEN       0x01
4163 #define WDTRST      0x02
4164 #define DPS         0x04
4165 #define PS0         0x20
4166 #define PS1         0x40
4167 #define PS2         0x80
4168 #endif
4169
4170 #ifdef WDCON
4171 #undef WDCON
4172 // DS80C320 - 390, DS89C420, etc. specific
4173 sfr at 0xD8 WDCON       ;
4174 //  Bit registers
4175 sbit at 0xD8 RWT        ;
4176 sbit at 0xD9 EWT        ;
4177 sbit at 0xDA WTRF       ;
4178 sbit at 0xDB WDIF       ;
4179 sbit at 0xDC PFI        ;
4180 sbit at 0xDD EPFI       ;
4181 sbit at 0xDE POR        ;
4182 sbit at 0xDF SMOD_1     ;
4183 #endif
4184
4185 #ifdef WDTPRG_AT_0XA7
4186 #undef WDTPRG_AT_0XA7
4187 sfr at 0xA7 WDTPRG      ;
4188 #define WDTRPRG_S0  0x01
4189 #define WDTRPRG_S1  0x02
4190 #define WDTRPRG_S2  0x04
4191 #endif
4192
4193 #ifdef WDTREL
4194 #undef WDTREL
4195 sfr at 0x86 WDTREL      ; // Watchdof Timer reload register
4196 #endif
4197
4198 #ifdef WDTRST_AT_0XA6
4199 #undef WDTRST_AT_0XA6
4200 sfr at 0xA6 WDTRST      ;
4201 #endif
4202
4203 #ifdef XPAGE
4204 #undef XPAGE
4205 sfr at 0x91 XPAGE       ; // Page Address Register for Extended On-Chip Ram - Infineon / Siemens SAB80515A specific
4206 #endif
4207
4208 /////////////////////////
4209 /// Interrupt vectors ///
4210 /////////////////////////
4211
4212 // Interrupt numbers: address = (number * 8) + 3
4213 #define IE0_VECTOR      0       // 0x03 external interrupt 0
4214 #define TF0_VECTOR      1       // 0x0b timer 0
4215 #define IE1_VECTOR      2       // 0x13 external interrupt 1
4216 #define TF1_VECTOR      3       // 0x1b timer 1
4217 #define SI0_VECTOR      4       // 0x23 serial port 0
4218
4219 #ifdef MICROCONTROLLER_AT89S53
4220 #define TF2_VECTOR      5       /* 0x2B timer 2 */
4221 #define EX2_VECTOR      5       /* 0x2B external interrupt 2 */
4222 #endif
4223
4224 #ifdef MICROCONTROLLER_AT89X52
4225 #define TF2_VECTOR      5       /* 0x2B timer 2 */
4226 #define EX2_VECTOR      5       /* 0x2B external interrupt 2 */
4227 #endif
4228
4229 #ifdef MICROCONTROLLER_AT89X55
4230 #define TF2_VECTOR      5       /* 0x2B timer 2 */
4231 #define EX2_VECTOR      5       /* 0x2B external interrupt 2 */
4232 #endif
4233
4234 #ifdef MICROCONTROLLER_DS5000
4235 #define PFW_VECTOR      5       /* 0x2B */
4236 #endif
4237
4238 #ifdef MICROCONTROLLER_DS5001
4239 #define PFW_VECTOR      5       /* 0x2B */
4240 #endif
4241
4242 #ifdef MICROCONTROLLER_DS80C32X
4243 #define TF2_VECTOR      5       /* 0x2B */
4244 #define PFI_VECTOR      6       /* 0x33 */
4245 #define SIO1_VECTOR     7       /* 0x3B */
4246 #define IE2_VECTOR      8       /* 0x43 */
4247 #define IE3_VECTOR      9       /* 0x4B */
4248 #define IE4_VECTOR     10       /* 0x53 */
4249 #define IE5_VECTOR     11       /* 0x5B */
4250 #define WDI_VECTOR     12       /* 0x63 */
4251 #endif
4252
4253 #ifdef MICROCONTROLLER_DS8XC520
4254 #define TF2_VECTOR      5       /* 0x2B */
4255 #define PFI_VECTOR      6       /* 0x33 */
4256 #define SIO1_VECTOR     7       /* 0x3B */
4257 #define IE2_VECTOR      8       /* 0x43 */
4258 #define IE3_VECTOR      9       /* 0x4B */
4259 #define IE4_VECTOR     10       /* 0x53 */
4260 #define IE5_VECTOR     11       /* 0x5B */
4261 #define WDI_VECTOR     12       /* 0x63 */
4262 #endif
4263
4264 #ifdef MICROCONTROLLER_P80C552
4265 #define SIO1_VECTOR     5       // 0x2B SIO1 (I2C)
4266 #define CT0_VECTOR      6       // 0x33 T2 capture 0
4267 #define CT1_VECTOR      7       // 0x3B T2 capture 1
4268 #define CT2_VECTOR      8       // 0x43 T2 capture 2
4269 #define CT3_VECTOR      9       // 0x4B T2 capture 3
4270 #define ADC_VECTOR     10       // 0x53 ADC completion
4271 #define CM0_VECTOR     11       // 0x5B T2 compare 0
4272 #define CM1_VECTOR     12       // 0x63 T2 compare 1
4273 #define CM2_VECTOR     13       // 0x6B T2 compare 2
4274 #define TF2_VECTOR     14       // 0x73 T2 overflow
4275 #endif
4276
4277 #ifdef MICROCONTROLLER_P89C668
4278 #define SIO1_VECTOR     5       // 0x2b SIO1 (i2c)
4279 #define PCA_VECTOR      6       // 0x33 (Programmable Counter Array)
4280 #define TF2_VECTOR      7       // 0x3B (Timer 2)
4281 #endif
4282
4283 #ifdef MICROCONTROLLER_SAB80515
4284 #define TF2_VECTOR      5       // 0x2B timer 2
4285 #define EX2_VECTOR      5       // 0x2B external interrupt 2
4286 #define IADC_VECTOR     8       // 0x43 A/D converter interrupt
4287 #define IEX2_VECTOR     9       // 0x4B external interrupt 2
4288 #define IEX3_VECTOR    10       // 0x53 external interrupt 3
4289 #define IEX4_VECTOR    11       // 0x5B external interrupt 4
4290 #define IEX5_VECTOR    12       // 0x63 external interrupt 5
4291 #define IEX6_VECTOR    13       // 0x6B external interrupt 6
4292 #endif
4293
4294 #ifdef MICROCONTROLLER_SAB80515A
4295 #define TF2_VECTOR      5       // 0x2B timer 2
4296 #define EX2_VECTOR      5       // 0x2B external interrupt 2
4297 #define IADC_VECTOR     8       // 0x43 A/D converter interrupt
4298 #define IEX2_VECTOR     9       // 0x4B external interrupt 2
4299 #define IEX3_VECTOR    10       // 0x53 external interrupt 3
4300 #define IEX4_VECTOR    11       // 0x5B external interrupt 4
4301 #define IEX5_VECTOR    12       // 0x63 external interrupt 5
4302 #define IEX6_VECTOR    13       // 0x6B external interrupt 6
4303 #endif
4304
4305 #ifdef MICROCONTROLLER_SAB80517
4306 #define TF2_VECTOR      5       // 0x2B timer 2
4307 #define EX2_VECTOR      5       // 0x2B external interrupt 2
4308 #define IADC_VECTOR     8       // 0x43 A/D converter interrupt
4309 #define IEX2_VECTOR     9       // 0x4B external interrupt 2
4310 #define IEX3_VECTOR    10       // 0x53 external interrupt 3
4311 #define IEX4_VECTOR    11       // 0x5B external interrupt 4
4312 #define IEX5_VECTOR    12       // 0x63 external interrupt 5
4313 #define IEX6_VECTOR    13       // 0x6B external interrupt 6
4314                                 // 0x73 not used
4315                                 // 0x7B not used
4316 #define SI1_VECTOR     16       // 0x83 serial port 1
4317                                 // 0x8B not used
4318                                 // 0x93 not used
4319 #define COMPARE_VECTOR 19       // 0x9B compare
4320 #endif
4321
4322 #ifdef MICROCONTORLLER_T89C51RD2
4323 #define TF2_VECTOR      5       /* 0x2B timer 2 */
4324 #define PCA_VECTOR      6       /* 0x33 Programmable Counter Array interrupt */
4325 #endif /* MICROCONTORLLER_T89C51RD2 */
4326
4327 #endif  // End of the header -> #ifndef MCS51REG_H