×   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

AE69 GET$

Submitted by Steve Fewell

Description:

Call OSRDCH operating system routine to wait for a key to be pressed on the keyboard
(if the keyboard buffer is empty) and return in A the next character read from the
Keyboard buffer.
Store the ASCII code for the Key pressed in the SWA (first position, &0600) and
set the SWA length (&36 to 1).
Exit with A=0 (as the result is a String).


Disassembly for the GET$ routine

AE69   032 224 255 20 E0 FF JSR &FFE0 OSRDCH
AE6C   141 000 006 8D 00 06 STA &0600
AE6F   169 001 A9 01 LDA#&01
AE71   128 028 80 1C BRA 28 --> &AE8F Set SWA length (&36) to A & exit with A = 0 (result is a String value)

Disassembly for the Set SWA length to A and exit with A = 0 routine

AE8F 6 133 054 85 36 STA &36
AE91   169 000 A9 00 LDA#&00
AE93 ` 096 60 RTS

 


 Back to 8BS
Or