8-Bit Software

The BBC and Master Computer Public Domain Library

Back to 8BS Or Back to Disassembly

Page Last Altered:

96AF Get Integer result of expression

Submitted by Steve Fewell


[If called from &96AC, this routine will check for a comma ',' (issuing a "Missing ," error if one is not found), before
continuing with the rest of this routine].

This routine calls the Expression Handler routine (&9D3B)
to obtain the value of the expression on the command line.
If the value is a String, then a Type Mismatch error will be generated.
If this value is a Float then it will be converted to an Integer.
Exit with the Integer value.

Disassembly for the Get Integer result of expression

96AC   032 241 142 20 F1 8E JSR &8EF1 Check for ',' and issue error if not found
96AF ; 032 059 157 20 3B 9D JSR &9D3B Expression Handler
96B2   128 011 80 0B BRA 11 --> &96BF Check if Integer & convert if float or error if String

Disassembly for the Check ',' and issue error if not found routine

8EF1   032 235 142 20 EB 8E JSR &8EEB Get next non-space char (PTR B) & compare with ','
8EF4   240 244 F0 F4 BEQ -12 --> &8EEA [RTS]
8EF6   ... 'Missing ,' error


 Back to 8BS