Menu

#299 GPASM unexpected error

None
closed-fixed
None
1
2016-12-17
2016-12-12
No

Hi,
I have an error assembling a file for enhanced PIC, see capture in attached file.
command line was gpasm -i -c -o test.o test.asm
The line 467 is:
addfsr 0, 1 ; Skip source string char count

I have made a check with only that line and the error reproduces. So I give you the reduced file in attachment too.

I remember to have trouble with such instruction in a previous version, but I think it was fixed?
(gpasm #1285, Windows version)
Regards,
Philippe.

1 Attachments

Discussion

  • Philippe Paternotte

    Forgot the output capture...

     
  • Molnár Károly

    Molnár Károly - 2016-12-12
    • assigned_to: Molnár Károly
     
  • Molnár Károly

    Molnár Károly - 2016-12-12

    If I will be have enough time, I will look at it what the cause of this error.

    Károly

     
  • Philippe Paternotte

    Hi again,
    Several things:
    1) The ADDFSR FSR0, k syntax works well in GPASM.
    2) The ADDFSR 0, k syntax is accepted by MPASM, ADDFSR FSR0, k as well.
    3) FSR0 / FSR1 are defined to their register address in the include file (0x4 and 0x6).
    4) It's in the scope of the stranges mpasm syntax because the MOVIW/MOVWI accepts FSR0 or INDF0 in both MPASM and GPASM, while the code corresponds to MOVIW/MOVWI 0x0, k, while for INCFSR it corresponds to INCFSR 0x4, k.
    5) Also the error message seems to have a bad formating?
    6) Also this strange "system error" further? Side effect?

     
  • Molnár Károly

    Molnár Károly - 2016-12-13

    In this case, illogical the behavior of gpasm, that's true. The interesting part is - or rather regrettable - so far, no one has indicated this.

     
  • Molnár Károly

    Molnár Károly - 2016-12-16

    Fixed this bug in the svn [r1293] version:

    gputils-src-20161216-1293.tar.bz2
    gputils-src-20161216-1293.tar.gz (sourceforge.net)
    gputils-20161216-1293-setup.exe (sourceforge.net)

    A simple example:

        list    p=pic16f1823
        include p16f1823.inc
    
    main    code
    
        addfsr  0, 1
        addfsr  1, 1
        addfsr  4, 1
        addfsr  6, 1
        addfsr  FSR0, 1
        addfsr  FSR1, 1
    
        movwi   1[0]
        movwi   1[1]
        movwi   1[4]
        movwi   1[6]
        movwi   1[FSR0]
        movwi   1[FSR1]
    
        moviw   1[0]
        moviw   1[1]
        moviw   1[4]
        moviw   1[6]
        moviw   1[FSR0]
        moviw   1[FSR1]
        return
    
        end
    

    Károly

     

    Related

    Commit: [r1293]

  • Philippe Paternotte

    OK, thanks for this quick fix.
    Happy Xmax.

     
  • Molnár Károly

    Molnár Károly - 2016-12-17
    • status: open --> closed-fixed
     
  • Molnár Károly

    Molnár Károly - 2016-12-17

    Merry Christmas.

    Károly

     

Anonymous
Anonymous

Add attachments
Cancel





MongoDB Logo MongoDB