Closed aslak3 closed 1 year ago
This is the same issue as I had in #39 . It's easy to find a workaround, but I hope the upcoming rewrite gives us a native way to solve this.
My bad, somehow I missed your issue #39. I'll close this.
In general "#bits 8" works but it will be confusing when working with any processor that can byte address but uses a different instruction width, like the 68K. Or my own creation. It also breaks output formats, eg. MIF.
Hmmm, I think this time it's a bit different from #39 since this issue doesn't deal with banks.
Is the only problem here messing with the output format? I think we can fix that by creating some new output options to deal with things like instruction width.
Now, usually, the assembler itself doesn't care about instruction width -- it only needs to know the addressable width to calculate label addresses. Do you think there is something else missing here? Is it a problem if the assembler doesn't care about instruction width? What do you think?
The two issues are:
I can live with 1, though of course it's not ideal. To overcome 2 I'm currently using hexstr output and feeding it through my own perl based MIF generator using -p, which is how I found out that errors do not go in stderr.
I'll probably add new format-specific options to the MIF output to overcome this limitation in the future!
My little FPGA processor that I'm working on has 16 bit wide instructions but it can address individual bytes. This mostly works with "#bits 8" but it causes some confusion eg the instructions stream should always consist of 16 bit word quantities. Maybe there needs to be two quantities, the addressable width and the instruction width? The instruction width would influence the width of the outputted data.
All in all, this project is terrific and I look forward to seeing it progress!
I'm hoping I can have a crack at another output format, a VHDL array, instead of being lazy and munging another output format with perl or similar. But I need to learn some Rust first.....