Resumo das Instruções do CESAR N Z C V Operação Uso Geral

Resumo das Instruções do CESAR
N Z C V
Operação
Uso Geral
NOP
HLT
-
-
-
-
no operation
stop execution
-
-
-
-
R7(PC) ← end
Always
if NotEqual
if Equal
if Plus
if Minus
if oVerflow Clear
if oVerflow Set
if Carry Clear
if Carry Set
if Greater or Equal
if Less Than
if Greater
if Less Equal
if Higher
if Lower or Same
Pilha <- reg
R7 (PC) <- reg
t
t
t
t
t
t
t
t
t
t
t
t
t
t
t
t
t
t
t
t
t
t
t
t
0
1
t
t
t
0
lsb
msb
lsb
msb
t
t
0
0
t
t
t
0
xor
xor
xor
xor
t
t
dst_end
dst_end
dst_end
dst_end
dst_end
dst_end
t
t
t
t
t
t
t
t
t
t
t
t
t
t
t
-
0
t
t
t
0
0
dst ← src
dst ← dst + src
dst ← dst - src
src - dst
dst ← dst AND src
dst ← dst OR src
dd8
t
t
-
t
t
-
t
t
-
t
t
-
clear condition code
set condition code
reg = reg - 1; if reg=0, R7(PC) ← R7-dd8
Controle de Fluxo
JMP
BR
BNE
BEQ
BPL
BMI
BVC
BVS
BCC
BCS
BGE
BLT
BGT
BLE
BHI
BLS
JSR
RTS
end
dd8
dd8
dd8
dd8
dd8
dd8
dd8
dd8
dd8
dd8
dd8
dd8
dd8
dd8
dd8
reg,
reg
(Z=0)
(Z=1)
(N=0)
(N=1)
(V=0)
(V=1)
(C=0)
(C=1)
(N=V)
(N≠V)
(N=V ∧ Z=0)
(N≠V ∨ Z=1)
(C=0 ∧ Z=0)
(C=1 ∨ Z=1)
end
R7 ← R7 + dd8
R7 ← R7 + dd8
R7 ← R7 + dd8
R7 ← R7 + dd8
R7 ← R7 + dd8
R7 ← R7 + dd8
R7 ← R7 + dd8
R7 ← R7 + dd8
R7 ← R7 + dd8
R7 ← R7 + dd8
R7 ← R7 + dd8
R7 ← R7 + dd8
R7 ← R7 + dd8
R7 ← R7 + dd8
R7 ← R7 + dd8
reg ← R7; R7 ← end
reg ← Pilha
Instruções com 1 operando
CLR
NOT
INC
DEC
NEG
TST
ROR
ROL
ASR
ASL
ADC
SBC
op
op
op
op
op
op
op
op
op
op
op
op
op ← 0
op ← NOT op
op ← op + 1
op ← op - 1
op ← - op
op ← op
C
C
C
C
0
op ← op + c
op ← op - c
Instruções com 2 operandos
MOV
ADD
SUB
CMP
AND
OR
src_end,
src_end,
src_end,
src_end,
src_end,
src_end,
Instruções especiais
CCC
SCC
SOB
NZCV
NZCV
Reg,
Prof. Sérgio Luis Cechin
INF 01108
Modos de Endereçamento
Geral
Registrador
Rx
Registrador Pós-Incrementado
(Rx)+
Registrador Pré-Decrementado
-(Rx)
Indexado
dd16(Rx)
Registrador Indireto
(Rx)
Pós-Incrementado Indireto
((Rx)+)
Pré-Decrementado Indireto
(-(Rx))
Indexado Indireto
(dd16(Rx))
Associados ao R7 (PC)
Imediato
#dd16
(R7)+, dd16
Absoluto
dd16
((R7)+), dd16
Relativo
-
dd8(R7)
Endereçamento do Visor
↓ 0FFDCH
0FFFFH ↓
Endereçamento do Teclado
0FFDAH
Se o conteúdo deste endereço de memória for 080H, então existe tecla disponível
0FFDBH
Endereço a ser lido, caso exista uma tecla disponível
Prof. Sérgio Luis Cechin
INF 01108