Acorn Computers BBC Micro Model B w/8271 — Acorn BBC Micro Model B w/8271 User Guide Manual PDF

415 X on entry Buffer checked 255 Keyboard buffer 254 RS423 serial input buffer 253 RS423 serial output buffer 252 Printer output buffer 251 Sound channel 0 (noise) 250 Sound channel 1 249 Sound channel 2 248 Sound channel 3 247 Speech buffer On exit X contains a number giving, for input buffers, the number of characters in the buffers. For output buffers X contains the number of spaces still free in the buffer. OSBYTE call with A = &81 (129) Read key within time limit The call waits for a character from the current input channel until a time limit expires or it tests a particular key. The BASIC function INKEY uses this call.

The programmer is reminded that this call will immediately obtain characters if the user has ‘typed ahead’. It is therefore often necessary to flush the input buffer with *FX15,1 before using this call. The maximum time delay is passed to the subroutine in X and Y. The delay is measured in hundredths of a second and Y contains the most significant byte and X the least significant byte. The maximum delay is &7FFF hundredths of a second which is about five and a half minutes. On exit, Y=0 if a character was detected within the time limit. In this case X contains the character. Y=&1B indicates that ESCAPE was pressed. This must be acknowledged with *FX126 . Y=&FF indicates a time-out.

If on entry Y contains a negative number then the routine can be used to check for a specific key closure. See the BASIC keyword INKEY for more information. As an OSBYTE call a ‘check for character waiting with zero delay’ takes typically 130 microseconds. OSBYTE call with A=&82 (130) Read machine high order address The BBC Microcomputer uses a 6512 processor (a close relative of the 6502) which requires a 16 bit address. However a number of routines require a 32 bit address – for example most file system addresses are 32 bits wide to ensure compatibility with future products.

A specific high order address – that is the top 16 bits of the total 32 bit address – is allocated to the present BBC Microcomputer. The high order address is returned in X and Y with Y containing the most significant byte and X the least significant byte.