I've been programming furiously. I have 16-bit functions going - Add, Subtract, and Divide. And I have 8-bit multiply going. I've changed from putting the operands on the stack to having a dedicated memory location for them. I have so much memory, it's easier/faster just to hard-code specific locations for them. Next I'm going to implement the BM9 benchmark program as seen in the APOLLO181 website:
http://apollo181.wixsite.com/apollo181/experiment4-cpu-benchmark
This is also where I got my divider program, except I adapted it for 16-bit words. I've added these functions to the ROM as subroutines which I can call and return to my main program. I still have plenty of room in the ROM and RAM, so I don't think I will run out any time soon. I'd like to get the BM9 program into the ROM so if I ever get to the TTL version of the CPU, I can compare its run time to the FPGA version.
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.