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

451 OSWORD call with A=1 Read clock This call is used to read the internal elapsed time clock into the five bytes pointed to by X and Y. This clock is the one used by BASIC for its TIME function. The elapsed time clock is reset to zero when the computer is switched on and if a hard reset is executed. Otherwise it is incremented every hundredth of a second. The only thing that will cause it to lose time is pressing the BREAK key and keeping it pressed. On entry X and Y should point to the memory locations where the result is to be stored. Y contains the high byte and X the low byte of the address. On exit X and Y are undefined and the time is given in location XY (LSB) to XY+4 (MSB).

The time is stored in pure binary. OSWORD call with A=2 Write clock This call is used to set the internal elapsed time clock from the five bytes pointed to by XY. On entry X and Y should point to the memory locations where the new time is stored. Y contains the high byte and X the low byte of the address. The least significant byte of the time is stored at the address pointed to by XY and the most significant byte of the time is stored at address XY+4. A total of five bytes are required. OSWORD call with A=3 Read interval timer In addition to the clock there is an interval timer which is incremented every hundredth of a second. The interval is stored in five bytes pointed to by X and Y.

See OSWORD with A=1. OSWORD call with A=4 Write interval timer On entry X and Y point to five locations which contain the new value to which the clock is to be set. The interval timer increments and may cause an event when it reaches zero. Thus setting the timer to &FFFFFFFFFE would cause an event after two hundredths of a second. OSWORD call with A=5 Read I/O processor memory This call enables any program to read a byte in the I/O processor no matter in which processor the program is executing. On entry X and Y point to a block of memory as follows: XY LSB of address to be read XY+1 XY+2 XY+3 MSB of address to be read