BAS128 Memory Problems


In the end, 3 bodges were needed for BAS128. I put in a method to detect if BAS128 was running. This isn't infallible, but tests if the operating system is 8 bit (ie. less than version 6, which means RISC OS), tests if the tube is off, as BAS128 won't work in the second processor, and tests if PAGE is above &FFFF, and if all conditions are met, decides it's probably BAS128.

The first bodge then is to move the whole program above TOP, if PAGE is less than &11000, and then move it back down to &11000, which is the location I found earlier is needed to make it run correctly, for unknown reasons.

The second bodge is that my OS version code is a bit of 6502 assembler which is run when OSWRCH is intercepted. It suppresses screen output and writes it to a memory block instead. This involves altering the OSWRCH vector to point to the assembled code. However, vectors on the BBC are only two byte numbers, and of course all the memory available to BAS128 is a 3 byte number because it starts at &10000. So if BAS128 is detected, I had to change the location of my code to an area in normal memory, and I found &900 seemed to work.



Click here to return to BAS128 Memory Problems