8bit-cpu icon indicating copy to clipboard operation
8bit-cpu copied to clipboard

Version control w/ example code and customasm syntax

Open HeathenUK opened this issue 2 years ago • 1 comments

Hi there,

As best I can tell there seem to have been some hugely backward-incompatible changes to customasm since the original (very well written!) examples were uploaded. I've tried and failed to port the definitions to the current expectations of customasm and failed, probably in equal parts due to my unfamiliarity with both customasm and the mk1's instructions. It's a pity, I was looking forward to making a pull request! This addresses some but not all of the issues, and having applied each of these suggested migration changes we're still in a bad way - for example I see nothing about migrating the ' marks contained in the existing instruction definitions (e.g. "3'5"), they look like they could be slice notation but no joy there.

There seems to have been a shift away from 'cpudef' and 'tokendef' (although it looks like the parser still honours both so this is the least of all issues), the bankdef syntax no longer allows/requires quotation marks but even once that's fixed it throws panics due to the overlap in the two banks' respective locations. The thing I've totally failed to understand the root of - as your syntax looks identical to Lorenzi's to my eye - is casm's dislike of the way your registers and ALU opcodes are set out, and to every reference thereafter containing a $ sign.

Finally and somewhat bizarrely I can't even seem to find a historical build from ~2019 that likes the example code, so I'm not sure what's going on there either.

Regards,

Greg

HeathenUK avatar Dec 30 '21 17:12 HeathenUK

Hi Greg,

A PR would be more than welcome! As you might have noticed, the version I used to build the example is a submodule of the repo, you can find it here: https://github.com/vascofazza/customasm/tree/0ab3ff3c4961ad814b904fe4824a65ae8b251672 You can also find the microcode here https://github.com/vascofazza/8bit-cpu/blob/master/MK1_CPU/code/microcode.txt Where you can easily see what that 3'5 stands for and that should help you with the port.

Keep me posted!

vascofazza avatar Jan 02 '22 17:01 vascofazza