; MCS-51 INTERNAL REGISTERS ; B: EQU 0F0H ; B REGISTER A: EQU 0E0H ; ACCUMULATOR PSW: EQU 0D0H ; PROGRAM STATUS WORD IPC: EQU 0B8H ; INTERRUPT PRIORITY P3: EQU 0B0H ; PORT 3 IEC: EQU 0A8H ; INTERRUPT ENABLE P2: EQU 0A0H ; PORT 2 SBUF: EQU 099H ; SEND BUFFER SCON: EQU 098H ; SERIAL CONTROL P1: EQU 090H ; PORT 1 TH1: EQU 08DH ; TIMER 1 HIGH TH0: EQU 8CH ; TIMER 0 HIGH TL1: EQU 8BH ; TIMER 1 LOW TL0: EQU 8AH ; TIMER 0 LOW TMOD: EQU 089H ; TIMER MODE TCON: EQU 88H ; TIMER CONTROL PCON: EQU 87H ; POWER CONTROL REGISTER DPH: EQU 83H ; DATA POINTER HIGH DPL: EQU 82H ; DATA POINTER LOW SP: EQU 81H ; STACK POINTER P0: EQU 80H ; PORT 0 ; MCS-51 INTERNAL BIT ADDRESSES ; CY: EQU 0D7H ; CARRY FLAG AC: EQU 0D6H ; AUXILIARY-CARRY FLAG F0: EQU 0D5H ; USER FLAG 0 RS1: EQU 0D4H ; REGISTER SELECT MSB RS0: EQU 0D3H ; REGISTER SELECT LSB OV: EQU 0D2H ; OVERFLOW FLAG P: EQU 0D0H ; PARITY FLAG PS: EQU 0BCH ; PRIORITY SERIAL PORT PT1: EQU 0BBH ; PRIORITY TIMER 1 PX1: EQU 0BAH ; PRIORITY EXTERNAL 1 PT0: EQU 0B9H ; PRIORITY TIMER 0 PX0: EQU 0B8H ; PRIORITY EXTERNAL 0 EA: EQU 0AFH ; ENABLE ALL INTERRUPT ES: EQU 0ACH ; ENABLE SERIAL INTERRUPT ET1: EQU 0ABH ; ENABLE TIMER 1 INTERRUPT EX1: EQU 0AAH ; ENABLE EXTERNAL 1 INTERR ET0: EQU 0A9H ; ENABLE TIMER 0 INTERRUPT EX0: EQU 0A8H ; ENABLE EXTERNAL 0 INTERR SM0: EQU 09FH ; SERIAL MODE 0 SM1: EQU 09EH ; SERIAL MODE 1 SM2: EQU 09DH ; SERIAL MODE 2 REN: EQU 09CH ; SERIAL RECEPTION ENABLE TB8: EQU 09BH ; TRANSMITT BIT 8 RB8: EQU 09AH ; RECEIVE BIT 8 TI: EQU 099H ; TRANSMIT INTERRUPT FLAG RI: EQU 098H ; RECEIVE INTERRUPT FLAG TF1: EQU 08FH ; TIMER 1 OVERFLOW FLAG TR1: EQU 08EH ; TIMER 1 RUN CONTROL BIT TF0: EQU 08DH ; TIMER 0 OVERFLOW FLAG TR0: EQU 08CH ; TIMER 0 RUN CONTROL BIT IE1: EQU 08BH ; EXT INTERR. 1 EDGE FLAG IT1: EQU 08AH ; EXT INTERR. 1 TYPE FLAG IE0: EQU 089H ; EXT INTERR. 0 EDGE FLAG IT0: EQU 088H ; EXT INTERR. 0 TYPE FLAG ; OTHER EQUATES ; GOSWT: EQU 0B5H ; GO SWITCH REFERENCE TO START UNIT. UPSTK: EQU 009H ; UPPER STACK LOCATION FOR DIRECT UPDATE. LWSTK: EQU 008H ; LOWER STACK LOCATION FOR DIRECT UPDATE. BD0: EQU 0F0H ; BIT 0 OF B REGISTER. REN8U: EQU 050H ; RECIVER ENABLE IN 8 BIT UART MODE. ARTC8: EQU 020H ; 8 BIT AUTO RELOD TIMR CNTER -TH#1 HLDS SET 0010 AR MD BRATE: EQU 0FDH ; FD SETTING RATE LOADED IN TH1 TIMER FOR AUTO RELOAD.