80-Bus News

  

July–October 1982 · Volume 1 · Issue 3

Page 19 of 51

Shown below is an example of how the subroutine 2000 can be altered to increase the accuracy of the returned value. Here line 2020 obtains four successive readings from the Light Pen. These are averaged in the next line, and then a check is made that all four lie close to the average value. (If you leave out the check and C1-C4 vary widely you may find strange values like Col=129 appearing!). The routine might be improved by including a small delay between the calls to USR0. Only two calls with a reasonable delay between them may be enough....​experiment!

Page 19 of 51