8-Bit Software

The BBC and Master Computer Public Domain Library

Back to 8BS Or Back to Disassembly

Page Last Altered:

97E7 CLS

Submitted by Steve Fewell

Name: CLS (Clear Screen)
Starting Address: &A541
Entry criteria: &A, &B and &C point to input line.


Call routine &9BA6 to check that the BASIC Statement is terminated corectly.
Zero &1E [COUNT], as after a CLS, no characters will have been printed on line.
Perform the CLS (VDU 12) operation.
Jump to &9005 to continue executing the next statement.

Disassembly for the CLS routine

97E7   032 166 155 20 A6 9B JSR &9BA6 Check end of Statement
97EA d 100 030 64 1E STZ &1E
97EC   169 012 A9 0C LDA#&0C
97EE   032 238 255 20 EE FF JSR &FFEE   OSWRCH
97F1 L 076 005 144 4C 05 90 JMP &9005 Execute the next BASIC program/command line statement


 Back to 8BS