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

406 The character definitions may also be partially exploded by using a parameter between 0 and 6. For example, *FX20,1 will allow character codes &80 to &BF to be redefined. Each increment in the parameter allocates another page (256 bytes) of memory above OSHWM to the soft character definitions. *FX20,4 will allow redefinition of character codes &80 to &FF and &20 to &3F. The following command sequence should serve to make the situation clearer.

(Press RETURN after each line.) VDU23, &E2,1,3,7,15,31,63,127,255 *FX20,3 VDU23,&E2,255,127,63,31,15,7,3,1 VDU&E2 *FX20,0 VDU&E2 Although the fourth and sixth lines invoke the same character code, a different character is displayed each time due to the effect of the *FX20 commands. (Note that *FX20 could be typed in instead of *FX20,0 .) If this is done, and the programmer redefines characters in the range &20 to &3F, he or she must leave memory up to OSHWM + &3FF clear of his or her program. This is done by first finding the value of OSHWM (for the particular configuration in use) by using OSBYTE call 131 and then setting PAGE to a value &400 above this value.

Of course, if the programmer only wishes to redefine ASCII codes in the range &80 to &9F (128 to 159) then he or she need not alter PAGE . Codes in the range &80 to &9F are of particular importance since the programmer can generate them directly from the keyboard by holding down SHIFT at the same time as pressing one of the user definable function keys. See later in this chapter for more information on Operating System High Water Mark. *FX21 allows any internal buffer to be cleared (or flushed). *FX21,0 flushes the keyboard buffer. *FX21,1 flushes the RS423 serial input buffer. *FX21,2 flushes the RS423 serial output buffer. *FX21,3 flushes the printer output buffer.

*FX21,4 flushes the sound channel number 0 (noise). *FX21,5 flushes the sound channel number 1. *FX21,6 flushes the sound channel number 2.