ST10 FAMILY PROGRAMMING MANUAL
36/172
2.6.7 - Flags
This section shows the state of the N, C, V, Z and
E flags in the PSW register. The resulting state of
the flags is represented by the following symbols
(see Table 25).
If the PSW register is specified as the destination
operand of an instruction, the flags can not be
interpreted as described.
This is because the PSW register is modified
according to the data format of the instruction:
– For word operations, the PSW register is over-
written with the word result.
– For byte operations, the non-addressed byte is
cleared and the addressed byte is overwritten.
– For bit or bit-field operations on the PSW regis-
ter, only the specified bits are modified.
If the flags are not selected as destination bits,
they stay unchanged i.e. they maintain the state
existing after the previous instruction.
In all cases, if the PSW is the destination operand
of an instruction, the PSW flags do NOT represent
the flags of this instruction, in the normal way.
Table 25 : List of flags
Symbol
Description
*
The flag is set according to the following standard rules
N = 1 :
Most significant bit of the result is set
N = 0 :
Most significant bit of the result is not set
C = 1 :
Carry occurred during operation
C = 0 :
No Carry occurred during operation
V = 1 :
Arithmetic Overflow occurred during operation
V = 0 :
No Arithmetic Overflow occurred during operation
Z = 1 :
Result equals zero
Z = 0 :
Result does not equal zero
E = 1 :
Source operand represents the lowest negative number, either 8000h for word data or 80h
for byte data.
E = 0 :
Source operand does not represent the lowest negative number for the specified data type
“S”
The flag is set according to non-standard rules. Individual instruction pages or the ALU status flags
description.
“-”
The flag is not affected by the operation
“0”
The flag is cleared by the operation.
“NOR”
The flag contains the logical NORing of the two specified bit operands.
“AND”
The flag contains the logical ANDing of the two specified bit operands.
“'OR”
The flag contains the logical ORing of the two specified bit operands.
“XOR”
The flag contains the logical XORing of the two specified bit operands.
“B”
The flag contains the original value of the specified bit operand.
“B”
The flag contains the complemented value of the specified bit operand
Содержание ST10 Series
Страница 2: ......
Страница 4: ...ST10 FAMILY PROGRAMMING MANUAL 2 172...