Software Getting Firmer
With the system hardware getting more sophisticated, it's time to start thinking about software that's more than just one-off test code. With the LCD in place, there's already a need to have some firmware in place to support it. Plus the keypad is going to need service routines as well.
That means I need some rules for the software to grow by.
Jump Table
A jump table will give access to system routines. This will take up some memory space, but it'll more than pay for itself. I won't have to go through all my old code updating the call addresses every time I rewrite a procedure.
I've set aside 0000-00CF for the jump table. That gives me room for 54 entries total. The table will use JMPs. The system routines will end in a RET. System routines should be invoked with a CALL or RST to the jump table address.
System Variables
00D0-00FF is for system variables. That may change. The problem with this location is that I may put in a write protect circuit for the lower 4K of RAM to protect it. I'd put a switch in that holds the /WE line high on any address that has A12 low. If I do that, I'll have to move variables into the upper 4K of memory.
Memory Map
The memory map looks like this right now:
Address Range Use 0000-00CF Jump Table 00D0-00FF System Variables 0100-01FF System Initialization 0200-07FF System Routines 0800-0FFF System Monitor 1000-1CFF User Application Area 1D00-1EFF Heap 1F00-1FFF Stack
