Skip to content

Releases: irmen/prog8

version 9.4.2

11 Sep 18:34

Choose a tag to compare

Bug fixes.

  • fix invalid addressing mode on generated assembly for bytevalue +/- bytearray[i].
  • cx16: fix for i/o channel reset in diskio.f_seek().
  • c64: added a couple of routines that calculate the correct memory locations for video ram and sprite pointers etc. based on current VIC-II memory setup. Adapted several sprite examples to use this rather than hard poking a fixed memory location.

version 9.4.1

06 Sep 19:41

Choose a tag to compare

Mainly a release with some important bugfixes. It is advised to upgrade.

  • the unroll statement now correctly accepts (contant) expressions rather than just a fixed integer
  • bug fixes in a bunch of code generation cases
  • fixed floating point invalid results on C64 (cx16 was okay)
  • added "sprites" library module for the cx16, and 2 examples that use it
  • added cx16 "plasma" example
  • added math.log2() and math.log2w() functions
  • several code optimizations

version 9.4

29 Aug 10:41

Choose a tag to compare

  • new 'pet32' compilation target (Commodore PET 4032, experimental)
  • added float.parse_f() routine to parse a string into a floating point number
  • added '-warnshadow' compiler option to get assembler warnings about potential symbol shadowing problems
  • faster code for x*x expressions (squaring)
  • faster code for sqrt(x) expression (integer square root)
  • slightly faster code for integer byte multiplication
  • faster code for integer word multiplications (~ 2x faster)
  • produce a compiler error when attempting to pass a byte value to a routine that expects a str
  • fixed bug in variable bitwise shifting, when the number of shifts is zero
  • fixed several invalid 6502 code issues (65c02 was ok)

version 9.3

12 Aug 16:26

Choose a tag to compare

This is a pretty big release since the previous version, with the focus on 2 things: getting rid of the software evaluation stack, and better code generation for nested expressions.

The software evaluation stack has been removed from the compiler. This means a page of memory is no longer required for it, and the X register has been freed for general purpose use and doesn't have to be saved/restored all the time. Programs should be a bit smaller due to this, and run a bit faster as well.

Other changes:

  • removed "-esa" and "-slowwarn" and "-optfloatx" compiler options , as these were related to the software evaluation stack.
  • removed complexity restriction on array indexed expressions.
  • added "-sourceslines" compiler option to put the prog8 source code lines into the generated assembly file for easy reference/debugging
  • fixed pixel drawing errors in gfx2.horizontal_line / filled circles / plot.
  • curly brace position parsing improvements.
  • bugfixes.

version 9.2.1

30 Jul 15:45

Choose a tag to compare

Bug fix release to correct problems that crept into 9.1:

  • don't optimize empty where choice away! It would call the else clause incorrectly.
  • never add rts to inline asmsubs and always inline them regardless of optimization setting

version 9.2

27 Jul 23:52

Choose a tag to compare

  • fixed possible type mismatch in when conditions
  • allow boolean when conditions
  • cx16: change cx16.reset_system() to use Reset SMC sequence instead of hard reset.
  • cx16: added cx16.vaddr_autoincr(), cx16.vaddr_autodecr(), cx16.vaddr_clone()
  • cx16: gfx2.text(): fixed per-pixel positioning, optimized text drawing
  • fixed a lsb() issue when assigning back to uword type
  • some generated code bugfixes and optimizations

version 9.1

11 Jul 16:26

Choose a tag to compare

  • bumped required 64tass assembler version, older versions didn't assemble some generated code correctly
  • new way of prefixing all symbols in the generated assembly code (p8_ prefix)
  • syntax parsing improvements: '{' can now be placed on next line, comments and whitespaces allowed in array literals, added /* .... */ block comment
  • added math.atan2() and math.direction() routines to calculate angles, see them in action in the new cx16 spotlight example
  • uword var == string is now also accepted as syntactic sugar for a string.compare call
  • cx16: added diskio.curdir()
  • cx16: added cx16.save_virtual_registers() and cx16.restore_virtual_registers() to help save/restore R0-R15
  • fixed a couple of for loop and repeat loop code gen errors
  • improved some error messages
  • some performance improvements in generated code
  • fixed problem in diskio.diskname()
  • fixed several compiler and code generation bugs
  • improved documentation
  • IR and VM improvements

version 9.0

05 Jun 20:08

Choose a tag to compare

Major new release with some breaking changes over version 8, see below.

Some guidance on how to upgrade your programs from version 8 is here https://prog8.readthedocs.io/en/latest/upgrading8.html

  • the -target option is now required, c64 is no longer a default.
  • added ‘cbm’ block in the syslib module that now contains all CBM compatible kernal routines and variables
  • added min(), max() builtin functions. For floats, use floats.minf() and floats.maxf().
  • added clamp(value, minimum, maximum) to restrict a value x to a minimum and maximum value. For floats, use floats.clampf(f, minv, maxv).
  • rename sqrt16() to just sqrt(), make it accept multiple numeric types including float. Removed floats.sqrt().
  • abs() now supports multiple datatypes including float. Removed floats.fabs().
  • divmod() now supports multiple datatypes. divmodw() has been removed.
  • cx16diskio module merged into diskio (which got specialized for commander x16 target). load() and load_raw() with extra ram bank parameter are gone.
  • drivenumber parameter removed from all routines in diskio module. The drive to work on is now simply stored as a diskio.drivenumber variable, which defaults to 8.
  • for loops now skip the whole loop if from value already outside the loop range (this is what all other programming languages also do)
  • asmsub params or return values passed in cpu flags (like carry) now must be declared as booleans (previously ubyte was still accepted).
  • (on cx16) added diskio.save_raw() to save without the 2 byte prg header
  • added sys.irqsafe_xxx irqd routines
  • added gfx2.fill() flood fill routine
  • added @split storage class for (u)word arrays to store them as split lsb/msb arrays which is more efficient (but doesn’t yet support all array operations)
  • added -splitarrays command line option and ‘%option splitarrays’ to treat all word arrays as tagged with @split

version 8.14

29 May 21:02

Choose a tag to compare

Bugfix release.

  • fixed psg module initial envelope maxvolume setting
  • fixed compiler error and codegen fault on signed value bitwise operation
  • RDTIM16 shim is now safe to use in irq handler
  • cx16 fix ram bank issue with RDTIM in sys.wait() and RDTIM16
  • several other compiler errors fixed.

version 8.13

14 May 20:02

Choose a tag to compare

Mainly code generation optimizations to avoid the slow stack-based expression evaluation code even more. Some programs are now significantly smaller and faster than before.

  • many improvements to expression evaluation code generation
  • fixed cx16.psg IRQ enable/disable problem
  • fixed a compiler crash on certain byte to word assignments
  • IR fixes and improvements