Prev: AE83 Up: Map Next: AF14
AE86: get arithmetic element
the get arithmetic element vector is initialised to point here
AE86 A9 00 LDA #$00 clear byte
AE88 85 0D STA $0D clear data type flag, $FF = string, $00 = numeric
AE8A 20 73 00 JSR $0073 increment and scan memory
AE8D B0 03 BCS $AE92 branch if not numeric character
else numeric string found (e.g. 123)
AE8F 4C F3 BC JMP $BCF3 get FAC1 from string and return
wasn't a number so ...
AE92 20 13 B1 JSR $B113 check byte, return Cb = 0 if<"A" or >"Z"
AE95 90 03 BCC $AE9A branch if not variable name
AE97 4C 28 AF JMP $AF28 variable name set-up and return
AE9A C9 FF CMP #$FF compare with token for PI
AE9C D0 0F BNE $AEAD branch if not PI
AE9E A9 A8 LDA #$A8 get PI pointer low byte
AEA0 A0 AE LDY #$AE get PI pointer high byte
AEA2 20 A2 BB JSR $BBA2 unpack memory (AY) into FAC1
AEA5 4C 73 00 JMP $0073 increment and scan memory and return
AEA8 .BYTE $82,$49,$0F,$DA,$A1 3.141592653 (PI as floating number)
wasn't variable name so ...
AEAD C9 2E CMP #"." compare with "."
AEAF F0 DE BEQ $AE8F if so get FAC1 from string and return, e.g. was .123
wasn't .123 so ...
AEB1 C9 AB CMP #$AB compare with token for -
AEB3 F0 58 BEQ $AF0D branch if - token, do set-up for functions
wasn't -123 so ...
AEB5 C9 AA CMP #$AA compare with token for +
AEB7 F0 D1 BEQ $AE8A branch if + token, +1 = 1 so ignore leading +
it wasn't any sort of number so ...
AEB9 C9 22 CMP #$22 compare with "
AEBB D0 0F BNE $AECC branch if not open quote
This entry point is used by the routine at ABBF.
was open quote so get the enclosed string
print "..." string to string utility area
AEBD A5 7A LDA $7A get BASIC execute pointer low byte
AEBF A4 7B LDY $7B get BASIC execute pointer high byte
AEC1 69 00 ADC #$00 add carry to low byte
AEC3 90 01 BCC $AEC6 branch if no overflow
AEC5 C8 INY increment high byte
AEC6 20 87 B4 JSR $B487 print " terminated string to utility pointer
AEC9 4C E2 B7 JMP $B7E2 restore BASIC execute pointer from temp and return
wasn't a string so ...
AECC C9 A8 CMP #$A8 compare with token for NOT
AECE D0 13 BNE $AEE3 branch if not token for NOT
was NOT token
AED0 A0 18 LDY #$18 offset to NOT function
AED2 D0 3B BNE $AF0F do set-up for function then execute, branch always
do = compare
AED4 20 BF B1 JSR $B1BF evaluate integer expression, no sign check
AED7 A5 65 LDA $65 get FAC1 mantissa 4
AED9 49 FF EOR #$FF invert it
AEDB A8 TAY copy it
AEDC A5 64 LDA $64 get FAC1 mantissa 3
AEDE 49 FF EOR #$FF invert it
AEE0 4C 91 B3 JMP $B391 convert fixed integer AY to float FAC1 and return
wasn't a string or NOT so ...
AEE3 C9 A5 CMP #$A5 compare with token for FN
AEE5 D0 03 BNE $AEEA branch if not token for FN
AEE7 4C F4 B3 JMP $B3F4 else go evaluate FNx
wasn't a string, NOT or FN so ...
AEEA C9 B4 CMP #$B4 compare with token for SGN
AEEC 90 03 BCC $AEF1 if less than SGN token evaluate expression in parentheses
else was a function token
AEEE 4C A7 AF JMP $AFA7 go set up function references, branch always
This entry point is used by the routines at AFA7 and B3F4.
if here it can only be something in brackets so .... evaluate expression within parentheses
AEF1 20 FA AE JSR $AEFA scan for "(", else do syntax error then warm start
AEF4 20 9E AD JSR $AD9E evaluate expression
This entry point is used by the routines at B1D1, B3B3 and B761.
all the 'scan for' routines return the character after the sought character
scan for ")", else do syntax error then warm start
AEF7 A9 29 LDA #")" load A with ")"
AEF9 .BYTE $2C makes next line BIT $28A9
This entry point is used by the routines at AFA7 and B3B3.
scan for "(", else do syntax error then warm start
AEFA A9 28 LDA #"(" load A with "("
AEFC .BYTE $2C makes next line BIT $2CA9
This entry point is used by the routines at AC0F, AFA7, B07E, B737, B7EB and E20E.
scan for ",", else do syntax error then warm start
AEFD A9 2C LDA #"," load A with ","
This entry point is used by the routines at A742, A7AE, A928, A9A5, AA86, AB7B, ABA5, ABBF, B3B3 and B3E1.
scan for CHR$(A), else do syntax error then warm start
AEFF A0 00 LDY #$00 clear index
AF01 D1 7A CMP ($7A),Y compare with BASIC byte
AF03 D0 03 BNE $AF08 if not expected byte do syntax error then warm start
AF05 4C 73 00 JMP $0073 else increment and scan memory and return
This entry point is used by the routines at A7AE, A8E8, AB4D, AE30, B08B, B3F4 and E211.
syntax error then warm start
AF08 A2 0B LDX #$0B error code $0B, syntax error
AF0A 4C 37 A4 JMP $A437 do error #X then warm start
AF0D A0 15 LDY #$15 set offset from base to > operator
AF0F 68 PLA dump return address low byte
AF10 68 PLA dump return address high byte
AF11 4C FA AD JMP $ADFA execute function then continue evaluation
Prev: AE83 Up: Map Next: AF14