BASIC Assembler Bug Affecting BFI and BFC Commands
Graeme (8815) 103 posts |
A simple bug in BASIC (on Risc OS 5.28 and BASIC V version 1.81). Assembler does not allow the top bit to be used on BFI and BFC commands. Example, BFC R0,#31,#1 should clear the top bit of R0. This instruction works on a Pi 4 when using EQUD to make the instruction and executing it does clear the top bit. I think the two constants are being added together and compared with 32, failing if less than or equal to. It should only fail if less than. SBFX and UBFX seem to work as expected. |
Sprow (202) 1150 posts |
It looks like BASIC’s playing all of the right notes, just not necessarily in the right order. Hopefully this tiny fix will solve it (you could even |
Graeme (8815) 103 posts |
Excellent. I got it to work by swapping those commands around. |