Menu

Word sub: SysTemp1_H not defined

Santiago
2009-08-08
2013-05-30
  • Santiago

    Santiago - 2009-08-08

    Hi again.
    Compiling this code with last update (0.9 16/6/2009):

    #chip 16f876a, 20 'mhz

    dim my_var1 as word
    my_var1 = 500 -my_var1

    I have this error:
    Error [113] Symbol not previously defined (SysTemp1_H).

    And the variable allocation in the generated asm is this:
    ;********************************************************************************

    ;Set aside memory locations for variables
    DELAYTEMP    EQU    112
    MY_VAR1    EQU    32
    MY_VAR1_H    EQU    33
    SysTemp1    EQU    34

    ;********************************************************************************

    SysTemp1_H is not defined.
    DELAYTEMP is allocated but not needed.

    For example this code works ok:

    dim my_var1 as word
    my_var1 = 500 -my_var1
    my_var1 = -my_var1

    But with this code:

    dim my_var1 as word
    my_var1 = 500 -my_var1 +1

    I have this error:
    Error [113] Symbol not previously defined (SysTemp2_H).

    And the var allocation is:
    ;********************************************************************************

    ;Set aside memory locations for variables
    DELAYTEMP    EQU    112
    MY_VAR1    EQU    32
    MY_VAR1_H    EQU    33
    SysTemp1    EQU    34
    SysTemp1_H    EQU    35
    SysTemp2    EQU    36

    ;********************************************************************************

    Looks that the problem is in the last system word variable, high byte not declared..

     
    • Hugh Considine

      Hugh Considine - 2009-08-08

      There was a bug in the addition/subtraction code for word variables, when subtracting from a constant it was asking for a byte sized temporary variable, then trying to access the high byte of the variable. This should now be fixed in the latest update (9/8).

       
    • J Olson

      J Olson - 2009-08-09

      So there's a new update?

      lol

      Jz

       
    • Santiago

      Santiago - 2009-08-09

      Ok... solved problem. Thanks Hugh.

      This update has a lot of work, isn't it?... about 1000 more lines just in gcbasic.bas!!

       

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.