C64 ROM | Routines |
Prev: A71A | Up: Map | Next: A7AE |
|
||||
A742 | A9 80 | LDA #$80 | set FNX | |
A744 | 85 10 | STA $10 | set subscript/FNX flag | |
A746 | 20 A5 A9 | JSR $A9A5 | perform LET | |
A749 | 20 8A A3 | JSR $A38A | search the stack for FOR or GOSUB activity | |
A74C | D0 05 | BNE $A753 | branch if FOR, this variable, not found | |
FOR, this variable, was found so first we dump the old one
|
||||
A74E | 8A | TXA | copy index | |
A74F | 69 0F | ADC #$0F | add FOR structure size-2 | |
A751 | AA | TAX | copy to index | |
A752 | 9A | TXS | set stack (dump FOR structure (-2 bytes)) | |
A753 | 68 | PLA | pull return address | |
A754 | 68 | PLA | pull return address | |
A755 | A9 09 | LDA #$09 | we need 18d bytes ! | |
A757 | 20 FB A3 | JSR $A3FB | check room on stack for 2*A bytes | |
A75A | 20 06 A9 | JSR $A906 | scan for next BASIC statement ([:] or [EOL]) | |
A75D | 18 | CLC | clear carry for add | |
A75E | 98 | TYA | copy index to A | |
A75F | 65 7A | ADC $7A | add BASIC execute pointer low byte | |
A761 | 48 | PHA | push onto stack | |
A762 | A5 7B | LDA $7B | get BASIC execute pointer high byte | |
A764 | 69 00 | ADC #$00 | add carry | |
A766 | 48 | PHA | push onto stack | |
A767 | A5 3A | LDA $3A | get current line number high byte | |
A769 | 48 | PHA | push onto stack | |
A76A | A5 39 | LDA $39 | get current line number low byte | |
A76C | 48 | PHA | push onto stack | |
A76D | A9 A4 | LDA #$A4 | set "TO" token | |
A76F | 20 FF AE | JSR $AEFF | scan for CHR$(A), else do syntax error then warm start | |
A772 | 20 8D AD | JSR $AD8D | check if source is numeric, else do type mismatch | |
A775 | 20 8A AD | JSR $AD8A | evaluate expression and check is numeric, else do type mismatch | |
A778 | A5 66 | LDA $66 | get FAC1 sign (b7) | |
A77A | 09 7F | ORA #$7F | set all non sign bits | |
A77C | 25 62 | AND $62 | and FAC1 mantissa 1 | |
A77E | 85 62 | STA $62 | save FAC1 mantissa 1 | |
A780 | A9 8B | LDA #$8B | set return address low byte | |
A782 | A0 A7 | LDY #$A7 | set return address high byte | |
A784 | 85 22 | STA $22 | save return address low byte | |
A786 | 84 23 | STY $23 | save return address high byte | |
A788 | 4C 43 AE | JMP $AE43 | round FAC1 and put on stack, returns to next instruction | |
A78B | A9 BC | LDA #$BC | set 1 pointer low address, default step size | |
A78D | A0 B9 | LDY #$B9 | set 1 pointer high address | |
A78F | 20 A2 BB | JSR $BBA2 | unpack memory (AY) into FAC1 | |
A792 | 20 79 00 | JSR $0079 | scan memory | |
A795 | C9 A9 | CMP #$A9 | compare with STEP token | |
A797 | D0 06 | BNE $A79F | if not "STEP" continue | |
was step so ....
|
||||
A799 | 20 73 00 | JSR $0073 | increment and scan memory | |
A79C | 20 8A AD | JSR $AD8A | evaluate expression and check is numeric, else do type mismatch | |
A79F | 20 2B BC | JSR $BC2B | get FAC1 sign, return A = $FF -ve, A = $01 +ve | |
A7A2 | 20 38 AE | JSR $AE38 | push sign, round FAC1 and put on stack | |
A7A5 | A5 4A | LDA $4A | get FOR/NEXT variable pointer high byte | |
A7A7 | 48 | PHA | push on stack | |
A7A8 | A5 49 | LDA $49 | get FOR/NEXT variable pointer low byte | |
A7AA | 48 | PHA | push on stack | |
A7AB | A9 81 | LDA #$81 | get FOR token | |
A7AD | 48 | PHA | push on stack |
Prev: A71A | Up: Map | Next: A7AE |