Instruções de bit
Classe |
Sintaxe em assembly |
Campos da instrução (16 bits) |
Acções |
Flags afectadas |
Comentários |
||||
1º opcode (4bits) |
2º opcode (4bits) |
1º operando (4bits) |
2º operando (4bits) |
||||||
Instruções de bit |
AND |
Rd, Rs |
BITOP |
AND |
Rd |
Rs |
Rd ¬ Rd Ù Rs |
Z, N |
|
OR |
Rd, Rs |
OR |
Rd |
Rs |
Rd ¬ Rd Ú Rs |
Z, N |
|
||
NOT |
Rd |
NOT |
Rd |
xxxx |
Rd ¬ Rd Å FFFFH |
Z, N |
Complemento para 1 |
||
XOR |
Rd, Rs |
XOR |
Rd |
Rs |
Rd ¬ Rd Å Rs |
Z, N |
|
||
TEST |
Rd, Rs |
TEST |
Rd |
Rs |
Rd Ù Rs |
Z, N |
Rd não é alterado |
||
BIT |
Rd, n |
BIT |
Rd |
n |
Z ß Rd(k) Å 1 |
Z |
Rd não é alterado |
||
SET |
Rd, n |
SETBIT |
Rd |
n |
Rd(n) ¬ 1 |
Z, N ou outra (se Rd for RE) |
n Î [0 .. 15] |
||
EI |
|
SETBIT |
RE |
IE_index |
RE(IE_index) ¬ 1 |
EI |
Enable interrupts |
||
EI0 |
|
SETBIT |
RE |
IE0_index |
RE (IE0_index) ¬ 1 |
EI0 |
Enable interrupt 0 |
||
EI1 |
|
SETBIT |
RE |
IE1_index |
RE (IE1_index) ¬ 1 |
EI1 |
Enable interrupt 1 |
||
EI2 |
|
SETBIT |
RE |
IE2_index |
RE (IE2_index) ¬ 1 |
EI2 |
Enable interrupt 2 |
||
EI3 |
|
SETBIT |
RE |
IE3_index |
RE (IE3_index) ¬ 1 |
EI3 |
Enable interrupt 3 |
||
SETC |
|
SETBIT |
RE |
C_index |
RE (C_index) ¬ 1 |
C |
Set Carry flag |
||
EDMA |
|
SETBIT |
RE |
DE_index |
RE (DE_index) ¬ 1 |
DE |
Enable DMA |
||
CLR |
Rd, n |
CLRBIT |
Rd |
n |
Rd(n) ¬ 0 |
Z, N ou outra (se Rd for RE) |
n Î [0 .. 15] |
||
DI |
|
CLRBIT |
RE |
IE_index |
RE (IE_index) ¬ 0 |
EI |
Disable interrupts |
||
DI0 |
|
CLRBIT |
RE |
IE0_index |
RE (IE0_index) ¬ 0 |
EI0 |
Disable interrupt 0 |
||
DI1 |
|
CLRBIT |
RE |
IE1_index |
RE (IE1_index) ¬ 0 |
EI1 |
Disable interrupt 1 |
||
DI2 |
|
CLRBIT |
RE |
IE2_index |
RE (IE2_index) ¬ 0 |
EI2 |
Disable interrupt 2 |
||
DI3 |
|
CLRBIT |
RE |
IE3_index |
RE (IE3_index) ¬ 0 |
EI3 |
Disable interrupt 3 |
||
CLRC |
|
CLRBIT |
RE |
C_index |
RE (C_index) ¬ 0 |
C |
Clear Carry flag |
||
DDMA |
|
CLRBIT |
RE |
DE_index |
RE (DE_index) ¬ 0 |
DE |
Disable DMA |
||
CPL |
Rd, n |
CPLBIT |
Rd |
n |
Rd(n) ¬ Rd(n) Å 1 |
Z, N ou outra (se Rd for RE) |
n Î [0 .. 15] |
||
CPLC |
|
CPLBIT |
RE |
C_index |
RE (C_index) ¬ RE(C_index) Å 1 |
C |
Complement Carry flag |
||
SHR |
Rd, n |
BITOP |
SHR |
Rd |
n |
n>0 : C ß Rd(n-1) |
Z, N, C |
n Î [0 .. 15] |
|
SHL |
Rd, n |
SHL |
Rd |
n |
n>0 : C ß Rd(15-n+1) |
Z, N, C |
n Î [0 .. 15] |
||
SHRA |
Rd, n |
ARITOP |
SHRA |
Rd |
n |
n>0 : C ß Rd(n-1) |
Z, N, C |
n Î [0 .. 15] |
|
SHLA |
Rd, n |
SHLA |
Rd |
n |
n>0 : C ß Rd(15-n+1) |
Z, N, C, V |
n Î [0 .. 15] |
||
ROR |
Rd, n |
BITOP |
ROR |
Rd |
n |
n>0 : C ß Rd(n-1) |
Z, N, C |
n Î [0 .. 15] |
|
ROL |
Rd, n |
ROL |
Rd |
n |
n>0 : C ßRd(15-n+1) |
Z, N, C |
n Î [0 .. 15] |
||
RORC |
Rd, n |
RORC |
Rd |
n |
n>0 : Rd || C ß Rd(n-2..0) || C || Rd(15..n-1) |
Z, N, C |
n Î [0 .. 15] |
||
ROLC |
Rd, n |
ROLC |
Rd |
n |
n>0 : C || Rd ß Rd(15-n+1..0) || C || Rd(15..15-n+2) |
Z, N, C |
n Î [0 .. 15] |
||
Livre |
|
|
|
|
|
|
|