8-Bit Software

The BBC and Master Computer Public Domain Library


BASIC IV ROM Routines
Page Last Altered:


Next Char PTRB

Submitted by Steve Fewell

Routine: NextCharPTRB
Name: Next Char PTRB
Starting Address: &8ED5
Exit:  Move past spaces in BASIC's Text Pointer B and return the next Character in the string.

Description:
Reads past any space characters found at the current position in the PTRB. Returns with the next non-space Character from PTRB in A, and with the PTRB Offset pointing to this value.

Disassembly for the Next Char PTRB routine

8ED5   164 027 A4 1B LDY &1B
8ED7   230 027 E6 1B INC &1B
8ED9   177 025 B1 19 LDA (&19),Y
8EDB   201 032 C9 20 CMP#&20
8EDD   240 246 F0 F6 BEQ -10 --> &8ED5
8EDF ` 096 60 RTS

 


 Back to 8BS
Or