Menu

Problem with strange HEX compiler errors

Help
Paul Haug
2017-07-13
2017-07-13
  • Paul Haug

    Paul Haug - 2017-07-13
            When I assy this simple code, no errors reported. But when 
            compiled to Hex, strange errors I don't have a clue about.
    

    The error msg after Hex compile:
    10:58:30 G+Stool-COMPILE/ASSEMBLE, processing C:\GCB@Syn\G+Stools\makeHEX.bat
    Source-File = C:\Users\Paul\Desktop\GCBasic\RingTach\Ring_Test003.gcb
    2.3 Sec. <<< WARNINGs / ERRORs while compiling!
    Doubleclick on errormessage below to go to sourcecode-line:
    Error: GCASM: Symbol 255DATARCON has not been defined
    Error: GCASM: Symbol TOSEND has not been defined
    Error: GCASM: Symbol 4056.0 SET has not been defined

    The assy version date as follows:
    .11:08:25 G+Stool-COMPILE/ASSEMBLE, processing C:\GCB@Syn\G+Stools\makeASM.bat
    Source-File = C:\Users\Paul\Desktop\GCBasic\RingTach\Ring_Test003.gcb
    Target-File = C:\Users\Paul\Desktop\GCBasic\RingTach\Ring_Test003.asm 1.0 Sec. Compiler Version: 0.97.01 2017-02-20 Program Memory: 69/32768 words (.21%) RAM: 2/3936 bytes (.05%) Chip: 18F26K20

    .
    The code as follows:::

    ; RingLedTest
    ;Simple code to unerstand data formate for programable ring LEDs.
    ; 8 bit data bytes are sent serialy
    ; Clock signal will be sent for clocking data
    ; Haug 7/13/2017
    ; ----- Configuration
    #chip 18F26K20, 8
    #option explicit
    #define Data_Out PORTB.0 ;ouput port for serial data
    #define Clock_Out portb.7 ;Clock output
    dir Data_Out out
    dir Clock_Out out
    ;
    ;----- Variables
    Dim Data_outx as byte ;This defines the 8 bit data to send
    Dim bitcnt as byte ;number of bits to shifht out

    'Main routine
    Do
    Data_outx = 0xFF Data to send
    For bitcnt = 0 to 7
    Rotate Data_outx Right
    If STATUS.C Set then
    Set Data_Out ON
    Else
    Set Data_Out OFF
    End If
    wait 1 ms
    next

    Loop
    ;
    End

     

    Last edit: Paul Haug 2017-07-13
  • Anobium

    Anobium - 2017-07-13

    two typos...

    ; RingLedTest
    ;Simple code to unerstand data formate for programable ring LEDs.
    ; 8 bit data bytes are sent serialy
    ; Clock signal will be sent for clocking data
    ; Haug 7/13/2017
    ; ----- Configuration
    #chip 18F26K20, 8
    #option explicit
    #define Data_Out PORTB.0 ;ouput port for serial data
    #define Clock_Out portb.7 ;Clock output
    dir Data_Out out
    dir Clock_Out out
    ;
    ;----- Variables
    Dim Data_outx as byte ;This defines the 8 bit data to send
    Dim bitcnt as byte ;number of bits to shifht out
    'Main routine
    Do
        Data_outx = 0xFF ;Data to send
        For bitcnt = 0 to 7
          Rotate Data_outx Right
          If STATUS.C = 1 then
            Set Data_Out ON
          Else
            Set Data_Out OFF
          End If
          wait 1 ms
        next
    Loop
    ;
    End
    

    I am not too happy about the use of STATUS.C as a test. It works OK but not portable code. Added to the fix list.

     
  • Paul Haug

    Paul Haug - 2017-07-13

    Thanks Anobium. First error should have been obvious to me, the 2nd, not so obvious to me.
    Seems to be workin now with carry bit,

     

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.