Menu

Release Candidate RC44 - please update from RC43 ASAP

Anobium
2021-03-23
2021-03-26
  • Anobium

    Anobium - 2021-03-23

    Again, this release candidate is NOT a normal few tweaks or changes.

    This has a major changes

    1. New For-Next-Step support for AVR now support negative steps. RC43 will fail with AVR negative steps.
    2. Revised Table with String support to improve handling.

    Download Folder

    https://sourceforge.net/projects/gcbasic/files/Release%20Candidates/

    Please replace RC43 asap.

     
  • stan cartwright

    stan cartwright - 2021-03-23

    Nice for avr, cheers.
    The "for" help has been updated to mention overflow but now needs a rewrite to show the checking.
    I never found a problem with for-next probably cos I made sure the steps were ok and used a var for minus values.

     
  • Frank Steinberg

    Frank Steinberg - 2021-03-23

    Hi Evan!

    The new FOR-NEXT checks certainly help to avoid program errors. I think this makes sense for a BASIC programming language. Unfortunately this increases the size of my current program by ca. 260 bytes. Bad for me, because the program size is slowly approaching the limit for an Attiny85.

    Is there any chance, that these additional checks are inserted only for step sizes other than 1 (or -1)? This way the limits could still be checked where needed and the memory usage for simple loops stays small.

    Frank

     
    • Anobium

      Anobium - 2021-03-23

      Can I look at the source ?

      I would expect a few extra words of progmem but not an increase of 180 words.

      I have added more rationalisation today. But, I need code, like yours, to examine the growth.

       
  • Frank Steinberg

    Frank Steinberg - 2021-03-23
    #chip tiny85, 1
    
      For ii = 1 To 11
      Next
    
      For ii = 2 To 22
      Next
    
      For ii = 3 To 33
      Next
    

    RC42:
    Every FOR-NEXT loop adds 24 bytes of code.
    RC44:
    First FOR-NEXT adds 50 bytes, every following 40 bytes.

    Assuming my program uses 20 FOR-NEXT loops, the difference is 330 bytes.

     
    • Anobium

      Anobium - 2021-03-24

      Great points. Totally understand.

      See I will post a new exe compiler today that supports enabling the old FORNEXT method. Add the constant to the source and it will revert to the old code. I knew it was a good idea not to delete the original code.

      The old method is riddled with bugs and is not advised unless the very simplest of operations are used and the program is fully tested.

      So, you will be able to add the following to use the old method.

      #define USELEGACYFORNEXT

       

      Last edit: Anobium 2021-03-24
  • Anobium

    Anobium - 2021-03-26

    A few updates to the compiler to fix an issue and provide improved table text support.

    Put the file from here https://sourceforge.net/projects/gcbasic/files/Release%20Candidates/Patches/ in your GreatCowBASIC folder.

    1. Resolves a for-next issue where the for-next failed when all three parameters (not the loop) are defined as Constants and the EndValue is negative.
    2. Add for-next optimisation when all three parameters (not the loop) are defined as Constants and are all positive values. The compiler will use the legacy code automatically.
    3. Resolves a Table Text issue where an incorrectly terminated string silently failed.
     

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.