Menu
JAQForum Ver 19.10.27

Forum Index : Microcontroller and PC projects : TIMER Documentation Disagreement

Posted: 11:31am
23 Jul 2016
Copy link to clipboard
Paul_L
Guru

Hi guys, it's that Polack from NY with another dumb syntax question.

The Micromite Manual.pdf says
  Quote  TIMER Returns the elapsed time in milliseconds (eg, 1/1000 of a second) since reset. The timer is reset to zero on power up or a CPU restart and you can also
reset by using TIMER as a command. If not specifically reset it will continue to count up forever (it is a 64 bit number and will only roll over to zero after 200 million years).

200 million years is 6.3072E+18 ms.
A 64 bit binary could count to 1.8447E+19 ms.

But the MMBasic Language Manual.pdf says
  Quote   TIMER CMM MM DOS Returns the elapsed time in milliseconds (eg, 1/1000 of a second) since reset. If not specifically reset this count will wrap around to zero after 49 days. The timer is reset to zero on power up and you can also reset by using
TIMER as a command.

49 days is 4.2336E+09 ms.
A 32 bit binary could count to 4.2950E+09 ms.

Which seems to indicate that it was changed from 64 bits to 32 bits sometime.

The Micromite Plus manual is silent on the matter.

So, which version of MMBasic and which chips use 64 bits and which use 32 bits?

Paul
 
Posted: 01:54pm
23 Jul 2016
Copy link to clipboard
TassyJim
Guru


The colour maximite V4.5 uses 32 bit. Al numbers are floating piont so while the internal counter rolls over every 49 days, the usable count is less and you would need to do your own overflow code.

The later micromites had 64 bit integers added to the mix. This makes life easier.

Jim


VK7JH
MMedit
 


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025