Debugging my macros. The good thing is that after you have some well designed macros, most of the simple text user interface things behave almost like BASIC, or terminal printing in Pascal.

Also a good chance to dog food myself using the barely improved editor, and trying to make the zenas assembler work and assemble my non-trivial Z80-based text editor. Dog food is good food!
The only problem I found today was a regression in the vim-like command to jump to a line number. One other thing I noticed is that horizontal scroll doesn't work reliably when you have very long lines that extend beyond the right margin.

That being said, It's a little miracle I have never seen it crash, not a single time, during actual development work.
The best of news is that there are not many news on that front!

#bim #tbim #zenas #z80 #zen80 #zenzx #retrocomputing #ZXSpectrum #speccy #Spectrum

tbim, bim, zenas, zen80

Yes, of course all of these things can be done mixing and matching disparate tools in some other ways, but as a matter of access and code legibility you will be able to directly examine every single bit of the toolset and toolchain.

Every single bit traceable, nowhere left for bits to hide. That's something you can't do unless you're a highly sophisticated specialist today.

#bim #tbim #zenas #zen80 #zenzx #retrocomputing #golang #foss

zenas, zen80, bim and assorted tools

Things starting to fall into place like Tetris bricks!

I still can't glue the ZenZX emulator to the text mode editor, but when I decouple the text mode renderer from the editor logic (sometime next year), I should be able to render the editor and other tools using Deluxe UI in a GL-accelerated window, and I should be able to embed ZenZX in a bim pane.

But essentially everything you see in this screenshot, from tiling manager, to editor, to assembler, to emulator, is one single coherent and consistent codebase (with the sole exception of the Spectrum ROM!)

Lots of work ahead in 2026!

Longer term project beyond 2026 will be to get the language ual off the ground and port all these things to ual.

#bim #tbim #zenzx #zen80 #zenas #foss #golang #retrocomputing #z80

And if we replace that 255 with a 256 we'd be occupying the space of a 16-bit integer, which the test_func shouldn't accept.

And now it won't! It works!

#zenas #z80

That's not too bad.

#zenas #z80

zenas - z80 assembler

zenas gains basic C-style macros. The .MACRO_STYLE directive works for the most basic cases passing simple parameters.

Notice the very subtle difference between these two most basic code examples. One of them uses a constant value, the other uses a variable parameter to perform an operation.

Up next I'm working on call-block style (not inline) function calls, juggling multiple parameters, return values and other nice things on the drawing board. Possibly the most important external tool is the z88dk library importer, which I'm still drafting on the back of my mind.

#zenas #asm #assembler #z80 #golang #foss

Ok traditional-style assembler macros are working almost perfectly now.

Work on C-style macros is ongoing. Zenas is already able to parse C macro definitions and use that to generate inline Z80 code using the fast register calling convention.

In C-Style mode, you must have at least one routine called 'main', otherwise the assembler will emit zero bytes. You not only need to implement your macros, you need them to be called by somebody in order for them to be instantiated and inlined, and that initialisation is typically done in main().

More work needs to be done to support C-style macros that call C functions in compact reusable / re-entrant mode (not emitted inline).

It's not C, but I can imagine these C-like fearures being helpful to reduce programming errors.

I'm also working on an importer that allows you to reuse most Z88DK assembler libraries, whilst translating all of Z88DK's C stubs to Zenas C-style macros.

#zenas #z80 #retrocomputing #assembler

Now entertaining the possibility of crafting a minimally working version of ual using zenas.

Not sure how far away from that I am, could still be a year or more away.

#ual #zenas

Experimental. Doesn't work well yet. Will take time to get this right.

#zenas #z80 #assembler #asm