MSM80C154S/83C154S/85C154HVS

4.3.2 Internal data memory register R0 thru R7 designation

Operation of the internal data memory register decrement instruction is described here as an example. This instruction (DEC Rr) is a 1-byte 1-machine cycle instruction (see Figure 4-5). Register R0 thru R7 is specified by r0, r1, and r2 data of instruction code bit 0, 1, and 2. The r0, r1, and r2 data is represented in binary code, r0 being the LSB, and r2 the MSB. The code is weighted 1, 2, and 4 from the LSB. Any one of the eight registers can be specified by combinations of this code. See Table 4-3 for the register designation combinations.

When this instruction is executed, one of the registers R0 thru R7 from the register group specified by the PSW RS0 and RS1 bank data is specified. The contents of the specified register is read by the CPU into a temporary register. Then a subsequent decrement (–1) by the ALU is followed by a return to the register where the data were read out. In this way, the register contents specified by r0, r1, and r2 are decremented.

DEC Rr:

Instruction (OP)

Register

 

code portion

designation portion

 

 

 

 

Byte 1

0 0 0 1

 

 

1 r2 r1 r0

7 6 5 4 3 2 1 0

Figure 4-5 DEC Rr bit arrangement

Table 4-3 Register designation table

Register name

r2

r1

r0

 

 

 

 

Register 0

0

0

0

 

 

 

 

Register 1

0

0

1

 

 

 

 

Register 2

0

1

0

 

 

 

 

Register 3

0

1

1

 

 

 

 

Register 4

1

0

0

 

 

 

 

Register 5

1

0

1

 

 

 

 

Register 6

1

1

0

 

 

 

 

Register 7

1

1

1

 

 

 

 

62

Page 69
Image 69
Sonic Alert msm83c154s, msm80154s, msm85c154hvs user manual DEC Rr bit arrangement Register designation table