Close

return of the string (output)

A project log for One-instruction TTL Computer

A breadboard-able computer which uses only a single instruction - MOVE

justin-davisJustin Davis 05/23/2017 at 01:320 Comments

Finally got my string output working! I found a bug with my compare bit. Now I really need to work on how to call functions and return from them. Then I use this string output as a function to send information over the serial port. It significantly helps my debug capability. To return from function calls, I need to have a simple stack. I'll need to pull the program counter and push it on the stack. I can write a stack in software. It's not necessarily a hardware-only thing even though many processors do it in hardware. The 6502 has a dedicated instruction for it. This means I need to start structuring my RAM. I've never written a software stack, but I know you need a pointer to the top of the stack. And then popping and pushing will need to decrease and increase this pointer. And I'll have to do it a lot, so it'll need to be simple.

Discussions