Hi. is this bug?
"IntOff" is translated 2 steps. If interrupt occurse between these steps, counter is cleared within interrupt sub.
source code --------------- IntOff nop IntOn ---------------
--->
object code <------> should be this ---------------------------------------------------------- incf SysIntOffCount,F <------> bcf INTCON,GIE bcf INTCON,GIE <------> incf SysIntOffCount,F nop decf SysIntOffCount,F btfsc STATUS,Z bsf INTCON,GIE ---------------
' the reason. within interrupt sub ----------------------- CLRF SYSINTOFFCOUNT <------- INCF SYSINTOFFCOUNT,F <------- reset = 1 GOTO INTERRUPT INTERRUPTDONE CLRF SYSINTOFFCOUNT <------- why clear???
Thanks kamiya.
Hi.
another problem is "not 'IntOff' generate implicitly".
for "PRINT" then generate as ---------------------------- incf SysIntOffCount,F bcf INTCON,GIE movlw low SYSSTRINGPARAM1 ----------------------------
but, for calc statement / comp statement ---------------------------- < absence "IntOff" > movwf SysCalcTempB call SysDivSub / SysCompLessThan ----------------------------
Is this bug??? Thanks kamiya.
correct next ------------------------------------------------- xx = yy * zz ' implicit IntOff/IntOn OK
if yy * zz > xx then ' implicit IntOff/IntOn NG
Log in to post a comment.
Hi. is this bug?
"IntOff" is translated 2 steps. If interrupt occurse between these steps,
counter is cleared within interrupt sub.
source code
---------------
IntOff
nop
IntOn
---------------
--->
object code <------> should be this
----------------------------------------------------------
incf SysIntOffCount,F <------> bcf INTCON,GIE
bcf INTCON,GIE <------> incf SysIntOffCount,F
nop
decf SysIntOffCount,F
btfsc STATUS,Z
bsf INTCON,GIE
---------------
' the reason.
within interrupt sub
-----------------------
CLRF SYSINTOFFCOUNT <-------
INCF SYSINTOFFCOUNT,F <------- reset = 1
GOTO INTERRUPT
INTERRUPTDONE
CLRF SYSINTOFFCOUNT <------- why clear???
Thanks
kamiya.
Hi.
another problem is "not 'IntOff' generate implicitly".
for "PRINT" then generate as
----------------------------
incf SysIntOffCount,F
bcf INTCON,GIE
movlw low SYSSTRINGPARAM1
----------------------------
but, for calc statement / comp statement
----------------------------
< absence "IntOff" >
movwf SysCalcTempB
call SysDivSub / SysCompLessThan
----------------------------
Is this bug???
Thanks
kamiya.
correct next
-------------------------------------------------
xx = yy * zz ' implicit IntOff/IntOn OK
if yy * zz > xx then ' implicit IntOff/IntOn NG
Thanks
kamiya.