8-Bit Software

The BBC and Master Computer Public Domain Library

Back to 8BS Or Back to Disassembly

Page Last Altered:


Submitted by Steve Fewell


Call the Evaluate value routine (&AD36) which will evaluate the next value at BASIC text
pointer B location, or the expression at that location if the value begins with an open bracket ("(").
If the obtained value is not a String (A is not 0), then the value is already numeric, so generate a
type mismatch error.

Otherwise, continue to the ASCNUM (ASCII String to Binary numeric Value conversion) routine (&AB4E).
This routine will return a the Binary equivalent of the ASCII value in either the IWA (if Integer) or FWA (if float)
storage locations.

Disassembly for the VAL routine

AB46 L 076 146 144 4C 92 90 JMP &9092 Type mismatch error
AB49 6 032 054 173 20 36 AD JSR &AD36 Evaluate Value
AB4C   208 248 D0 F8 BNE -8 --> &AB46
AB4E 6 166 054 A6 36 ...ASCNUM (ASCII to numeric) routine


 Back to 8BS