home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 3 / PDCD_3.iso / pocketbk / developmen / oplexamp / TIMETICK.TXT < prev    next >
Text File  |  1994-06-12  |  782b  |  32 lines

  1. ==========
  2. psion/opl #1266, from dw2, 656 chars, Jun 12 00:53 94
  3. Comment to 1265. 
  4. ----------
  5. Try reading the six bytes from $420 in Operating System dataspace:
  6.  
  7. $420 is OsTimeInTicks, which gets decremented once every tick - ie 32 
  8. times a second
  9.  
  10. $422 is OsTimeInSecondsLsw, the Least Significant Word of the Time in 
  11. Seconds (this gets incremented every time OsTimeInTicks reaches 0).
  12.  
  13. $424 is OsTimeInSecondsMsw, the Most Significant Word of the Time in 
  14. Seconds.
  15.  
  16. To read from the O/S dataspace, use GenGetOsData (call($078b)).
  17.  
  18. To get the idea, consider the following program (stop it running with 
  19. Psion-Esc):
  20.  
  21. PROC peektick:
  22.   local t%,sl%,sh%
  23.   while 1
  24.     call($078b,0,6,0,$420,addr(t%))
  25.     print t%,sl%,sh%
  26.   endwh
  27. ENDP
  28.  
  29. Regards, DavidW
  30.  
  31.  
  32.