EasyManua.ls Logo

ZiLOG Z8 - Page 211

ZiLOG Z8
220 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Z8 Microcontrollers
ZiLOG Instruction Descriptions and Formats
UM001601-0803 12-71
SUB
SUBTRACT
Example:
If Working Register R15 contains 16H, Working Register R10 contains 20H, and Register 20H contains 11H, the
statement:
SUB R16, @R10
Op Code: 23 FA
leaves the value 05H in Working Register R15. The D Flag is set, and the C, Z, S, V, and H Flags are cleared.
Example:
If Register 34H contains 2EH, and Register 12H contains 1BH, the statement:
SUB 34H, 12H
Op Code: 24 12 34
leaves the value 13H in Register 34H. The D Flag is set, and the C, Z, S, V, and H Flags are cleared.
Example:
If Register 4BH contains 82H, Working Register R3 contains 10H, and Register 10H contains 01H, the statement:
SUB 4BH, @R3
Op Code: 25 E3 4B
leaves the value 81H in Register 4BH. The D Flag is set, and the C, Z, S, V, and H Flags are cleared.
Example:
If Register 6CH contains 2AH, the statement:
SUB 6CH, #03H
Op Code: 26 6C 03
leaves the value 27H in Register 6CH. The D Flag is set, and the C, Z, S, V, and H Flags are cleared.
Example:
If Register D4H contains 5FH, Register 5FH contains 4CH, the statement:
SUB @D4H, #02H
Op Code: 17 D4 02
leaves the value 4AH in Register 5FH. The D Flag is set, and the C, Z, S, V, and H Flags are cleared.

Table of Contents

Other manuals for ZiLOG Z8

Related product manuals