Menu

sub missing from asm when interrupt used

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

    If I compile this program, the test1 subroutine will be missing from the asm file.  This causes the assembler to fail.  If I comment out the Interrupt subroutine, then the test1 subroutine will be in the asm file as it should be.  This seems to indicate a problem with the way the compiler adds the interrupt subroutine to the asm file.  Here is the program:

    'A program to test

    'Chip model
    #chip 16F628a, 20

    'Main routine
    Start:
    test1
    'Jump back to the start of the program
    goto Start

    sub test1
    PORTA = 200
    end sub

    sub Interrupt
    PORTA = 300
    end sub

     
    • Hugh Considine

      Hugh Considine - 2008-06-02

      What version of GCBASIC are you using to compile it?

      When I try to compile that program, it just shows an error about trying to put 300 into the byte variable PORTA (as it should) and the test1 routine is present in the generated .asm file.

       

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.