Submitted by Steve Fewell
Description:
Call routine &9D2F to get the result of the expression at the BASIC Text pointer A location. This value should be the
CALL address.
Call routine &96BC to convert the result to an Integer value (if Float, or issue 'Type mismatch' error if it is a
String value).
Push the Integer call address value (IWA) to the BASIC stack.
Store zero in location &0600 (the parameter block used to pass parameters to the machine code routine - &0600
contains the number of variables in the parameter block, which is initalised to 0).
Set Y to 0 (the last used location in the machine code call parameter block).
[&92CC] Store Y on the 6502 stack.
Get the next non-space character from BASIC text pointer B location.
92BE | / | 032 047 157 | 20 2F 9D | JSR &9D2F Ptr B = Ptr A & Get result of expression |
92C1 | 032 188 150 | 20 BC 96 | JSR &96BC Check result type (location &27) - if Float then convert to Integer | |
92C4 | & | 032 038 188 | 20 26 BC | JSR &BC26 Push IWA value to the BASIC Stack [pushi] |
92C7 | 156 000 006 | 9C 00 06 | STZ &0600 | |
92CA | 160 000 | A0 00 | LDY#&00 | |
92CC | Z | 090 | 5A | PHY |
92CD | 032 235 142 | 20 EB 8E | JSR &8EEB Get next non-space char (PTR B) & compare with ',' | |
92D0 | 208 031 | D0 1F | BNE 31 --> &92F1 | |
92D2 | 164 027 | A4 1B | LDY &1B | |
92D4 | 032 001 153 | 20 01 99 | JSR &9901 Store Y to &1B, skip spaces & Evaluate variable/array name & return the address of the value | |
92D7 | ( | 240 040 | F0 28 | BEQ 40 --> &9301 'No such variable' error |
92D9 | z | 122 | 7A | PLY |
92DA | 200 | C8 | INY | |
92DB | * | 165 042 | A5 2A | LDA &2A |
92DD | 153 000 006 | 99 00 06 | STA &0600,Y | |
92E0 | 200 | C8 | INY | |
92E1 | + | 165 043 | A5 2B | LDA &2B |
92E3 | 153 000 006 | 99 00 06 | STA &0600,Y | |
92E6 | 200 | C8 | INY | |
92E7 | , | 165 044 | A5 2C | LDA &2C |
92E9 | 153 000 006 | 99 00 06 | STA &0600,Y | |
92EC | 238 000 006 | EE 00 06 | INC &0600 | |
92EF | 128 219 | 80 DB | BRA -37 --> &92CC | |
92F1 | z | 122 | 7A | PLY |
92F2 | 198 027 | C6 1B | DEC &1B | |
92F4 | 032 150 155 | 20 96 9B | JSR &9B96 Check for end of Statement (PTR B) | |
92F7 | 032 230 188 | 20 E6 BC | JSR &BCE6 Retrieve IWA value from the BASIC Stack [popi] | |
92FA | 032 004 147 | 20 04 93 | JSR &9304 Execute the machine code routine pointed to by the IWA (&2A-&2B) | |
92FD | 216 | D8 | CLD | |
92FE | L | 076 005 144 | 4C 05 90 | JMP &9005 Continue running program (execute next statement) |
9301 | L | 076 140 173 | 4C 8C AD | BNE 12 --> &AD8C No such variable error |
9304 | 173 012 004 | AD 0C 04 | LDA &040C | |
9307 | J | 074 | 4A | LSR A |
9308 | 173 004 004 | AD 04 04 | LDA &0404 | |
930B | ` | 174 096 004 | AE 60 04 | LDX &0460 |
930E | d | 172 100 004 | AC 64 04 | LDY &0464 |
9311 | l* | 108 042 000 | 6C 2A 00 | JMP (&002A) |