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

Re: running .system files from BASIC



dalloff@gcfn.org (Dave Althoff Jr) writes:
>: > nnn IF B = A THEN 40
>: > 
>: > ...will result in a ?SYNTAX ERROR while...
>: > 
>: > nno IF A = B THEN 40 
>: > 
>: > ...will work fine.  Reading the listing reveals all:
>: > 
>: > LIST nnn-nno
>: > nnn IF B = AT HEN 40
>: > nno IF A = B THEN 40

That is becuase the parser takes the longest token it can at any point.

>Well, I don't remember it, but since I have this Applesoft manual handy,
>here's a partial list of reserved words...

>These include an "=":

>COLOR=
>HCOLOR=
>ROT=
>SCALE=
>SPEED=


>These include other symbols:
>CHR$
>HIMEM:
>HGR2
>IN#
>LEFT$
>LOMEM:
>MID$
>PR#
>RIGHT$
>SCRN(
>SPC(
>STR$
>TAB(

>Two others that I think might be incorrectly printed...the book shows USR
>and PDL; I thought sure those would be USR( and PDL(, respectively. 
>Again, I'd have to fire up Applesoft to know for certain, and my Apples
>are all at home...

Here is the relevant section of the ROM:

d0    45 4e c4 46 4f d2 4e 45 58 d4 44 41 54 c1 49 4e     ENDFORNEXTDATAIN
e0    50 55 d4 44 45 cc 44 49 cd 52 45 41 c4 47 d2 54     PUTDELDIMREADGRT
f0    45 58 d4 50 52 a3 49 4e a3 43 41 4c cc 50 4c 4f     EXTPR#IN#CALLPLO
00    d4 48 4c 49 ce 56 4c 49 ce 48 47 52 b2 48 47 d2     THLINVLINHGR2HGR
10    48 43 4f 4c 4f 52 bd 48 50 4c 4f d4 44 52 41 d7     HCOLOR=HPLOTDRAW
20    58 44 52 41 d7 48 54 41 c2 48 4f 4d c5 52 4f 54     XDRAWHTABHOMEROT
30    bd 53 43 41 4c 45 bd 53 48 4c 4f 41 c4 54 52 41     =SCALE=SHLOADTRA
40    43 c5 4e 4f 54 52 41 43 c5 4e 4f 52 4d 41 cc 49     CENOTRACENORMALI
50    4e 56 45 52 53 c5 46 4c 41 53 c8 43 4f 4c 4f 52     NVERSEFLASHCOLOR
60    bd 50 4f d0 56 54 41 c2 48 49 4d 45 4d ba 4c 4f     =POPVTABHIMEM:LO
70    4d 45 4d ba 4f 4e 45 52 d2 52 45 53 55 4d c5 52     MEM:ONERRRESUMER
80    45 43 41 4c cc 53 54 4f 52 c5 53 50 45 45 44 bd     ECALLSTORESPEED=
90    4c 45 d4 47 4f 54 cf 52 55 ce 49 c6 52 45 53 54     LETGOTORUNIFREST
a0    4f 52 c5 a6 47 4f 53 55 c2 52 45 54 55 52 ce 52     ORE&GOSUBRETURNR
b0    45 cd 53 54 4f d0 4f ce 57 41 49 d4 4c 4f 41 c4     EMSTOPONWAITLOAD
c0    53 41 56 c5 44 45 c6 50 4f 4b c5 50 52 49 4e d4     SAVEDEFPOKEPRINT
d0    43 4f 4e d4 4c 49 53 d4 43 4c 45 41 d2 47 45 d4     CONTLISTCLEARGET
e0    4e 45 d7 54 41 42 a8 54 cf 46 ce 53 50 43 a8 54     NEWTAB(TOFNSPC(T
f0    48 45 ce 41 d4 4e 4f d4 53 54 45 d0 ab ad aa af     HENATNOTSTEP+-*/
00    de 41 4e c4 4f d2 be bd bc 53 47 ce 49 4e d4 41     ^ANDOR>=<SGNINTA
10    42 d3 55 53 d2 46 52 c5 53 43 52 4e a8 50 44 cc     BSUSRFRESCRN(PDL
20    50 4f d3 53 51 d2 52 4e c4 4c 4f c7 45 58 d0 43     POSSQRRNDLOGEXPC
30    4f d3 53 49 ce 54 41 ce 41 54 ce 50 45 45 cb 4c     OSSINTANATNPEEKL
40    45 ce 53 54 52 a4 56 41 cc 41 53 c3 43 48 52 a4     ENSTR$VALASCCHR$
50    4c 45 46 54 a4 52 49 47 48 54 a4 4d 49 44 a4 00     LEFT$RIGHT$MID$.

The only functions that have the ( as part of the token are:

SCRN(, TAB( and SPC(. TAB and SPC are special in that they can only be used
in PRINT statements. Not sure why SCRN includes the (.

What I would like to know is why Apple decided to make HIMEM and LOMEM
end with a colon... had I been doing that code I would have used an = sign
instead just like HCOLOR=, ROT=, SCALE=, COLOR= and SPEED=.

Don't forget the remaining tokens with a special character: + - * / ^ > = < &
-- 
David Wilson  School of IT & CS, Uni of Wollongong, Australia