assembly cmp help
cmp ulMSec,ulDayLength 'See if day done if_b jmp :updateTime 'If day is done jump to end of routine
The manual says if ulMSec is less then ulDayLength then c=1
if c=1 then if_b should be true and execute command.
ulDayLength=86_400_000
ulMSec will almost always be less the that. why does the line after this execute every time?

Comments
It's because you haven't indicated which flag to set.
try
Here the C flag will be set if ulMSec is less than ulDayLength
regards,
Coley
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
PropGFX - The home of the Hybrid Development System and PropGFX Lite
cmp ulMSec,ulDayLength wc 'See if day done if_b jmp :updateTime 'If day is done jump to end of routine 'run every day mov ulMSec,#0▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
PropGFX - The home of the Hybrid Development System and PropGFX Lite
DAT org 0 TimeKeeper mov cnt_value,cnt 'prepare for initial waitcnt add cnt_value,cnt_ticks 'run every ms :loop waitcnt cnt_value,cnt_ticks rdlong ulMSec,ptrToUlTime 'Copy sec over add ulMSec,#1 'Add 1 to MSec cmp ulMSec,ulDayLength wc 'See if day done if_b jmp :updateTime 'If day is done jump to end of routine 'run every day mov ulMSec,#0 'Set Time to midnight { rdlong ulDat,ulDate 'Copy days over add ubDay,#1 'Add 1 day mov ulTemp,#months+ubMonth 'have not figured out how to do calendar yet } 'finish up :updateDate wrlong ulDat,ulDate 'Update the date :updateTime wrlong ulMSec,ptrToUlTime 'Update the time jmp #:loop 'Locale Time Value ulMSec long 0 ptrToUlTime long 0 'Locale Date Values ulDat uwYear word 0 ubMonth byte 0 ubDay byte 0 'Lenght of Month Table months january byte 31 february byte 28 march byte 31 april byte 30 may byte 31 june byte 30 july byte 31 august byte 31 september byte 30 october byte 31 november byte 30 december byte 31 'constants zero long 0 ulDayLength long 86_400_000 cnt_ticks long 80_000 cnt_value long 0 fit 496jmp #:updateTime
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Prop Tools under Development or Completed (Index)
http://forums.parallax.com/showthread.php?p=753439
My cruising website http://www.bluemagic.biz
Address 0 is the first long
Address 1 is the second long.
There is no byte granularity or word.
To access ubDay I'll do this:
I'd recommend you download pPropellerSim (from sourceforge.org/projects/ppropellersim) and test them through.