Menu

No puedo generar el archivo hex

Manuel
2022-02-01
2022-02-02
  • Manuel

    Manuel - 2022-02-01

    El compilador de GCBasic no genera un archivo HEX con este programa , pero sí lo hace con otros de las demos incluidas en el compilador. El compilador no genera ningun error . Donde estoy fallando ?

     
  • Chris Roper

    Chris Roper - 2022-02-01

    Hola Manuel,

    I see errors:

    Great Cow BASIC Pre-processing (Copyright 2007..2021)
    First complilation... Welcome to Great Cow BASIC
    
    Great Cow BASIC (0.98.07 2021-07-24 (Windows 64 bit) : Build 1005)
    
    Compiling C:\Users\User\Downloads\rotacion de bits4.gcb ...
    
    Errors have been found:
    
    rotacion de bits4.gcb (91): Error: Invalid variable name: 0DO
    rotacion de bits4.gcb (91): Error: Variable 0DO was not explicitly declared
    rotacion de bits4.gcb (95): Error: Array/Function (CAD(CONT - 1) | 128) has 
    not been declared
    
    The message has been logged to the file Errors.txt.
    

    Not sure of the reason though.

     
    • Anobium

      Anobium - 2022-02-01

      Chris is correct with the errors, however, I have found that the third error was being incorrectly handled in later version of the compiler.

      I now get - which is correct. And, I have added the actual error. There is a set of braces that confuse the compiler and they need to be removed - this compiler is trying to find a function... which it cannot find.

      Please apply the patches for build 1077

      Evan

      15:02:21    G+Stool started with parameter 'hex'   ->   processing   C:\GCB@Syn\G+Stools\makeHEX.bat
      Source-File  =  C:\Users\admin\Downloads\rotacion de bits4.gcb
      >>>  WARNINGs / ERRORs reported by Great Cow BASIC  (if Syntax Error, doubleclick on the errormessage below)  <<<
      rotacion de bits4.gcb (91): Error: Invalid variable name: 0DO
      rotacion de bits4.gcb (91): Error: Variable 0DO was not explicitly declared
      rotacion de bits4.gcb (95): Error: Unhandled braces error, remove outer braces (CAD(CONT - 1) | 128)
      Duration:   1.4  Seconds.
      
       
  • Anobium

    Anobium - 2022-02-01

    Read this! https://sourceforge.net/p/gcbasic/discussion/579127/thread/b867317011/

    Remove the use of single and use factorisation instead.


    Our goal is to resolve the real numbering issues in the next release.

     
    • stan cartwright

      stan cartwright - 2022-02-01

      Can't open link- access forbidden

       
  • William Roth

    William Roth - 2022-02-01
     Line 65:   HSerPrint "numero ",val_cad
    

    Hserprint does not support multiple entries. Change this to:

    Hserprint "numero " : Hserprint val_cad
    

    Same applies to line 67 or any other that has multiple entries


    Line 91:   for cont=len(cad) to 0 do step -1
    

    Erroneous "do" Change this to:

    for cont=len(cad) to 0 step -1
    
     
  • Anobium

    Anobium - 2022-02-01

    And, apply the patch. As the compiler was crashing and not generating any output files.

     
  • Anobium

    Anobium - 2022-02-02

    A code segment to show how I would go about this display.

    dim display_string  as String * 4
    dim valor_calc as Long
    valor_calc = 99989991
    
    do
    
        HSerPrint " comienzo2"
        HSerPrintCRLF
        HSerPrint "numero "
    
        display_string = str( valor_calc / 10000 )
        display_string = LeftPad ( display_string, 4, "0" )
        HSerPrint display_string
    
        HSerSend "."
    
        display_string = str(valor_calc % 10000 )
        display_string = LeftPad ( display_string, 4, "0" )
        HSerPrint display_string
    
        HSerPrintCRLF
        HSerPrint " finalizado"
        HSerPrintCRLF
        wait 1 s
    
        valor_calc++
    
    loop
    
     
  • Manuel

    Manuel - 2022-02-02

    Gracias por su ayuda.
    Cual es el procedimiento para aplicar un parche ?.
    He descargado un archivo que señala como parche para la version 1077 pero no se que hacer con él.

     
  • Anobium

    Anobium - 2022-02-02

    Como dice desde donde descargaste.

    Evan

    **Version 0.99.xx Patches

    To install these patches:

    Download the zip
    unzip all files to a temp folder
    apply all files to your installation replacing all the existing files
    then, rename the compiler EXE for your operating system - you need to ensure either GCBASIC64.exe or GCBASIC32.exe is renamed as GCBASIC.exe
    Enjoy
    Using single files may make your installation unstable. Use all the patch files.

    See https://1drv.ms/x/s!Ase-PX_n_4cvhJAysbPF3VJAnYaj3A for changelog.

    Please see here https://sourceforge.net/p/gcbasic/discussion/579126/thread/0d009b1785/ to see the Software Bill of Materials (SBOM) to meet the US.gov Executive Order May 2021 requirement.**

     
  • Anobium

    Anobium - 2022-02-02

    Manuel's little program uncovered a few issues deep inside the compiler but these issues were easy to trigger within the user code. As he found out. And, they are easy for new user get stuck on.

    1. Serial programming when port not available.
    2. Operations with braces that were not processed correctly.
    3. Operations where a division of different types of variables were not processed correctly.

    4. Programming when port not available - fixed

    I hit this issue using the example code on a new build with default settings. I have seen it 100's of time but this time it annoyed me. The classic serial port/AVRDUDE lock up. The new code now checks the serial port just before passing programming to the external programmer. This resolves the IDE window sitting there and a new user having to use task manager to kill the session.

    1. Operations with braces that were not processed correctly - fixed

    An example: char=val((cad(cont - 1) or 0b10000000)) There is nothing wrong with the source but the compile cannot in this specific instance where a function VAL() is called with the Element Array CAD()the compile was not computing the example assignment correctly where a cad(cont - 1) or 0b10000000 was been created as the variable. Then, net result of this was the compiler crashed mid compilation with no exit code. This has been resolved.

    1. Operations where a division of different types of variables were not processed correctly - fixed

    An example: display_string = val( valor_calc / 100 ) where valor_calc is a string. This also crashed the compiler mid compilation with no exit code. Again, the compiler cannot resolve and therefore there was an unhandled error. This is was the string pointer fails to resolve the 'string / number' operation with the pointer address being returned as a very very large impractical memory address. This is now handle totally appropriately with an appropriate error message.


    So, who knew that from a one post so many things would be resolved!

    Evan

     

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.