stuff
This commit is contained in:
parent
5c352ac76f
commit
08390663c2
@ -1,6 +1,3 @@
|
|||||||
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 (Krauter/Terpstra 8-bit) is a super simple processor that works with just 8-bit instructions.
|
||||||
|
|
||||||
KT8 Has:
|
KT8 Has:
|
||||||
@ -9,44 +6,36 @@ KT8 Has:
|
|||||||
A = input 1
|
A = input 1
|
||||||
B = input 2
|
B = input 2
|
||||||
R = result
|
R = result
|
||||||
- 14 bytes of RAM memory[0-13].
|
- 32 bytes of RAM memory[0-31]. Some of these memory locations could do special things.
|
||||||
- A keyboard at address 14
|
|
||||||
- A screen at address 15
|
|
||||||
|
|
||||||
|
|
||||||
Op Codes:
|
Op Codes:
|
||||||
|
|
||||||
Bits OP Name Description
|
Bits OP Name Description
|
||||||
|
|
||||||
0000 aaaa - LOADA aaaa : copy from RAM address to register A
|
000 aaaaa - LOADA aaaaa : copy from RAM address to register A
|
||||||
0001 aaaa - LOADB aaaa : copy from RAM address to register B
|
001 aaaaa - LOADB aaaaa : copy from RAM address to register B
|
||||||
0010 aaaa - SAVE aaaa : copy from register R to RAM address
|
010 aaaaa - SAVE aaaaa : copy from register R to RAM address
|
||||||
|
|
||||||
0011 xxxx - LOWBITS xxxx : B = 0000xxxx
|
0110 xxxx - LOWBITS xxxx : save 4bits=xxxx to low bits[0-3] of B
|
||||||
0100 0000 - ADD : R = A + B
|
0111 xxxx - HIGHBITS xxxx : save 4bits=xxxx to high bits[7-4] of B
|
||||||
0100 0001 - SUB : R = A - B
|
1000 0000 - ADD : R = A + B
|
||||||
0100 0010 - AND : R = A AND B
|
1000 0001 - SUB : R = A - B
|
||||||
0100 0011 - OR : R = A OR B
|
1000 0010 - AND : R = A AND B
|
||||||
0100 0100 - XOR : R = A XOR B
|
1000 0011 - OR : R = A OR B
|
||||||
0100 0101 - INVA : R = bit inverse A
|
1000 0100 - XOR : R = A XOR B
|
||||||
0100 0110 - INVB : R = bit inverse B
|
1000 0101 - INVA : R = bit inverse A
|
||||||
0100 0111 - PASSA : R = A
|
1000 0110 - INVB : R = bit inverse B
|
||||||
0100 1000 - PASSB : R = B
|
1000 0111 - SWAPA : swap values between R and A
|
||||||
0100 1001 - LSHIFT : R = A << 1
|
1000 1000 - SWAPB : swap values between R and B
|
||||||
0100 1010 - RSHIFT : R = A >> 1
|
1000 1001 - LSHIFT : shift bits in R to the left
|
||||||
0100 1011 - CLEAR : R = 0
|
1000 1010 - RSHIFT : shift bits in R to the right
|
||||||
0100 1100 - INC : R = A + 1
|
1000 1011 - CLEAR : set R to zero
|
||||||
0100 1101 - DEC : R = A - 1
|
1000 1100 - INC : add 1 to R
|
||||||
0101 xxxx - FJMP xxxx : move program counter forward by xxxx instructions
|
1000 1101 - DEC : subtract 1 from R
|
||||||
0110 xxxx - BJMP xxxx : move program counter back by xxxx instructions
|
|
||||||
|
|
||||||
0111 xxxx - FJMPZ : if R is zero move program counter forward by xxxx instructions
|
1100 xxxx - FJMP xxxx : move program counter forward by xxxx instructions
|
||||||
1000 xxxx - BJMPZ : if R is not zero move program counter forward by xxxx instructions
|
1101 xxxx - BJMP xxxx : move program counter back by xxxx instructions
|
||||||
|
1110 0000 - SKIPZ : if R is zero move program counter forward 2 instead of 1
|
||||||
|
1110 0001 - SKIPNZ : if R is not zero move program counter forward 2 instead of 1
|
||||||
|
|
||||||
1001 xxxx - FJMPNZ : if R is zero move program counter forward by xxxx instructions
|
1111 0000 - RESET : put program counter back to zero.
|
||||||
1010 xxxx - BJMPNZ : if R is not zero move program counter forward by xxxx instructions
|
|
||||||
|
|
||||||
1011 0000 - RESET : R = 0
|
|
||||||
1011 0001 - HALT : stop KT8
|
|
||||||
|
|
||||||
1100 0000 - RKD : clear keyboard/display.
|
|
||||||
|
Loading…
Reference in New Issue
Block a user