![Samsung S3C80M4/F80M4 User Manual Download Page 181](http://html1.mh-extra.com/html/samsung/s3c80m4-f80m4/s3c80m4-f80m4_user-manual_3996174181.webp)
S3C80M4/F80M4
INSTRUCTION SET
6-79
SRA
—
Shift Right Arithmetic
SRA
dst
Operation:
dst
(7)
←
dst (7)
C
←
dst (0)
dst
(n)
←
dst (n + 1), n = 0–6
An arithmetic shift-right of one bit position is performed on the destination operand. Bit zero (the
LSB) replaces the carry flag. The value of bit 7 (the sign bit) is unchanged and is shifted into bit
position 6.
7
0
C
6
Flags: C:
Set if the bit shifted from the LSB position (bit zero) was "1".
Z:
Set if the result is "0"; cleared otherwise.
S:
Set if the result is negative; cleared otherwise.
V:
Always cleared to "0".
D:
Unaffected.
H:
Unaffected.
Format:
Bytes Cycles Opcode
(Hex)
Addr Mode
dst
opc dst
2 4 D0
R
4 D1
IR
Examples:
Given: Register 00H = 9AH, register 02H = 03H, register 03H = 0BCH, and C = "1":
SRA 00H
→
Register 00H = 0CD, C = "0"
SRA @02H
→
Register 02H = 03H, register 03H = 0DEH, C = "0"
In the first example, if general register 00H contains the value 9AH (10011010B), the statement
"SRA 00H" shifts the bit values in register 00H right one bit position. Bit zero ("0") clears the C
flag and bit 7 ("1") is then shifted into the bit 6 position (bit 7 remains unchanged). This leaves the
value 0CDH (11001101B) in destination register 00H.
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 ...