C64 ROM | Routines |
Prev: A96B | Up: Map | Next: AA1D |
A9A5 | 20 8B B0 | JSR $B08B | get variable address | |
A9A8 | 85 49 | STA $49 | save variable address low byte | |
A9AA | 84 4A | STY $4A | save variable address high byte | |
A9AC | A9 B2 | LDA #$B2 | $B2 is "=" token | |
A9AE | 20 FF AE | JSR $AEFF | scan for CHR$(A), else do syntax error then warm start | |
A9B1 | A5 0E | LDA $0E | get data type flag, $80 = integer, $00 = float | |
A9B3 | 48 | PHA | push data type flag | |
A9B4 | A5 0D | LDA $0D | get data type flag, $FF = string, $00 = numeric | |
A9B6 | 48 | PHA | push data type flag | |
A9B7 | 20 9E AD | JSR $AD9E | evaluate expression | |
A9BA | 68 | PLA | pop data type flag | |
A9BB | 2A | ROL A | string bit into carry | |
A9BC | 20 90 AD | JSR $AD90 | do type match check | |
A9BF | D0 18 | BNE $A9D9 | branch if string | |
A9C1 | 68 | PLA | pop integer/float data type flag | |
This entry point is used by the routine at AC0F.
assign value to numeric variable
|
||||
A9C2 | 10 12 | BPL $A9D6 | branch if float expression is numeric integer | |
A9C4 | 20 1B BC | JSR $BC1B | round FAC1 | |
A9C7 | 20 BF B1 | JSR $B1BF | evaluate integer expression, no sign check | |
A9CA | A0 00 | LDY #$00 | clear index | |
A9CC | A5 64 | LDA $64 | get FAC1 mantissa 3 | |
A9CE | 91 49 | STA ($49),Y | save as integer variable low byte | |
A9D0 | C8 | INY | increment index | |
A9D1 | A5 65 | LDA $65 | get FAC1 mantissa 4 | |
A9D3 | 91 49 | STA ($49),Y | save as integer variable high byte | |
A9D5 | 60 | RTS | ||
A9D6 | 4C D0 BB | JMP $BBD0 | pack FAC1 into variable pointer and return | |
assign value to numeric variable
|
||||
A9D9 | 68 | PLA | dump integer/float data type flag | |
This entry point is used by the routine at AC0F.
|
||||
A9DA | A4 4A | LDY $4A | get variable pointer high byte | |
A9DC | C0 BF | CPY #$BF | was it TI$ pointer | |
A9DE | D0 4C | BNE $AA2C | branch if not | |
else it's TI$ = <expr$>
|
||||
A9E0 | 20 A6 B6 | JSR $B6A6 | pop string off descriptor stack, or from top of string; space returns with A = length, X = pointer low byte, Y = pointer high byte | |
A9E3 | C9 06 | CMP #$06 | compare length with 6 | |
A9E5 | D0 3D | BNE $AA24 | if length not 6 do illegal quantity error then warm start | |
A9E7 | A0 00 | LDY #$00 | clear index | |
A9E9 | 84 61 | STY $61 | clear FAC1 exponent | |
A9EB | 84 66 | STY $66 | clear FAC1 sign (b7) | |
A9ED | 84 71 | STY $71 | save index | |
A9EF | 20 1D AA | JSR $AA1D | check and evaluate numeric digit | |
A9F2 | 20 E2 BA | JSR $BAE2 | multiply FAC1 by 10 | |
A9F5 | E6 71 | INC $71 | increment index | |
A9F7 | A4 71 | LDY $71 | restore index | |
A9F9 | 20 1D AA | JSR $AA1D | check and evaluate numeric digit | |
A9FC | 20 0C BC | JSR $BC0C | round and copy FAC1 to FAC2 | |
A9FF | AA | TAX | copy FAC1 exponent | |
AA00 | F0 05 | BEQ $AA07 | branch if FAC1 zero | |
AA02 | E8 | INX | increment index, * 2 | |
AA03 | 8A | TXA | copy back to A | |
AA04 | 20 ED BA | JSR $BAED | FAC1 = (FAC1 + (FAC2 * 2)) * 2 = FAC1 * 6 | |
AA07 | A4 71 | LDY $71 | get index | |
AA09 | C8 | INY | increment index | |
AA0A | C0 06 | CPY #$06 | compare index with 6 | |
AA0C | D0 DF | BNE $A9ED | loop if not 6 | |
AA0E | 20 E2 BA | JSR $BAE2 | multiply FAC1 by 10 | |
AA11 | 20 9B BC | JSR $BC9B | convert FAC1 floating to fixed | |
AA14 | A6 64 | LDX $64 | get FAC1 mantissa 3 | |
AA16 | A4 63 | LDY $63 | get FAC1 mantissa 2 | |
AA18 | A5 65 | LDA $65 | get FAC1 mantissa 4 | |
AA1A | 4C DB FF | JMP $FFDB | set real time clock and return |
Prev: A96B | Up: Map | Next: AA1D |