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

424 Y=0. To read the location, set X=0, Y=255. On exit, X=the contents of location &262 (if reading), or the previous value held (if writing). The contents of the next location (ie &263) are returned in Y. OSBYTE with A =&DA (218) Read/write number of items in VDU queue This call reads (or writes) the number of VDU parameters which are still expected. To read the location containing the value of this parameter (&26A), set X=0, Y=&FF. To write to the location, set X=new value, Y=0. Setting X=0, Y=0 gives a useful way of abandoning a VDU queue, otherwise writing to &26A is not recommended.

On exit, X contains the 2’s complement negative number of bytes still required for the execution of a VDU command. The contents of next location (ie &26B) are returned in Y. OSBYTE call with A=&E0 (224) Cancel VDU queue Many VDU codes expect a sequence of bytes. For example, VDU19 should be followed by five bytes. This call signals the VDU software to throw away the bytes that it has received so far. On entry X and Y must contain zero. The next group of OSBYTE calls (&E1 to &E8) can be used to read or write status information.

The calls read the current value of the status being investigated, AND the value with the contents of Y, EOR the result with the contents of X and then write the value back. If V represents the particular status in the computer then V becomes (V AND Y) EOR X. This sequence enables V to be read or be written to and enables any single bit, or group of bits of V, to be set, cleared or inverted. If, on entry, X=&00 and Y=&FF the net effect will be to read the value of V into X without altering V. On the other hand if Y=&00 then the contents of X will be written into V. To set a single bit of V without altering other bits set all the bits of Y to 1 except the specified bit.

Clear all the bits of X to 0 except the specified bit. For example, to set bit 0 of V to 1 use Y=&FE and X=&01. To clear a single bit in V set all the bits of Y to 1 except the specified bit and set X=0. For example, to clear bit 0 of V use Y=&FE and X=&00. Of course, many bits may be set, cleared, inverted or examined at the same time. OSBYTE call with A=&E1 (225) Set base number for function key codes Normally the red function keys can be programmed to produce strings of characters by, for example, the statement *KEY 0 PRINT