CocoJEM Progress Report 1

Date: Mar 12, 2019

Excellent progress on CocoJEM today. I think I have figured out how I will read and process opcodes as I read them from memory. Still need to workout what I want to do for the different addressing modes.

I decided to make use of an enum to store all the mnemonic opcodes, timings and addressing modes. Keeping it all in once place will make referencing and debugging easier, and using an enum will ensure I don't suffer a typo at any point. It also makes it easy for me to copy all the mnemonic information from my mnemonic database and just paste it in.

I also created a ConditionCodeRegister to hold the CC register. I needed a clean way to handle checking the status of, and setting the flags. Single bits in a byte was error prone and not very readable.

Lastly, I implemented clra, and clrb, in addition to abx instructions, and unit tests to verify they work as expected. And I'm glad I did, because I was clearing B for both instructions by mistake.

GitHub commit



Copyright © 2019, Lee Patterson