×   Main Menu ALL The 8BS News Manuals (New menu) Links Worth a Look Tools Disc and Basic Webring Site Map 8BS Guestbook Old Guest Book Me The Barnsley Rovers   
8-Bit Software

The BBC and Master Computer Public Domain Library

AAD7 BGET

Submitted by Steve Fewell

Description:

Call routine &BA4A to Check that the next character at BASIC Text Pointer B is '#' (issue 'Missing #' error if not),
set Y to the LSB of the number after the '#' (the file channel number).

Call the Operating system OSBGET routine (&FFD7) to carry out the read next byte from the file open at channel number
'Y' operation.
Jump to routine &AE18 to set the IWA to the 8-bit value in A (i.e. the byte that was read from the file).


Disassembly for the BGET routine

AAD7 J 032 074 186 20 4A BA JSR &BA4A Check for '#' (PTR B), Set Y to file channel number (PTR B)
AADA   032 215 255 20 D7 FF JSR &FFD7   OSBGET
AADD   128 227 80 E3 BRA -29 --> &AAC2 [JMP &AE18 Set IWA to the 8-bit value in A]

 


 Back to 8BS
Or