turbosupra
03-23-2012, 03:06 PM
Through searching, I saw an example that used frqa and phsa, but I tried that and it did not work and then I realized I am already using frqa and frqb as counters for something else :)
In spin I would do something like (cnt-timeStamp > clkfreq)
I tried to do the same in pasm, but I don't know if this is a legal operation, I tried to do something with sub, but that didn't work either. Also, do I have to use if_C_OR_Z for each line after a compare, since there is no indentation or brackets in pasm?
gapCntAsm is just an incrementing counter based on certain conditions and it does increment because I can see it doing so in the terminal
cmp (cnt-timeStamp), #delta WZ,WC 'test if delta time reached or exceeded, C should be 1 or Z should be 1
if_C_OR_Z mov gapCntAsmPeak, gapCntAsm ' copy the gapCnt to gapCntPeak
if_C_OR_Z wrlong gapCntAsmPeak, gapCntAsmPeakptr ' update the hubram value
if_C_OR_Z mov timeStamp, cnt
' --------------------------------------------------------------------------------------------------
delta long 80_000_000
Thanks for reading my newb question.
In spin I would do something like (cnt-timeStamp > clkfreq)
I tried to do the same in pasm, but I don't know if this is a legal operation, I tried to do something with sub, but that didn't work either. Also, do I have to use if_C_OR_Z for each line after a compare, since there is no indentation or brackets in pasm?
gapCntAsm is just an incrementing counter based on certain conditions and it does increment because I can see it doing so in the terminal
cmp (cnt-timeStamp), #delta WZ,WC 'test if delta time reached or exceeded, C should be 1 or Z should be 1
if_C_OR_Z mov gapCntAsmPeak, gapCntAsm ' copy the gapCnt to gapCntPeak
if_C_OR_Z wrlong gapCntAsmPeak, gapCntAsmPeakptr ' update the hubram value
if_C_OR_Z mov timeStamp, cnt
' --------------------------------------------------------------------------------------------------
delta long 80_000_000
Thanks for reading my newb question.