At 018fd in the listing, where RST 10 is being used prep VS 7 before the system prints error messages, is the following code.
Code: Select all
SYNT11: PUSH AF
SYNTAX: RST SCRRST
DB 6fH,13,10
SYNT1: LD HL,ERR0
POP AF
The RST 10 byte string decodes as:
6FH – select VS 7, with CLS and continue
13 - ASCII code for carriage return
10 - ASCII code for line feed
But there’s no continuation bit on the Carriage return, so RST10 processing would stop.
If it does, then the 10 byte gets processed, and is the instruction LD A,(BC),
With the code as it is doesn’t affect anything
a) VS 7 is only 1 line, and it’s been cleared so the LF isn’t needed
b) A gets restored 2 lines later,
What's interesting is, the dis-assembler didn’t find any references to the addresses for “SYNTAX” or “SYNT1” when it was building the list of branches and jumps.
So I’m wondering if the push/pop AF isn’t needed either, and was just added to “fix” the corrupted A register.
Comments, speculation and raspberries tot he usual address.....