5-57
Z380
™
U
SER
'
S
M
ANUAL
Z
ILOG
DC-8297-03
EXTS
EXTEND SIGN (BYTE)
EXTS [A]
Operation:
L
←
A
if (A(7)=0) then begin
H
¨
00h
if (LW) then begin
HL(31-16)
←
0000h
end
end
else begin
H
¨
FFh
if (LW) then begin
HL(31-16)
←
FFFFh
end
end
The contents of the accumulator, considered as a signed, two’s complement integer, are
sign-extended to 16 bits and the result is stored in the HL register. The contents of the
accumulator are unaffected. This instruction is useful for conversion of short signed
operands into longer signed operands.
Flags:
S:
Unaffected
Z:
Unaffected
H:
Unaffected
V:
Unaffected
N:
Unaffected
C:
Unaffected
Addressing
Execute
Mode
Syntax
Instruction Format
Time
Note
EXTS [A]
11101101 01100101
3
L