8-Bit Software

The BBC and Master Computer Public Domain Library

Back to 8BS Or Back to Disassembly


Page Last Altered:

925B (PRINT) SPC

Submitted by Steve Fewell

Description:

Call &96B4 to get the Integer value after the SPC keyword.
If &2A is zero (number of spaces to output is zero) then Clear carry, Set &0A (PTR A Offset) to &1B
(PTR B Offset) and exit (back to the PRINT routine).
Load X with &2A (number of spaces to output) and call routine &BDBF to output X number of spaces.
Clear carry, Set &0A (PTR A Offset) to &1B (PTR B Offset) and exit (back to the PRINT routine).


Disassembly for the (PRINT) SPC routine

925B   032 180 150 20 B4 96 JSR &96B4 Get Integer value at PTR B (error if String)
925E * 166 042 A6 2A LDX &2A
9260   240 008 F0 08 BEQ 8 --> &926A Clear carry, set PTR A offset = PTR B offset and exit
9262   032 191 189 20 BF BD JSR &BDBF Output X number of Spaces
9265   128 003 80 03 BRA 3 --> &926A Clear carry, set PTR A = PTR B and exit

 


 Back to 8BS
Or