Abstract
The Z80 has an 8-bit flag register which is used to contain information regarding the result produced by the last executed instruction. In fact, only six of the eight bits are used as follows
The SIGN FLAG is set to 1 if the result produced by an instruction is negative, otherwise the flag is reset to 0. For example, after execution of the instructions
the accumulator will contain −33 and the sign flag will be set to 1.
Preview
Unable to display preview. Download preview PDF.
Author information
Authors and Affiliations
Copyright information
© 1981 Roger Hutty
About this chapter
Cite this chapter
Hutty, R. (1981). Flags, conditional jumps and the CP instruction. In: Z80 Assembly Language Programming for Students. Macmillan Computer Science Series. Palgrave, London. https://doi.org/10.1007/978-1-349-06155-6_5
Download citation
DOI: https://doi.org/10.1007/978-1-349-06155-6_5
Publisher Name: Palgrave, London
Print ISBN: 978-0-333-32295-6
Online ISBN: 978-1-349-06155-6
eBook Packages: Computer ScienceComputer Science (R0)