User Tools

Site Tools


inscesar

Conjunto de instruções do CESAR16 e CESAR16i

Instruções de uso geral
Código Instrução Operação
0000 xxxx NOP Nenhuma operação
1111 xxxx HLT Para a execução
Instruções de Controle de Fluxo
Código Instrução Operação
0100 xxxx JMP end R7 ← end
0011 0000 BR dd8 R7 ← R7 + dd8
0011 0001 BNE dd8 if (NotEqual) then R7 ← R7 + dd8
0011 0010 BEQ dd8 if (Equal) then R7 ← R7 + dd8
0011 0011 BPL dd8 if (Plus) then R7 ← R7 + dd8
0011 0100 BPL dd8 if (Minus) then R7 ← R7 + dd8
0011 0101 BVC dd8 if (Overflow Clear) then R7 ← R7 + dd8
0011 0110 BVS dd8 if (Overflow Set) then R7 ← R7 + dd8
0011 0111 BCC dd8 if (Carry Clear) then R7 ← R7 + dd8
0011 1000 BCS dd8 if (Carry Set) then R7 ← R7 + dd8
0011 1001 BGE dd8 if (Greater or Equal) then R7 ← R7 + dd8
0011 1010 BLT dd8 if (Less Than) then R7 ← R7 + dd8
0011 1011 BGT dd8 if (Greater Than) then R7 ← R7 + dd8
0011 1100 BLE dd8 if (Less or Equal) then R7 ← R7 + dd8
0011 1101 BHI dd8 if (Higher) then R7 ← R7 + dd8
0011 1110 BLS dd8 if (Lower or Same) then R7 ← R7 + dd8
0110 xxxx JSR reg,end Pilha ← reg; reg ← R7; R7 ← end
0111 xxxx RTS reg R7 ← reg; reg ← Pilha
Instruções com 1 operando
Código Instrução Operação
1000 0000 CLR op op ← 0
1000 0001 NOT op op ← NOT op
1000 0010 INC op op ← op + 1
1000 0011 DEC op op ← op - 1
1000 0100 NEG op op ← - op
1000 0101 TST op op ← op
1000 0110 ROR op Rotate “op” one bit right through carry
1000 0111 ROL op Rotate “op” one bit left through carry
1000 1000 ASR op Shift “op” one bit right
1000 1001 ASL op Shift “op” one bit left
1000 1010 ADC op op ← op + c
1000 1011 SBC op op ← op - c
Instruções com 2 operando
Código Instrução Operação
1001 xxxx MOV src_end, dst_end dst ← src
1010 xxxx ADD src_end, dst_end dst ← dst + src
1011 xxxx SUB src_end, dst_end dst ← dst - src
1100 xxxx CMP src_end, dst_end src - dst
1101 xxxx AND src_end, dst_end dst ← dst AND src
1110 xxxx OR src_end, dst_end dst ← dst OR src
Instruções especiais
Código Instrução Operação
0001 xxxx CCC NZCV clear condition code
0010 xxxx SCC NZCV set condition code
0101 xxxx SOB Reg,dd8 reg ← reg - 1; if (reg==0) then R7 ← R7-dd8
inscesar.txt · Last modified: 2016/08/08 16:31 (external edit)