Reinstating the KT8!!!
This commit is contained in:
parent
76b75d8999
commit
d181fe008c
46
KT8 opcodes v3-.txt
Normal file
46
KT8 opcodes v3-.txt
Normal file
@ -0,0 +1,46 @@
|
||||
Proposed Op codes for KT8 processor
|
||||
Created - CAK 2-11-2014
|
||||
|
||||
KT8 (Krauter/Terpstra 8-bit) is a super simple processor that works with just 8-bit instructions.
|
||||
|
||||
KT8 Has:
|
||||
- 8-bit wide instructions in a separate bank of program memory.
|
||||
- Three registers for arithmetic:
|
||||
A = input 1
|
||||
B = input 2
|
||||
R = result
|
||||
- 32 bytes of RAM memory[0-31]. Some of these memory locations could do special things.
|
||||
|
||||
Op Codes:
|
||||
|
||||
Bits OP Name Description
|
||||
|
||||
000 aaaaa - LOADA aaaaa : copy from RAM address to register A
|
||||
001 aaaaa - LOADB aaaaa : copy from RAM address to register B
|
||||
010 aaaaa - SAVE aaaaa : copy from register R to RAM address
|
||||
|
||||
0110 xxxx - LOWBITS xxxxxxxx : save 4bits=xxxx to lower bits[0-3] of B
|
||||
key store 000000001
|
||||
disp write 0000000001
|
||||
key to disp 00000000001
|
||||
1000 0000 - ADD : R = A + B
|
||||
1000 0001 - SUB : R = A - B
|
||||
1000 0010 - AND : R = A AND B
|
||||
1000 0011 - OR : R = A OR B
|
||||
1000 0100 - XOR : R = A XOR B
|
||||
1000 0101 - INVA : R = bit inverse A
|
||||
1000 0110 - INVB : R = bit inverse B
|
||||
1000 0111 - SWAPA : swap values between R and A
|
||||
1000 1000 - SWAPB : swap values between R and B
|
||||
1000 1001 - LSHIFT : shift bits in R to the left
|
||||
1000 1010 - RSHIFT : shift bits in R to the right
|
||||
1000 1011 - CLEAR : set R to zero
|
||||
1000 1100 - INC : add 1 to R
|
||||
1000 1101 - DEC : subtract 1 from R
|
||||
|
||||
1100 xxxx - FJMP xxxx : move program counter forward by xxxx instructions
|
||||
1101 xxxx - BJMP xxxx : move program counter back by xxxx instructions
|
||||
11100000 - SKIPZ : if R is zero move program counter forward 2 instead of 1
|
||||
11100001 - SKIPNZ : if R is not zero move program counter forward 2 instead of 1
|
||||
|
||||
11111111 - RESET : put program counter back to zero
|
Loading…
Reference in New Issue
Block a user