Happy to say that the Nits CPU is now alive and Turing complete. The instruction set is quite small but it runs at both slow (300 Hz) and fast (1 Mhz) speed.
The instruction set includes:
- NOP : do nothing
- HALT : halt the computer, at this stage, only a manual reset can restart it
- ADD : add content of register A and register B and store the result in register A
- SUB : substract the value stored in register B from the value stored in register A and store the result in register A
- OUT A : output the content of register A as a decimal unsigned value on the display
- OUT B : output the content of register B as a decimal unsigned value on the display
- LD A, B : copy the content of register B in register A
- LD A, x : copy the content of the memory at address x in register A
- LD A, i: copy the value i in register A
- LD B, A : copy the content of register A in register B
- LD B, x : copy the content of the memory at address x in register B
- LD B, i: copy the value i in register B
- LD x, A : copy the content of register A at memory address x
- LD x, B : copy the content of register B at memory address x
- JMP x : unconditionnal jump at address x
- JMPC x : jump at address x if carry flag is set
- JMPZ x : jump at address x if zero flag is set
It is now time to improve on it.
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.