The jump through this indirect vector is taken in the routine that lists BASIC program lines at the point where two-byte ex- tended statement or function tokens have been found which are greater than the largest standard tokens. When the jump is taken, the accumulator will hold the second byte of the of- fending token and the X register will hold 0/$00 if the first byte was 206/$CE, indicating an extended function token, or 255/$FF if the first byte was 254/$FE, indicating an extended statement token. The status register carry bit will also be set. If that bit is still set upon return from this indirect jump, the character will simply be printed. However, if carry is cleared, the extended keyword will be listed. The vector normally holds 20941/S51CD, the address of the instruction immedi- ately following the indirect jump, so carry will normally re- main set. If you add new extended keywords to BASIC, you should change this vector to point to the routine to support listing the keywords.
784-785 $0310-$0311 IGONE2
Indirect vector in extended statement execution subroutine The jump through this indirect vector is taken in the statement execution routine at the point where a two-byte extended statement token has been found with a value greater than one of the standard extended statement tokens (second byte
greater than 38/$26). When the jump is taken, the accumu- 93
774-775
$0306-$0307
$0310-$0311
784-785The vector normally holds 17165/S430D, the address of the instruction immediately following the indirect jump. You can redirect this vector to a routine of your own if you wish to change the way program lines are tokenized.
774-775 $0306-$0307 IQPLOP
Indirect vector in BASIC detokenization routineThe jump through this indirect vector is taken in the QPLOP routine [$5123] at the point where the accumulator contains the next character to be listed from the program line. The vec- tor normally holds 20817/S5151, the address of the instruc- tion immediately following the indirect jump. You can redirect this vector to a routine of your own if you wish to change the way program lines are listed.
776-777 $0308-$0309 IGONE
Indirect vector in BASIC execution routine
The jump through this indirect vector is taken at the begin- ning of the GONE routine [S4F92], the routine to execute a program line. The vector normally holds 19106/$4AA2, the address of the instruction immediately following the indirect jump. You can redirect this vector to a routine of your own if you wish to change the way program lines are executed.
778-779 $030A-$030B IEVAL
Indirect vector in BASIC evaluation routine
The jump through this indirect vector is taken at the begin- ning of the EVAL routine, which determines the value of the next variable, string, or number in the program. The vector normally holds 30938/$78DA, the address of the instruction immediately following the indirect jump. You can redirect this vector to a routine of your own if you wish to change the way values are evaluated.
780-781 $030C-$030D ICRNCH2
Indirect vector for tokenizing additional keywords
The jump through this vector is taken in the tokenization rou- tine at the point where the first character of the keyword has been read into the accumulator and the carry bit has been set. If carry is still set upon return from this jump, the tokenization process will proceed normally. The vector normally holds 17185/$4321, the address of the instruction immediately fol-
lowing the jump. Thus, the jump normally has no effect. If you want to add extended tokens to BASIC, you should redi- rect this vector to your routine to tokenize the new keywords. The routine should compare the text pointed to by 61-62/ $3D-$3E with the target keyword. If a match is found, your routine should return with the second byte of the two-byte ex- tended token in the accumulator. The X register should be set to indicate whether the keyword is a statement or a function. X should be set to 0/$00 for a function, in which case the first byte will be 206/$CE, or to 255/$FF for a statement, in which case the first byte will be 254/$FE. The Y register should con- tain the length of the filename. Finally, you should make sure that the carry bit is clear upon exit so that your new token will be properly processed.
782-783 $030E-$030F IQPLOP2
Indirect vector for detokenizing additional keywordsThe jump through this indirect vector is taken in the routine that lists BASIC program lines at the point where two-byte ex- tended statement or function tokens have been found which are greater than the largest standard tokens. When the jump is taken, the accumulator will hold the second byte of the of- fending token and the X register will hold 0/$00 if the first byte was 206/$CE, indicating an extended function token, or 255/$FF if the first byte was 254/$FE, indicating an extended statement token. The status register carry bit will also be set. If that bit is still set upon return from this indirect jump, the character will simply be printed. However, if carry is cleared, the extended keyword will be listed. The vector normally holds 20941/S51CD, the address of the instruction immedi- ately following the indirect jump, so carry will normally re- main set. If you add new extended keywords to BASIC, you should change this vector to point to the routine to support listing the keywords.
784-785 $0310-$0311 IGONE2
Indirect vector in extended statement execution subroutine The jump through this indirect vector is taken in the statement execution routine at the point where a two-byte extended statement token has been found with a value greater than one of the standard extended statement tokens (second byte
786-787 $0312-$0313 $031A-$031B 794-795
lator will hold the second byte of the extended token and the carry bit will be set. If the carry bit is not clear upon return, a SYNTAX error will be generated. The vector normally holds 19369/$4BA9, the address of the instruction immediately fol- lowing the indirect jump. Thus, the out-of-range token will normally cause an error. If you add new extended-token state- ments to BASIC, you should change this vector to point to the address of the routine which executes the new statement. See Chapter 5 for an example.
786-787 $0312-$0313 Unused
These two locations are not used for any system vector, and are thus available for your programming. For example, you could use these locations to set up an indirect vector in one of your own programs, or to store the original value when changing one of the other vectors.