OPT assembler directive

Richard Russell
Posts: 668
Joined: Tue 18 Jun 2024, 09:32

OPT assembler directive

Post by Richard Russell »

It has come to my attention that I should have implemented bit 3 of OPT (OPT 8-15) in BBC BASIC (Z80) v5.00, but completely forgot about it. Sorry. :oops:

If you set OPT to a value in the range 8 to 15, and set L% expecting it to be tested for the code overflowing the space available, the assembler will work correctly except that no limit check will actually take place.

I don't want to add it now, because v5.00 just fits in 16 Kbytes, and that addition would take it over the top.
jgharston
Posts: 51
Joined: Thu 05 Apr 2018, 14:08

Re: OPT assembler directive

Post by jgharston »

Richard Russell wrote: Wed 22 Apr 2026, 21:06 It has come to my attention that I should have implemented bit 3 of OPT (OPT 8-15) in BBC BASIC (Z80) v5.00, but completely forgot about it. Sorry. :oops:

If you set OPT to a value in the range 8 to 15, and set L% expecting it to be tested for the code overflowing the space available, the assembler will work correctly except that no limit check will actually take place.

I don't want to add it now, because v5.00 just fits in 16 Kbytes, and that addition would take it over the top.
I think that's reasonable. In general the L% extension tends to be found in 16-bit and later versions of BBC BASIC. hmm. note to self, check 32016 BASIC :)

Similarly, I managed to squeeze the MOS module for Z80BASIC V for the Z80Tube using BBC file I/O also to *just* manage to squeeze down to avoid running the size over a page boundary.