RichTW wrote:
I don't know how ExtBas works (couldn't find any info from a quick Google), but I presume it allows ADRs to be synthesised using more than one ARM instruction.
Reading the documentation for ExtBas, it appears to introduce several new features into the BASIC Assembler that circumvent some of the shortcomings of the BASIC Assembler. It goes a lot further than just fixing my issue but that's out of scope for this conversation.
In this case, according to the documentation ExtBas introduces ADRL, ADRX and ADRW. Where ADRL is fixed at two words, ADRX is fixed at three words and ADRW addresses data relative to a value in R12 and can be one to three words in length.
The new pseudo-operations provide the same conditional features too so they are written as ADR{condition}L etc.
The ADR pseudo-operation remains unaffected and attempting to assemble the source using ADR even when ExtBas successfully patches BASIC fails with the same error.
For my particular use, tweaking the code to use ADRL throughout was sufficient to allow it to assemble without error and up to now during testing of the module, it appears to be working as expected and outputting strings correctly.
I'll continue to test for a few days and keep an eye out for any odd behaviour before I unleash the module on others...
Just for completeness, my problem in getting ExtBas to work in the first place was due to the fact that on installing ExtBas, it attempts the equivalent of *RMFaster BASIC to move BASIC into RAM so it can be patched. Obviously, this can only happen if BASIC isn't in use at the time and it seems when I attempted to load the module initially, BASIC was already in use.
Paul