Menu

Swap4 problem

2006-10-08
2013-05-30
  • Stefano Bonomi

    Stefano Bonomi - 2006-10-08

    I've encountered a strange problem....
    This an example of code:

    Sub EXAMPLE (a,b) #NR
    c=Swap4(a)
    exit sub

    the produced assembled lacks the call at swap4 subroutine, so it looks as follows:

    ;************************************************;Subroutines included in program
    ;************************************************
    EXAMPLE       
        movf    SWAP4,W
        movwf    C
        return
    ;************************************************

    Calling the code with gosub compiles fine....

    EXAMPLE:
    c=Swap4(a)
    return

    This code produced following assembler:

    EXAMPLE       
        movf    A,W
        movwf    SYSCALCTEMPA
        call    FN_SWAP4
        movf    SWAP4,W
        movwf    C
        return   

    And it's work as expected...

    Did I something wrong or the function is unusable from inside a SUB ?

    Many greetings

     
    • Hugh Considine

      Hugh Considine - 2006-10-09

      That is a problem in GCBASIC. It will be fixed in the next version - thank you for posting!

       

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.