Assembling to different banks
Assembling to different banks
How do you assemble to different banks? Previously I've done this the long way by dealing with them separately as .TAP blocks and loading them in, but I assume there's an assembly language shortcut? (And does SPIN have this feature?)
Re: Assembling to different banks
Some assemblers like Sjasmplus and Zeus know about specific computer models, and can assemble into a device memory map specific to that model. So you can can use bank numbers of the correct size in your assembler directives. These directives are not part of assembly language per se, as the language is just concerned with runtime instructions for a generic Z80. They’re compile-time meta-instructions specific to each assembler.
Take a look at DEVICE, MMU, SLOT and PAGE in the sjasmplus docs for an example. ORG, DISP and ENT are also quite useful when assembling for banks that can appear at more than one address. It also comes with a bunch of example programs demonstrating that kind of thing.
https://z00m128.github.io/sjasmplus/documentation.html
For assemblers that aren’t device-aware, you can also do it more manually, by changing ORG multiple times and outputting multiple binary files. Many assemblers will also write tap/tzx/sna/z80 files directly, but to write 128K versions of those automatically also requires device awareness.
No idea about Spin but I never had much luck with its assembler, it kept crashing on me whenever I did non-trivial things.
Take a look at DEVICE, MMU, SLOT and PAGE in the sjasmplus docs for an example. ORG, DISP and ENT are also quite useful when assembling for banks that can appear at more than one address. It also comes with a bunch of example programs demonstrating that kind of thing.
https://z00m128.github.io/sjasmplus/documentation.html
For assemblers that aren’t device-aware, you can also do it more manually, by changing ORG multiple times and outputting multiple binary files. Many assemblers will also write tap/tzx/sna/z80 files directly, but to write 128K versions of those automatically also requires device awareness.
No idea about Spin but I never had much luck with its assembler, it kept crashing on me whenever I did non-trivial things.
Robin Verhagen-Guest
SevenFFF / Threetwosevensixseven / colonel32
NXtel • NXTP • ESP Update • ESP Reset • CSpect Plugins
SevenFFF / Threetwosevensixseven / colonel32
NXtel • NXTP • ESP Update • ESP Reset • CSpect Plugins