new tg16/pce assembler
Or rather, a new build of PCEAS with changes. MooZ and I were working on doing changes to the assembler, sine some changes were needed for specific code layouts. I was gonna wait and just do a joint release with MooZ last year, but I guess things got slow on his side. So I’m just releasing it here. There’s a readme and a commented ASM test file, but I’ll just relist the new features here.
There’s a new data define directive; .dwl and .dwh. They return the LSB (.dwl) and MSB (.dwh) of a word entry. This useful for building a split lsb/msb tables. But more important, it cuts down the amount of typing needed for creating arrays of function tables of.. function addresses. Normally, you can just handle binary data in split format with external apps and just include the new binary data. But working with specific and runtime address generated labels for tables gets tedious. So this helps. Just copy/paste the same table and change the directive to .dwh for the second split set.
Macro’s now how a new legal character for macro names. Doesn’t sound a like a big deal, but ADDW.b or MOVE.b/MOVE.w/MOVE.l looks cleaner and much nicer than using an underscore _ or such.
Local labels how have -/+ support… sort of. You still need the ‘.’ character to signify/define a local label name, but now you can use .- or .– and .+ and .++ etc. You can use them in higher level math/logic operations too and inside EQUATE defines. You just need whitespace between the end of the name and the – or + operator, *IF* your label ends with a – or +. So test = .+++ + $10 works fine, but so does test1 = .skip+$10. The new labels for local doesn’t not break backwards compatibility with otherwise normal label names. I’m not a big fan of the -/+ usage as it can messy looking real quick in my opinion. But couple of people had requested it. Plus, it would make converting some c64 or such code a little easier (I mean, for when you’re lazy).
Opcodes that cross 8k bank boundaries no longer create an error and stop assembling. That is to say, if one or more opcode’s byte cross that boundary. Now it will generate a warning instead, but assemble correctly. Labels logic works fine with this as well. This means you can make 16k or 24k or whatever size ‘code banks’. This is needed for some hacking related stuff since those commercial assemblers didn’t have this problem/issue (like Bonk for instance). This also applies to data defines as well.
And finally, I fixed a bug where if the assembler encountered a certain error – it would just crash (there was no exit handler).
You can download the new version in Download and Links section.
Note: Things I like about PCEAS assembler syntax that I wouldn’t change;  instead of () for indirect addressing. Who cares if almost all the original 65x assemblers used (),  just makes things sooo much easier for the parser and avoid *certain* high level logic bugs (misinterpreted bracketing for opcodes). And < for non indirect ZP addressing. Though what I would like to add in the future is <# and >#for shorthand #low() and #high() directives, which have nothing to do with ZP addressing.