![Samsung S3C80M4/F80M4 Скачать руководство пользователя страница 116](http://html1.mh-extra.com/html/samsung/s3c80m4-f80m4/s3c80m4-f80m4_user-manual_3996174116.webp)
INSTRUCTION SET
S3C80M4/F80M4
6-14
ADC
— Add with carry
ADC
dst,src
Operation:
dst
←
dst + src + c
The source operand, along with the setting of the carry flag, is added to the destination operand
and the sum is stored in the destination. The contents of the source are unaffected. Two's-
complement addition is performed. In multiple precision arithmetic, this instruction permits the
carry from the addition of low-order operands to be carried into the addition of high-order
operands.
Flags: C:
Set if there is a carry from the most significant bit of the result; cleared otherwise.
Z:
Set if the result is "0"; cleared otherwise.
S:
Set if the result is negative; cleared otherwise.
V:
Set if arithmetic overflow occurs, that is, if both operands are of the same sign and the result
is of the opposite sign; cleared otherwise.
D:
Always cleared to "0".
H:
Set if there is a carry from the most significant bit of the low-order four bits of the result;
cleared otherwise.
Format:
Bytes Cycles Opcode
(Hex)
Addr Mode
dst src
opc
dst | src
2 4 12 r
r
6 13
r
lr
opc src dst
3 6 14 R
R
6 15
R
IR
opc dst src
3 6 16 R
IM
Examples:
Given:
R1 = 10H, R2 = 03H, C flag = "1", register 01H = 20H, register 02H = 03H, and
register 03H = 0AH:
ADC R1,R2
→
R1 = 14H, R2 = 03H
ADC R1,@R2
→
R1 = 1BH, R2 = 03H
ADC 01H,02H
→
Register 01H = 24H, register 02H = 03H
ADC 01H,@02H
→
Register 01H = 2BH, register 02H = 03H
ADC 01H,#11H
→
Register 01H = 32H
In the first example, destination register R1 contains the value 10H, the carry flag is set to "1",
and the source working register R2 contains the value 03H. The statement "ADC R1,R2" adds
03H and the carry flag value ("1") to the destination value 10H, leaving 14H in register R1.
Содержание S3C80M4/F80M4
Страница 1: ...S3C80M4 F80M4 8 BIT CMOS MICROCONTROLLERS USER S MANUAL Revision 1 ...
Страница 44: ...ADDRESS SPACES S3C80M4 F80M4 2 20 NOTES ...
Страница 84: ...CONTROL REGISTERS S3C80M4 F80M4 4 26 NOTES ...
Страница 102: ...INTERRUPT STRUCTURE S3C80M4 F80M4 5 18 NOTES ...
Страница 190: ...INSTRUCTION SET S3C80M4 F80M4 6 88 NOTES ...
Страница 202: ...RESET and POWER DOWN S3C80M4 F80M4 8 6 NOTES ...
Страница 216: ...8 BIT TIMER 0 S3C80M4 F80M4 11 4 NOTES ...
Страница 220: ...8 BIT PULSE WIDTH MODULATION S3C80M4 F80M4 12 4 NOTES ...
Страница 230: ...ELECTRICAL DATA S3C80M4 F80M4 13 10 NOTES ...
Страница 248: ...DEVELOPMENT TOOLS S3C80M4 F80M4 16 8 NOTES ...
Страница 249: ...This datasheet has been downloaded from www DatasheetCatalog com Datasheets for electronic components ...