KCPU revision 6

Work in progress. I decided to change opcode format again, it’s now sort of like in 6502. There is certain table of opcodes, which defines which control lines are triggered, and how.

I sorta cheated here and used a 1KB ROM chip for this – but since the CPU is in chips it’s a cheaper solution, which has same speed as logic gates would.

Current scheme (it’s far from finished, it doesn’t even work yet):






The new opcode format is following (B0..B4 are offset into opcode table, which defines some control lines for various opcode):

[0] REGISTER OR DATA (0 means register, 1 means data)
[1] 
[2] 
[3] 
[4] 
[5] 
[6] 
[7] 





New opcode table looks like this:

        B0 B1 B2 B3 B4
JMPFAR  1  1  1  -  -

JMP     0  0  0  0  0
JG      0  0  0  0  1
JL      0  0  0  1  0
JNE     0  0  0  1  1
JE      0  0  1  0  0
JGE     0  0  1  0  1
JLE     0  0  1  1  0
???     0  0  1  1  1

MOV     0  1  0  0  0
ADD     0  1  0  0  1
SUB     0  1  0  1  0
NOT     0  1  0  1  1

4 Responses to “KCPU revision 6”


  • That looks cool! Is this just a computer model or will it be made in real life? I don’t make my own chips… I just use already made ones like the Propeller chip from Parallax, LOL. Just that circuit design is confusing! Keep up the good work Black Phoenix! =D

  • Mostly computer model. I might build one in real life, but it’s gonna have different schematics probably (very dependand on components available).

    It’s sorta confusing, yeah, but I’m afraid I’m not yet skilled enough to make it less confusing :)

    There’s a lot of time forward though!

  • Very Nice Work :>

    but..

    “More info on programming later!”

    is “Later” Right now? .____.

    i want to know how i can use ADD or MUL etc.

    ~ILAN12346

  • What do you mean? If you want to learn assembly, then you should look up some tutorials, they explain how you use MUL, ADD, etc, they are pretty common amongst all CPUs

Leave a Reply