Motorola HC12 Refrence Manual page 266

Table of Contents

Advertisement

TST
Operation:
(M) – $00
Description:
Subtracts $00 from the content of memory location M and sets the con-
dition codes accordingly.
The subtraction is accomplished internally without modifying M.
The TST instruction provides limited information when testing unsigned
values. Since no unsigned value is less than zero, BLO and BLS have
no utility following TST. While BHI can be used after TST, it performs the
same function as BNE, which is preferred. After testing signed values,
all signed branches are available.
Condition Codes and Boolean Formulas:
S
N:
Z:
V:
C:
Addressing Modes, Machine Code, and Execution Times:
Source Form
TST opr16a
TST oprx0_xysp
TST oprx9,xysp
TST oprx16,xysp
TST [D ,xysp ]
TST [ oprx16,xysp ]
MOTOROLA
6-206
Test Memory
X
H
I
N
Z
Set if MSB of result is set; cleared otherwise.
Set if result is $00; cleared otherwise.
0; Cleared.
0; Cleared.
Address Mode
EXT
IDX
IDX1
IDX2
[D,IDX]
[IDX2]
INSTRUCTION GLOSSARY
V
C
0
0
Object Code
F7 hh ll
E7 xb
E7 xb ff
E7 xb ee ff
E7 xb
E7 xb ee ff
TST
Cycles
Access Detail
3
rOP
3
rfP
3
rPO
4
frPP
6
fIfrfP
6
fIPrfP
CPU12
REFERENCE MANUAL

Advertisement

Table of Contents
loading

This manual is also suitable for:

Cpu12

Table of Contents