Prog8 Versions Save

high level programming language and compiler targeting 6502 machines such as the C-64 and CommanderX16

v9.4.1

8 months ago

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

v9.4

9 months ago
  • 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)

v9.3

9 months ago

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.

v9.2.1

10 months ago

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

v9.2

10 months ago
  • 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

v9.1

10 months ago
  • 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

v9.0

11 months ago

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

v8.14

1 year ago

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.

v8.13

1 year ago

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

v8.12

1 year ago
  • improved C128 support
  • removed broken floating point support from c128 target (its FP routines are currently incompatible with prog8)
  • cx16 api change: renamed cx16.push/pop_vera_context() to save/restore_vera_context()
  • cx16: added cx16.poweroff_system() and cx16.set_leds_brightness()
  • cx16: fix golden ram area
  • various bugfixes