Not ROM but speed

Anything QL Software or Programming Related.
stevepoole
Aurora
Posts: 898
Joined: Mon Nov 24, 2014 2:03 pm

Re: Not ROM but speed

Post by stevepoole »

Hi EmmBee,
Add the following lines to my code :
112 FOR i = 1 to 50
117 END FOR i
Now you get accurate timing....
Steve.


User avatar
1024MAK
Super Gold Card
Posts: 593
Joined: Sun Dec 11, 2011 1:16 am
Location: Looking forward to summer in Somerset, UK...

Re: Not ROM but speed

Post by 1024MAK »

While we are talking about times to 1/50th of a second, you may find this thread interesting if you are targeting a BBQL.

Mark


:!: Standby alert :!:
“There are four lights!”
Step up to red alert. Sir, are you absolutely sure? It does mean changing the bulb :!:
Looking forward to summer in Somerset later in the year :)

QL, Falcon, Atari 520STFM, Atari 1040STE, more PC's than I care to count and an assortment of 8 bit micros (Sinclair and Acorn)(nearly forgot the Psion's)
User avatar
Mr_Navigator
QL Fanatic
Posts: 782
Joined: Mon Dec 13, 2010 11:17 pm
Location: UK, Essex
Contact:

Re: Not ROM but speed

Post by Mr_Navigator »

EmmBee wrote: That's a very interesting bug you have in your seconds counting program. Both a% and b% get to be a number of seconds. At the end of the FOR loop, a% will be increased by 78, and so even if a% starts off at zero, it will get a minimum value of at least 78. On the other hand, in the TimeLoop, b% will count up to a maximum of only 59 and can never go higher. We reach a stage where b% can never be higher than a%, and as a result, the TimeLoop is never EXITed. The asterisks will stop being printed out, and nothing can be done about it.

When I first noticed this, my instinctive reaction was to jump to the conclusion that this was somehow down to QPC2. I believe having read somewhere that QPC2 only updates the DATE clock once ever minute - that's what I thought. This is not the case, however; the bug is caused by a logic error in your code. I will leave you with the arduous task of fathoming out what has to be done.

Michael
Yep sure is however I have found via other people a link back to my original issue which related to this question in the first place and have continued it there, suffice to say the link is here http://theqlforum.com/viewtopic.php?f=3& ... 9459#p9459

Many thanks for your comments and suggestions guys I am getting near to resolving a number of programming issues.


-----------------------------------------------------------------------------------
QLick here for the Back 2 the QL Blog http://backtotheql.blogspot.co.uk/
Post Reply