Custom C Compiler for homemade instruction set? Answered
I'm designing a relay based computer. It will be an 8-bit cpu made entirely out of relays, except for the RAM and program memory.
I need an instruction set, but I am not crazy enough to try and make it run the x86 instruction set or anything like that, so I am making my own. It is a fairly basic set, only 60 instructions, with a quarter of them being data movement. I tried compiling some basic computation programs, like a 16-bit add and an 8-bit multiply program. It is a pain trying to compile it so I was wondering if there is a way to plug my instruction set into a compiler, such as gnu's gcc. I don't even need it to create a machine code file, I just need the assembly.
Is something like this possible??? and how hard would it be to implement???