Some 8-bit stuff 10-01-2018, 01:46 AM
#1
So, I've been collecting electronics components for the last month so that I could design and physically build myself a small CPU. I finally figured out an instruction set I want, and got to work today on the ALU. The instruction set is as follows:
And, just because it looks pretty, here's a graphic of the schematic for the ALU instructions:
![[Image: Cc1SmWi.jpg]](https://i.imgur.com/Cc1SmWi.jpg)
Let me know what you guys think. So far, the bill of materials is just under $30. When finished, this might be a fun project for those of you that want to learn this stuff (ill release my schematics if people are interested)
Code:
Registers: R0-R9
R7 is stack pointer
R8 is link register
R9 is program counter
ALU ops (reg-reg):
ADD
SUB
NEG
INV
LSH
RSH
AND
ORR
XOR
MOV (also accepts constant)
CMP (also accepts constant)
mem:
LDR
STR
PSH
POP
other (either constant or register):
BRA
JMP
INP (register only)
OUTAnd, just because it looks pretty, here's a graphic of the schematic for the ALU instructions:
![[Image: Cc1SmWi.jpg]](https://i.imgur.com/Cc1SmWi.jpg)
Let me know what you guys think. So far, the bill of materials is just under $30. When finished, this might be a fun project for those of you that want to learn this stuff (ill release my schematics if people are interested)



























![[+]](https://sinister.li/images/modern/collapse_collapsed.png)




![[Image: e91c9a58e5d941a600f8b4bda62894e9.298x125x1.png]](http://images.rapgenius.com/e91c9a58e5d941a600f8b4bda62894e9.298x125x1.png)






![[Image: dHJ4Beo.gif]](http://i.imgur.com/dHJ4Beo.gif)
![[Image: YUpAMpx.png]](https://i.imgur.com/YUpAMpx.png)
![[Image: d27PO9E.png]](https://i.imgur.com/d27PO9E.png)
![[Image: npPdgSp.png]](https://i.imgur.com/npPdgSp.png)
![[Image: VXhhfSB.png]](https://i.imgur.com/VXhhfSB.png)