Sei sulla pagina 1di 4

Appendice C

Errori e flag aritmetici

La tabella sottostante elenca le istruzioni che influenzano lo stato dei seguenti flag: N, OF, UF, ER, CY, GR, LE e
EQ.
In generale, N indica un risultato negativo, OF indica che il risultato di un calcolo a 16 bit è maggiore di 32.767
(7FFF) oppure che il risultato di un calcolo a 32 bit è maggiore di 2.147.483.647 (7FFF FFFF). UF indica che il
risultato di un calcolo a 16 bit è minore di –32,768 (8000) oppure che il risultato di un calcolo a 32 bit è minore di
–2,147,483,648 (8000 0000). Per ulteriori dettagli, fare riferimento al Capitolo 5 Istruzioni.
ER indica che i dati dell’operando non soddisfano i requisiti. CY indica risultati aritmetici o di scorrimento dei dati.
GR sta ad indicare che un valore comparato è maggiore di un valore standard, LT che è minore ed EQ che è
uguale. Inoltre EQ indica che il risultato di un’operazione aritmetica è zero. Per ulteriori dettagli, fare riferimento al
Capitolo 5 Istruzioni.
Le frecce verticali a doppia punta raffigurate in tabella indicano che i flag sono posti ad ON ed OFF in accordo con il
risultato dell’istruzione.
Sebbene le istruzioni del diagramma a relé, TIM e CNT, siano eseguite quando ER è ON, altre istruzioni (con la
freccia verticale a doppia punta sulla colonna ER) non sono eseguite. Anche i rimanenti flag presenti in tabella non
operano quando ER è ON.
Le istruzioni non elencate non influenzano lo stato dei flag. Sebbene nella tabella siano elencate solo le istruzioni
non differenziali, tutto quanto detto è valido anche per le istruzioni differenziali.
Gli 8 flag sono posti ad OFF quando l’istruzione END(001) viene eseguita, cosicché il loro stato non può essere
monitorato con una Console di Programmazione.
Mnemonica 25503 25504 25505 25506 25507 25404 25405 25402 Pag.
(ER) (CY) (GR) (EQ) (LE) (OF) (UF) (N)
TIM µ --- --- --- --- --- --- --- 163
CNT µ --- --- --- --- --- --- --- 168
END(001) OFF OFF OFF OFF OFF OFF OFF OFF 161
SFT(010) OFF --- --- --- --- --- --- --- 173
CNTR(012) µ --- --- --- --- --- --- --- 171
TIMH(015) µ --- --- --- --- --- --- --- 166
WSFT(016) µ --- --- --- --- --- --- --- 179
ASFT(017) µ --- --- --- --- --- --- --- 180
SCAN(018) µ --- --- --- --- --- --- --- 321
MCMP(019) µ --- --- µ --- --- --- --- 194
CMP(020) µ --- µ µ µ --- --- --- 195
MOV(021) µ --- --- µ --- --- --- µ 181
MVN(022) µ --- --- µ --- --- --- µ 182
BIN(023) µ --- --- µ --- --- --- OFF 208
BCD(024) µ --- --- µ --- --- --- --- 209
ASL(025) µ µ --- µ --- --- --- µ 177
ASR(026) µ µ --- µ --- --- --- OFF 177
ROL(027) µ µ --- µ --- --- --- µ 177
ROR(028) µ µ --- µ --- --- --- µ 178
COM(029) µ --- --- µ --- --- --- µ 298
ADD(030) µ µ --- µ --- --- --- --- 254
SUB(031) µ µ --- µ --- --- --- --- 256
MUL(032) µ --- --- µ --- --- --- --- 259
DIV(033) µ --- --- µ --- --- --- --- 261
ANDW(034) µ --- --- µ --- --- --- µ 298
ORW(035) µ --- --- µ --- --- --- µ 299
XORW(036) µ --- --- µ --- --- --- µ 299
XNRW(037) µ --- --- µ --- --- --- µ 300

539
Errori e flag aritmetici Appendice C

Mnemonica 25503 25504 25505 25506 25507 25404 25405 25402 Pag.
(ER) (CY) (GR) (EQ) (LE) (OF) (UF) (N)
INC(038) µ --- --- µ --- --- --- --- 253
DEC(039) µ --- --- µ --- --- --- --- 253
STC(040) --- ON --- --- --- --- --- --- 253
CLC(041) --- --- --- --- --- --- --- --- 253
MSG(046) µ --- --- --- --- --- --- --- 323
LMSG(047) µ --- --- --- --- --- --- --- 324
ADB(050) µ µ --- µ --- µ µ µ 267
SBB(051) µ µ --- µ --- µ µ µ 269
MLB(052) µ --- --- µ --- --- --- µ 271
DVB(053) µ --- --- µ --- --- --- µ 272
ADDL(054) µ µ --- µ --- --- --- --- 255
SUBL(055) µ µ --- µ --- --- --- --- 258
MULL(056) µ --- --- µ --- --- --- --- 260
DIVL(057) µ --- --- µ --- --- --- --- 262
BINL(058) µ --- --- µ --- --- --- OFF 209
BCDL(059) µ --- --- µ --- --- --- --- 210
CMPL(060) µ --- µ µ µ --- --- --- 197
MPRF(061) µ --- --- --- --- --- --- --- 327
XFRB(062) µ --- --- --- --- --- --- 190
LINE(063) µ --- --- µ --- --- --- --- 228
COLM(064) µ --- --- µ --- --- --- --- 229
SEC(065) µ --- --- µ --- --- --- --- 211
HMS(066) µ --- --- µ --- --- --- --- 212
BCNT(067) µ --- --- µ --- --- --- --- 328
BCMP(068) µ --- --- --- --- --- --- --- 199
APR(069) µ --- --- µ --- --- --- µ 287
XFER(070) µ --- --- --- --- --- --- --- 183
BSET(071) µ --- --- --- --- --- --- --- 182
ROOT(072) µ --- --- µ --- --- --- --- 265
XCHG(073) µ --- --- --- --- --- --- --- 184
SLD(074) µ --- --- --- --- --- --- --- 178
SRD(075) µ --- --- --- --- --- --- --- 179
MLPX(076) µ --- --- --- --- --- --- --- 213
DMPX(077) µ --- --- --- --- --- --- --- 216
SDEC(078) µ --- --- --- --- --- --- --- 219
FDIV(079) µ --- --- --- µ --- --- --- 263
DIST(080) µ --- --- --- µ --- --- µ 185
COLL(081) µ --- --- --- µ --- --- µ 186
MOVB(082) µ --- --- --- --- --- --- --- 189
MOVD(083) µ --- --- --- --- --- --- --- 189
SFTR(084) µ µ --- --- --- --- --- --- 175
TCMP(085) µ --- --- µ --- --- --- --- 200
ASC(086) µ --- --- --- --- --- --- --- 222
TTIM(087) µ --- --- --- --- --- --- --- 167
ZCP(088) µ --- µ µ µ --- --- --- 201
INT(089) µ --- --- --- --- --- --- --- 308
SEND(090) µ --- --- --- --- --- --- --- 347
SBS(091) µ --- --- --- --- --- --- --- 304
SBN(092) µ µ µ µ µ µ µ µ 305
WDT(094) µ --- --- --- --- --- --- --- 326
IORF(097) µ --- --- --- --- --- --- --- 326

540
Errori e flag aritmetici Appendice C

Mnemonica 25503 25504 25505 25506 25507 25404 25405 25402 Pag.
(ER) (CY) (GR) (EQ) (LE) (OF) (UF) (N)
RECV(098) µ --- --- --- --- --- --- --- 345
MCRO(099) µ --- --- --- --- --- --- --- 306
CPS(114) µ --- µ µ µ --- --- --- 203
CPSL(115) µ --- µ µ µ --- --- --- 204
ZCPL(116) µ --- µ µ µ --- --- --- 202
NEG(160) µ --- --- µ --- --- µ µ 230
NEGL(161) µ --- --- µ --- --- µ µ 231
HEX(162) µ --- --- --- --- --- --- --- 223
FCS(180) µ --- --- --- --- --- --- --- 328
SRCH(181) µ --- --- µ --- --- --- --- 334
MAX(182) µ --- --- µ --- --- --- µ 281
MIN(183) µ --- --- µ --- --- --- µ 282
SUM(184) µ --- --- µ --- --- --- µ 285
PID(190) µ µ --- --- --- --- --- --- 290
SCL(194) µ --- --- µ --- --- --- --- 226
AVG(195) µ --- --- --- --- --- --- --- 283
DSW(210) µ --- --- --- --- --- --- --- 357
TKY(211) µ --- --- --- --- --- --- --- 360
HKY(212) µ --- --- --- --- --- --- --- 362
MTR(213) µ --- --- --- --- --- --- --- 365
7SEG(214) µ --- --- --- --- --- --- --- 367
IORD(222) µ --- --- µ --- --- --- --- 371
IOWR(223) µ --- --- µ --- --- --- --- 372
RXD(235) µ --- --- --- --- --- --- --- 349
TXD(236) µ --- --- --- --- --- --- --- 351
STUP(237) µ --- --- --- --- --- --- --- 354
PMCR(260) µ --- --- --- --- --- --- --- 355
CMCR(261) µ --- --- --- --- --- --- --- 338
FPD(269) µ µ --- --- --- --- --- --- 330
XDMR(280) µ --- --- --- --- --- --- --- 335
EMBC(281) µ --- --- --- --- --- --- --- 337
=(300) µ --- --- µ --- --- --- µ 204
=L(301) µ --- --- µ --- --- --- µ 204
=S(302) µ --- --- µ --- --- --- µ 204
=SL(303) µ --- --- µ --- --- --- µ 204
<>(305) µ --- --- µ --- --- --- µ 204
<>L(306) µ --- --- µ --- --- --- µ 204
<>S(307) µ --- --- µ --- --- --- µ 204
<>SL(308) µ --- --- µ --- --- --- µ 204
<(310) µ --- --- µ --- --- --- µ 204
<L(311) µ --- --- µ --- --- --- µ 204
<S(312) µ --- --- µ --- --- --- µ 204
<SL(313) µ --- --- µ --- --- --- µ 204
<=(315) µ --- --- µ --- --- --- µ 204
<=L(316) µ --- --- µ --- --- --- µ 204
<=S(317) µ --- --- µ --- --- --- µ 204
<=SL(318) µ --- --- µ --- --- --- µ 204
>(320) µ --- --- µ --- --- --- µ 204
>L(321) µ --- --- µ --- --- --- µ 204
>S(322) µ --- --- µ --- --- --- µ 204
>SL(323) µ --- --- µ --- --- --- µ 204

541
Errori e flag aritmetici Appendice C

Mnemonica 25503 25504 25505 25506 25507 25404 25405 25402 Pag.
(ER) (CY) (GR) (EQ) (LE) (OF) (UF) (N)
>=(325) µ --- --- µ --- --- --- µ 204
>=L(326) µ --- --- µ --- --- --- µ 204
>=S(327) µ --- --- µ --- --- --- µ 204
>=SL(328) µ --- --- µ --- --- --- µ 204
TST(350) µ --- --- --- --- --- --- --- 158
TSTN(351) µ --- --- --- --- --- --- --- 158
+(400) µ µ --- µ --- µ µ µ 232
+L(401) µ µ --- µ --- µ µ µ 232
+C(402) µ µ --- µ --- µ µ µ 232
+CL(403) µ µ --- µ --- µ µ µ 232
+B(404) µ µ --- µ --- --- --- µ 234
+BL(405) µ µ --- µ --- --- --- µ 234
+BC(406) µ µ --- µ --- --- --- µ 234
+BCL(407) µ µ --- µ --- --- --- µ 234
–(410) µ µ --- µ --- µ µ µ 237
–L(411) µ µ --- µ --- µ µ µ 237
–C(412) µ µ --- µ --- µ µ µ 237
–CL(413) µ µ --- µ --- µ µ µ 237
–B(414) µ µ --- µ --- --- --- --- 241
–BL(415) µ µ --- µ --- --- --- --- 241
–BC(416) µ µ --- µ --- --- --- --- 241
–BCL(417) µ µ --- µ --- --- --- --- 241
*(420) µ --- --- µ --- --- --- µ 245
*L(421) µ --- --- µ --- --- --- µ 245
*U(422) µ --- --- µ --- --- --- µ 245
*UL(423) µ --- --- µ --- --- --- µ 245
*B(424) µ --- --- µ --- --- --- --- 247
*BL(425) µ --- --- µ --- --- --- --- 247
/(430) µ --- --- µ --- --- --- µ 249
/L(431) µ --- --- µ --- --- --- µ 249
/U(432) µ --- --- µ --- --- --- µ 249
/UL(433) µ --- --- µ --- --- --- µ 249
/B(434) µ --- --- µ --- --- --- --- 251
/BL(435) µ --- --- µ --- --- --- --- 251
ADBL(480) µ µ --- µ --- µ µ µ 273
SBBL(481) µ µ --- µ --- µ µ µ 275
MBSL(482) µ --- --- µ --- --- --- µ 278
DBSL(483) µ --- --- µ --- --- --- µ 280
MBS(484) µ --- --- µ --- --- --- µ 277
DBS(485) µ --- --- µ --- --- --- µ 279
XFR2(––) µ --- --- --- --- --- --- --- 191
BXF2(––) µ --- --- --- --- --- --- --- 192
IEMS(––) µ --- --- --- --- --- --- --- 336

542

Potrebbero piacerti anche