flags in simulator

gtslabs

Member
I am using this code in the simulator and I am not seeing the flags line update. Also the toflags statement is outputing 0 when I used it in the sertxd as shown below. This code updates the timer every 6 counts. that part works ok. Using it on x1 chips.

<code><pre><font size=2 face='Courier'>
settimer count 65530 &#8216; settimer to count mode
main:
sertxd (#timer,&quot; &quot;,#toflag)
pause 1000 &#8216; wait 10 seconds, counting pulses
goto main &#8216; loop
</font></pre></code>
 

Technical

Technical Support
Staff member
Works ok for us, have you misunderstood the flag - this is when 'timer' itself overflows.

Try adding
timer = 65534

at the start of the program to see the effect when timer rolls over (otherwise you have to click 65535 x 6 times, which might make your finger hurt!)
 

gtslabs

Member
Ok, I thought it overflowed when the timer inremented based on the count value.

I inserted the timer value and the simulator hung up on the sertxd line.

Ver 5.1.5
<code><pre><font size=2 face='Courier'>
settimer count 65534 &#8216; settimer to count mode
timer = 65534
main:
sertxd (#timer,&quot; &quot;,#toflag)
pause 1000 &#8216; wait 1 seconds, counting pulses
goto main &#8216; loop
</font></pre></code>

I have been having problems with the simulator lately especially with large numbers. This code below wont run for me.
<code><pre><font size=2 face='Courier'>
for W0 = 2 to 65530
next
</font></pre></code>
 
Top