Page 1 of 1

Frames timer

Posted: Sun Jul 13, 2014 12:25 pm
by 1024MAK
I was doing some research about timers/time information on the QL and came across this topic Floating Point Numbers.

Well, although it does not appear to be documented (a list of the system variables shows this as SV_RAND pseudo random number, offset 2E), I have found what appears to be a frames counter (by which I mean, it counts video frames at 50Hz / 20mS). The system I tried this on is a standard QL with a JS ROM.

Now I have not tested this on any other QL systems and this frames clock may be affected by other operations or hardware. This may affect it's accuracy, so keep that in mind.

Code: Select all

QL with JS ROM
FRAMES 50Hz (20mS) counter

Example:-
10 PAPER 0
20 CLS
30 frames=PEEK_W(163886)+32768
40 AT 0,0:PRINT frames,INT(frames/50)
50 GO TO 30
Mark