MOD51

Abbreviation

MO

Arguments

None.

Default

MOD51

Description

The MOD51 control defines symbols for the 8051 special function registers. The following symbols are defined:

NOTE

The MOD51 control may be specified only once on the command line or at the top of the source file.

See Also

NOMOD51

Example
A51 SAMPLE.A51 MOD51

$MOD51

BYTE Symbols

Symbol

Description

Byte Address

P0

Port 0

80h

SP

Stack pointer

81h

DPL

Data pointer (low byte)

82h

DPH

Data pointer (high byte)

83h

TCON

Counter/Timer control

88h

TMOD

Counter/Timer operation mode

89h

TL0

Counter/Timer 0 (low byte)

8Ah

TL1

Counter/Timer 1 (low byte)

8Bh

TH0

Counter/Timer 0 (high byte)

8Ch

TH1

Counter/Timer 1 (high byte)

8Dh

P1

Port 1

90h

SCON

Serial port control

98h

SBUF

Serial port buffer

99h

P2

Port 2

0A0h

IE

Interrupt Enable

0A8h

P3

Port 3

0B0h

PSW

Program Status Word

0D0h

ACC

Accumulator

0E0h

B

Multiplication Register

0F0h

BIT Symbols

Symbol

Description

Bit Position

Bit Address

CY

Carry Flag

PSW.7

0D7h

AC

Auxiliary Carry Flag

PSW.6

0D6h

F0

Flag 0

PSW.5

0D5h

RS1

Register Bank Select, Bit 1

PSW.4

0D4h

RS0

Register Bank Select, Bit 0

PSW.3

0D3h

OV

Overflow Bit

PSW.2

0D2h

P

Parity Bit

PSW.0

0D0h

TF1

Timer-1 Overflow Bit

TCON.7

8Fh

TR1

Timer-1 RUN Control Bit

TCON.6

8Eh

TF0

Timer-0 Overflow Bit

TCON.5

8Dh

TR0

Timer-0 RUN Control Bit

TCON.4

8Ch

IE1

Interrupt 1 Edge Flag

TCON.3

8Bh

IT1

Interrupt 1 Control Bit

TCON.2

8Ah

IE0

Interrupt 0 Edge Flag

TCON.1

89h

IT0

Interrupt 0 Control Bit

TCON.0

88h

SM0

Serial Mode Control Bit 0

SCON.7

9Fh

SM1

Serial Mode Control Bit 1

SCON.6

9Eh

SM2

Serial Mode Control Bit 2

SCON.5

9Dh

REN

Receiver Enable Bit

SCON.4

9Ch

TB8

Transmit Bit 8 (9-Bit Mode)

SCON.3

9Bh

RB8

Receive Bit 8 (9-Bit Mode)

SCON.2

9Ah

TI

Transmitter Interrupt Flag

SCON.1

99h

RI

Receiver Interrupt Flag

SCON.0

98h

EA

Enable all Interrupts

IE.7

0AFh

ES

Enable serial Port Interrupt

IE.4

0ACh

ET1

Enable Timer 1 Interrupt

IE.3

0ABh

EX1

Enable External Interrupt 1

IE.2

0AAh

ET0

Enable Timer 0 Interrupt

IE.1

0A9h

EX0

Enable External Interrupt 0

IE.0

0A8h

RD

Read Data for External Memory

P3.7

0B7h

WR

Write Data for External Memory

P3.6

0B6h

T1

Timer/Counter 1 Input/Output

P3.5

0B5h

T0

Timer/Counter 0 Input/Output

P3.4

0B4h

INT1

Interrupt 1 Input Pin

P3.3

0B3h

INT0

Interrupt 0 Input Pin

P3.2

0B2h

TXD

Serial Port Transmit Pin

P3.1

0B1h

RXD

Serial Port Receive Pin

P3.0

0B0h

PS

Serial Port Interrupt Priority

IP.4

0BCh

PT1

Timer 1 Interrupt Priority

IP.3

0BBh

PX1

External Interrupt 1 Priority

IP.2

0BAh

PT0

Timer 0 Interrupt Priority

IP.1

0B9h

PX0

External Interrupt 0 Priority

IP.0

0B8h