********************************************************
Voltar para página inicial
PPG2 - Pipelined Processor Grupo 2
Instruction Set Details
© Copyright, 2008 – Grupo2
Filipe Denaur de Moraes
Luis Felipe Auad Guedes
Tiago Jost
********************************************************
direct dado alocado na memória RAM.
immediate<(/b) Uma constante incluída na própria instrução.
Rn Registradores de R0 a R6.
NOP
Afeta PSW: Not
Bytes 2
Cycles 1
Encoding 00000000 00000000
Operation PC = PC + 1
Example NOP
______________________________
ANL A, #immediate
Afeta PSW: C AC
F0 RS1 RS0
OV P
Bytes 2
Cycles 1
Encoding 11010111 immediate
Operation ANL -> A = A AND immediate
Example ANL A, #3Fh
______________________________
ANL A, direct
Afeta PSW: C AC
F0 RS1 RS0 OV
P
Bytes 2
Cycles 1
Encoding 11000111 direct
Operation ANL -> A = A AND (direct)
Example ANL A, 40h
______________________________
ANL A, Rn
Afeta PSW: C AC
F0 RS1 RS0
OV P
Bytes 2
Cycles 1
Encoding 11000111 Rn
Operation ANL -> A = A AND Rn
Example ANL A, R4
______________________________
ANL direct, A
Afeta PSW: C AC
F0 RS1 RS0
OV P
Bytes 2
Cycles 1
Encoding 11001 direct 111
Operation
ANL -> (direct) = (direct) AND A
Example ANL 40h, A
______________________________
ANL direct, #immediate (não suportado)
______________________________
CPL C
Afeta PSW: C
AC F0 RS1
RS0 OV P
Bytes 2
Cycles 1
Encoding 11100000 xxxxxxxx
Operation CPL C = NOT C
Example CPL C
______________________________
CPL A
Afeta PSW: C
AC F0 RS1
RS0 OV P
Bytes 2
Cycles 1
Encoding 11100111 xxxxxxxx
Operation CPL A = NOT A
Example CPL A
_______________________________
ADD A, #immediate
Afeta PSW: C AC
F0 RS1 RS0 OV
P
Bytes 2
Cycles 1
Encoding 10110111 immediate
Operation ADD -> A = A + immediate
Example ADD A, #3Fh
______________________________
ADD A, direct
Afeta PSW: C AC
F0 RS1 RS0 OV
P
Bytes 2
Cycles 1
Encoding 10100111 direct
Operation ADD -> A = A + direct
Example ADD A, 40h
______________________________
ADD A, Rn
Afeta PSW: C
AC F0 RS1
RS0 OV
P
Bytes 2
Cycles 1
Encoding 10100111 Rn
Operation ADD -> A = A + Rn
Example ADD A, R4
______________________________
ADD direct, A
Afeta PSW: C
AC F0 RS1
RS0 OV
P
Bytes 2
Cycles 1
Encoding 10101 direct 111
Operation ADD -> direct = direct + A
Example ADD 40h, A
______________________________
ADD direct,
#immediate (não
suportado)
______________________________
MOV A, #immediate
Afeta PSW: C AC
F0 RS1 RS0 OV
P
Bytes 2
Cycles 1
Encoding 00110111 immediate
Operation MOV -> A = immediate
Example MOV A, #3Fh
______________________________
MOV A, direct
Afeta PSW: C AC
F0 RS1 RS0 OV
P
Bytes 2
Cycles 1
Encoding 00100111 direct
Operation MOV -> A = direct
Example MOV A, 40h
______________________________
MOV A, Rn
Afeta PSW: C AC
F0 RS1 RS0
OV P
Bytes 2
Cycles 1
Encoding 00100111 Rn
Operation MOV -> A = Rn
Example MOV A, R4
______________________________
MOV direct, A
Afeta PSW: C
AC F0 RS1
RS0 OV P
Bytes 2
Cycles 1
Encoding 00101 direct 111
Operation MOV -> direct = A
Example MOV 40h, A
______________________________
MOV direct, Rn
Afeta PSW: C
AC F0 RS1
RS0 OV P
Bytes 2
Cycles 1
Encoding 00101 direct Rn
Operation MOV -> direct = Rn
Example MOV
40h, R4
______________________________
MOV direct, #immediate (não suportado)
______________________________
JC offset
Afeta PSW: C
AC F0 RS1
RS0 OV P
Bytes 2
Cycles 2
Encoding 01100000 offset
Operation JC -> PC = PC + 2
if(C=1) -> PC = PC + offset
Example JC LABEL
______________________________
JZ offset
Afeta PSW: C
AC F0 RS1
RS0 OV P
Bytes 2
Cycles 2
Encoding 10000000 offset
Operation JC -> PC = PC + 2
if(A=0) -> PC = PC + offset
Example JZ LABEL
______________________________
JMP offset
Afeta PSW: C
AC F0 RS1
RS0 OV P
Bytes 2
Cycles 2
Encoding 01000000 offset
Operation JC -> PC = PC + offset
Example JMP LABEL