Close

16-bit register/memory space

A project log for One-instruction TTL Computer

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

justin-davisJustin Davis 08/29/2017 at 14:410 Comments

One thing that's been very annoying in coding is how I interface to the memory.  I have a 16-bit page register that allows me to access 128 memory locations with the source/destination bus.  So when I push/pop I have to change my memory page to the stack.  Then I lose access to my other variables.  Copying a variable onto the stack is tough because I have to store it in the few registers I have, change the memory page, and then copy it back without disturbing those registers.  

I would really like to be able to access the whole 16-bit memory at any time.  The old 6502 allows you to access the whole 16-bit memory space and I'm jealous.  This would let me pop/push without losing access to my other memory space.  I can move variables onto the stack easily.  And I can transfer from anywhere to anywhere in my memory very easily.  

Implications:

So the memory map will look something like: 

0x00000x00FFFunction Registers
0x01000x7FFFROM
0x80000xFFFFRAM

This is almost a complete tear-up of the design.  However, it will be much easier and elegant to code for this CPU (and more fun).  And I don't think it will increase the chip count 

Discussions