Subject: Re: Saving Applesoft BASIC files as ASCII Path: lobby!newstf02.news.aol.com!portc02.blue.aol.com!howland.erols.net!sunqbc.risq.qc.ca!news.uow.edu.au!david From: david@uow.edu.au (David Wilson) Newsgroups: comp.sys.apple2.programmer Date: 19 Nov 99 06:23:05 GMT Organization: University of Wollongong, Australia Lines: 44 Message-ID: References: <1e18i1a.1hwn79r1asgibkN%dempson@actrix.gen.nz> <00qX3.10503$nY2.478177@typhoon1.austin.rr.com> NNTP-Posting-Host: wraith.cs.uow.edu.au X-Trace: wyrm.its.uow.edu.au 942993185 10258 130.130.64.1 (19 Nov 1999 06:33:05 GMT) X-Complaints-To: usenet@wyrm.its.uow.edu.au NNTP-Posting-Date: 19 Nov 1999 06:33:05 GMT X-Newsreader: NN version 6.5.0 #15 (NOV) jonINTERNETrelayCHAT@napaVALLEYnet.CLARInet (Jon Bettencourt) writes: >Does it list the tokens above $EA? If not, I have the remaining ones. >$EB NEXT WITHOUT FOR >$EC SYNTAX >$ED RETURN WITHOUT GOSUB >$EE OUT OF DATA >$EF ILLEGAL QUANTITY >$F0 OVERFLOW >$F1 OUT OF MEMORY >$F2 UNDEF'D STATEMENT >$F3 BAD SUBSCRIPT >$F4 REDIM'D ARRAY >$F5 DIVISION BY ZERO >$F6 ILLEGAL DIRECT >$F7 TYPE MISMATCH >$F8 STRING TOO LONG >$F9 FORMULA TOO COMPLEX >$FA CAN'T CONTINUE >$FB UNDEF'D FUNCTION >$FC ERROR >$FD IN >$FE BREAK >$FF h >Even though these are not legal BASIC commands, the tokens themselves do >exist. If you enter the system monitor and replace some of the tokens in >your BASIC program with these, they will appear in the listing. I'm >guessing these tokens exist just to reduce the amount of RAM (or ROM) >required to store error messages in Applesoft itself. I have no idea what >the last one is used for. They are not tokens as such. The error messages table just happens to follow on from the token table and the LIST command does not do bounds checking of the tokens it tries to expand. The tokens are stored in ROM starting at $D0D0 in Low ASCII with the last character stored in High ASCII. At $D25F you will find a 00 byte to indicate the end of the token table when parsing the input lines. When you put $EB in your code LIST displayed all the low ASCII characters starting at $D25F until the end of the error message which is also terminated by a High ASCII character. The null byte at $D25F was invisible when displayed by LIST. -- David Wilson School of IT & CS, Uni of Wollongong, Australia