[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Applesoft Basic Question



dempson@actrix.gen.nz (David Empson) writes:
>David Wilson <david@uow.edu.au> wrote:
>> Another quick quiz. Why do the Applesoft error codes have the strange
>> (in comparison to the regular DOS error codes) values listed?

>Since nobody else has answered yet, perhaps I can.

>In other words, the error number is an index into a large table which
>contains each of the error messages packed end to end.  It reads
>something like this:

>NEXT WITHOUT FORSYNTAXRETURN WITHOUT GOSUBOUT OF DATA (etc.)

>The last character in each message is marked specially (high bit
>opposite state) so the error message printer can locate the end of the
>message.

Correct. My OSI Superboard has a bug in the routine that prints the error
messages. The Microsoft 8KB 6502 BASIC has two character error codes. eg
NF = Next without For, ID = Illegal in Direct mode etc. It too has the last
character with the MSB set. The routine that actually prints the message out
however uses the fixed length rather than the high bit to find the end of the
string and forgets to clear it. Thus every error message comes out as an ASCII
character followed by a graphic symbol from the second half of the character
generator ROM.
--
David Wilson  School of IT & CS, Uni of Wollongong, Australia  david@uow.edu.au