Menu

IntOff is incorrect

2008-05-26
2013-05-30
  • Nobody/Anonymous

    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.

     
    • Nobody/Anonymous

      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.

       
    • Nobody/Anonymous

      correct next
      -------------------------------------------------
      xx = yy * zz           ' implicit IntOff/IntOn OK

      if yy * zz > xx then   ' implicit IntOff/IntOn NG

      Thanks
      kamiya.

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.