Enhanced BASIC, errata for 4th May 2002 by Lee Davison
[Back]
Assigning a string in immediate mode doesn't work properly, i.e. doing ..CauseA$="TESTING" ?A$.. gives either ..TSTING.. or ..T STING.. depending on how your console handles null characters (ASCII 0)
When BASIC assigns a value to a string it tests to see if the string is in the program code. If it isn't then the string is copied to string memory (if the string is in program memory no copy is made and the string pointer points to the string embedded in the program code). In this case moving the input buffer out of page zero meant that this test fails to copy a string from the input buffer to string memory. The string can then be overwritten by any following commands.The fix
One small change is needed to fix this, just after LAB_20DC was ..Thanks to Daryl for finding that "feature".LAB_20DC STX Sendh ; save string end high byte LDA ssptr_h ; get string start high byte BNE LAB_RTST ; branch if not in utility area.. this needs to test if the string start is <Ram_base so it becomes ..LAB_20DC STX Sendh ; save string end high byte LDA ssptr_h ; get string start high byte CMP #>Ram_base ; compare with start of program memory BCS LAB_RTST ; branch if not in utility area.. This is done in version 1.03.If you move the input buffer from before the start of program memory be carefull that this test is changed to suit or the problem will recurr.