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

418 OSBYTE call with A=&8A (138) Insert character into specified buffer This enables characters to be inserted into any buffer. On entry X contains the buffer number and Y contains the character to be inserted. Buffer numbers are as follows:

0 Keyboard buffer 1 RS423 serial input buffer 2 RS423 serial output buffer 3 Printer output buffer 4 Sound channel 0 buffer 5 Sound channel 1 buffer 6 Sound channel 2 buffer 7 Sound channel 3 buffer 8 Speech buffer Therefore to place the letter R (ASCII code 82) into the keyboard input buffer you would use In machine code the X register must contain the buffer number and the Y register the character, eg *FX138,0,82 10 DIM GAP 20 20 OSBYTE = &FFF4 30 P%=GAP 40 [ 50 LDA #138 60 LDX #0 70 LDY #82 80 JSR OSBYTE 90 RTS 100] 110 120 CALL GAP >RUN 1B82 1B82 A9 8A LDA #138 1B84 A2 00 LDX #0 1B86 A0 52 LDY #82 1B88 20 F4 FF JSR OSBYTE 1B8B 60 RTS (see next chapter for more details of machine code and assembly language.)