Hacker News new | ask | show | jobs
by tonyRobinson 3371 days ago
I liked the challenge of implementing my own instruction set. It turned out to be quite similar to a subset of ARM, so it may also be similar to a subset of MIPS (I haven't checked).
1 comments

Yeah, I can understand the appeal of implementing your own, but MIPS itself is very small. There are also a lot of good resources on it, and the spec fits on one page : http://www.mrc.uidaho.edu/mrc/people/jff/digital/MIPSir.html
Thanks for that link. I'm sure I've looked at MIPS before and it may well have unconsciously influenced me, or it may be a case of converging evolution, but I use the three register design much like MIPS does. However, mine is much smaller, essentially only six "ALU" instructions D = S op T for op in AND, OR, XOR, ADD, SUB, ASR along with PUSH and POP. Given the simplicity of my set I can start from anywhere and cut it down, in fact I'm thinking about cutting down TCC x86_64 to what I use in order to learn how to port TCC.