8-Bit Software

The BBC and Master Computer Public Domain Library

Back to 8BS Or Back to Disassembly


Page Last Altered:

9634 PAGE=

Submitted by Steve Fewell

Description:

Call routine &96B9 to Set BASIC Text Pointer B to BASIC Text Pointer A value, check that the next non-space character
is an "=", and issue 'Mistake' error if it isn't. Get Result of the expression at BASIC Text Pointer B. Check that the
statement terminates correctly (with a '<cr>', ':' or 'ELSE'), (issue 'Syntax error if not terminated correctly), and convert
the numeric result value to Integer (or issue 'Type mismatch' error if the value is a String).

Set PAGE (&18) to the Integer results MSB byte (&2B) (the LSB byte for page (&2A) is assumed to be '&00'.

Lastly, jump to &9005 to start processing the next program statement.


Disassembly for the PAGE= routine

9634   032 185 150 20 B9 96 JSR &96B9 Ptr B = Ptr A; Check '='; Get result; Check end of statement & convert result to Integer
9637 + 165 043 A5 2B LDA &2B
9639   133 024 85 18 STA &18
963B L 076 005 144 4C 05 90 JMP &9005 Process next program statement

 


 Back to 8BS
Or