![Samsung S3C80M4/F80M4 User Manual Download Page 34](http://html1.mh-extra.com/html/samsung/s3c80m4-f80m4/s3c80m4-f80m4_user-manual_3996174034.webp)
ADDRESS SPACES
S3C80M4/F80M4
2-10
16-Byte
Contiguous
working
Register block
Register File
Contains 32
8-Byte Slices
0 0 0 0 0 X X X
RP1
1 1 1 1 0 X X X
RP0
0H (R0)
7H (R15)
F0H (R0)
F7H (R7)
8-Byte Slice
8-Byte Slice
Figure 2-7. Non-Contiguous 16-Byte Working Register Block
)
PROGRAMMING TIP — Using the RPs to Calculate the Sum of a Series of Registers
Calculate the sum of registers 80H–85H using the register pointer. The register addresses from 80H through 85H
contain the values 10H, 11H, 12H, 13H, 14H, and 15H, respectively:
SRP0
#80H
;
RP0
←
80H
ADD
R0,R1
;
R0
←
R0 + R1
ADC
R0,R2
;
R0
←
R0 + R2 + C
ADC
R0,R3
;
R0
←
R0 + R3 + C
ADC
R0,R4
;
R0
←
R0 + R4 + C
ADC
R0,R5
;
R0
←
R0 + R5 + C
The sum of these six registers, 6FH, is located in the register R0 (80H). The instruction string used in this
example takes 12 bytes of instruction code and its execution time is 36 cycles. If the register pointer is not used to
calculate the sum of these registers, the following instruction sequence would have to be used:
ADD
80H,81H
;
80H
←
(80H) + (81H)
ADC
80H,82H
;
80H
←
(80H) + (82H) + C
ADC
80H,83H
;
80H
←
(80H) + (83H) + C
ADC
80H,84H
;
80H
←
(80H) + (84H) + C
ADC
80H,85H
;
80H
←
(80H) + (85H) + C
Now, the sum of the six registers is also located in register 80H. However, this instruction string takes 15 bytes of
instruction code rather than 12 bytes, and its execution time is 50 cycles rather than 36 cycles.
Summary of Contents for S3C80M4/F80M4
Page 1: ...S3C80M4 F80M4 8 BIT CMOS MICROCONTROLLERS USER S MANUAL Revision 1 ...
Page 44: ...ADDRESS SPACES S3C80M4 F80M4 2 20 NOTES ...
Page 84: ...CONTROL REGISTERS S3C80M4 F80M4 4 26 NOTES ...
Page 102: ...INTERRUPT STRUCTURE S3C80M4 F80M4 5 18 NOTES ...
Page 190: ...INSTRUCTION SET S3C80M4 F80M4 6 88 NOTES ...
Page 202: ...RESET and POWER DOWN S3C80M4 F80M4 8 6 NOTES ...
Page 216: ...8 BIT TIMER 0 S3C80M4 F80M4 11 4 NOTES ...
Page 220: ...8 BIT PULSE WIDTH MODULATION S3C80M4 F80M4 12 4 NOTES ...
Page 230: ...ELECTRICAL DATA S3C80M4 F80M4 13 10 NOTES ...