Elektrine lite

← Feed

@Retrograde@oldbytes.space

Post #2564125

2026-04-25 13:34 UTC

@bjonte@oldbytes.space I understand it gives good flexibility to jump in and out of 8/16 bits modes as needed, while maintaining tight code density. But it *is* pretty annoying, also when writing code. Either you need to defensively set modes in code, or carefully document (and adhere to) assumptions for each routine. And constantly having to give the assembler cues as well, as it cannot be trusted (nor expected, really) to keep track of what's going on. And while the states can be pushed and popped at runtime in the CPU, ca65, which I use, can only set the states to explicit values. Other assemblers may be better in this respect...

Replies (1)

  • @bjonte@oldbytes.space 2026-04-25 13:38

    @Retrograde@oldbytes.space I agree. The assembler would have to know the concept of a subroutine and store metadata about each subroutine's bit mode so each call can inject mode switches or warn about inconsistencies.

    Open ##2564126