Menu

indCall issue

Marcoos
2014-06-16
2014-06-16
  • Marcoos

    Marcoos - 2014-06-16

    Hello

    I have tested the IndCall example routine and if I compile it for the Atmel family there is a report of a system register error.
    Compiler the last hot release

    Thank for any help, Marco

     

    Last edit: Marcoos 2014-06-16
  • Hugh Considine

    Hugh Considine - 2014-06-16

    IndCall worked for me a few weeks ago with the latest compiler and an ATmega328p. Perhaps there is a problem that only happens with a particular chip, could you please post your code Marco?

     
  • Marcoos

    Marcoos - 2014-06-16

    this is the modified test code of the help

    'Flash an LED using an indirect call
    '#chip 12F683
    #chip mega328p
    Dir PORTB.0 Out      
    
    'Create a word variable, and set it to the memory location of the
    'Blink subroutine.
    Dim FlashingSub As Word
    FlashingSub = @Blink
    
    'Main loop
    Do
        'Indirect call to subroutine at location FlashingSub
        IndCall FlashingSub
    Loop
    
    'LED flashing subroutine
    Sub Blink
        PulseOut PORTB.0, 500 ms
        Wait 500 ms
    End Sub
    

    bye

     
  • Marcoos

    Marcoos - 2014-06-16

    there are the error message

    Errors have been found:

    Error: GCASM: Symbol SYSREADA has not been defined
    Error: GCASM: Symbol SYSREADA_H has not been defined

    The message has been logged to the file Errors.txt.

     
  • Marcoos

    Marcoos - 2014-06-16

    there are the error message

    Errors have been found:

    Error: GCASM: Symbol SYSREADA has not been defined
    Error: GCASM: Symbol SYSREADA_H has not been defined

    The message has been logged to the file Errors.txt.

     
  • Marcoos

    Marcoos - 2014-06-16

    Oops
    I have built this in the SynWrite,
    and if I generate the assembler with the icon command, all it is ok.
    But if I compile with the asm and hex generator icon, the error appeare
    Can this help?

     
  • Hugh Considine

    Hugh Considine - 2014-06-16

    Fixed, thanks for reporting that problem Marco! There was a missing variable definition, which I have added to the stdbasic.h file as needed. Please try replacing the file you have with the one from here: https://sourceforge.net/p/gcbasic/code/124/tree/GCBASIC/trunk/include/lowlevel/stdbasic.h?format=raw

    Another option, if you don't want to replace the file, is to add this line somewhere to your program:

    Dim SysReadA As Word
    
     
  • Marcoos

    Marcoos - 2014-06-16

    Ok
    work well, many thanhs
    Marco

     

Log in to post a comment.