high level programming language and compiler targeting 6502 machines such as the C-64 and CommanderX16
It is now possible (and required) to assign all values returned from a romsub/asmsub that returns multiple values.
The void
keyword can now also be used in a new way: as a dummy assignment target for any value you are not interested in in such a multi-value assignment.
Please read the documentation in the manual for details about this new feature.
verafx.mult()
and muls()
now return both words of the 32 bits resultsprites
module: the palette_off set
parameter now takes values 0-15 (instead of 0-255) to be more consistent with docs and vera behaviortxt.cls()
as a shorter alternative to clear_screen()
cbm.STOP2()
and cbm.GETIN2()
convenience routines (because the regular ones are now a bit more cumbersome to use because of the new multi-value assignment rules)diskio.fastmode()
to select the fast serial disk modecx16.extapi()
ROM call, call numbers and shims. (new for X16 rom R47)diskio.status_code()
floats
module: atan2
, secant
, csc
and cot
.Full Changelog: https://github.com/irmen/prog8/compare/v10.2.1...v10.3
Bugs fixed:
Library changes:
-nostrictbool
command line option that allow implicit conversions between bool and bytes again. This allows prog8 to compile most older code without source changes. Note that this option will likely be removed in a future version, so it's advised to actually go update your program code to be properly compatible with the new version.
Full Changelog: https://github.com/irmen/prog8/compare/v10.1...v10.2
Bug fix release. Please upgrade if you're using 10.0 because a handful of important fixes have been made.
Also added cx16.get_program_args() and cx16.set_program_args(), and made a couple more code generator improvements.
Full Changelog: https://github.com/irmen/prog8/compare/v10.0...v10.1
donation: If you'd like to buy me a hot coffee or spicy pizza, you can do so at ko-fi.com/irmen
This is a BIG release. Many things got changed, improved or fixed.
additional rules for symbol prefixing to avoid name clashes in the generated assembly code. Details here https://prog8.readthedocs.io/en/latest/technical.html#symbol-prefixing-in-generated-assembly-code
push
, pushw
, pop
and popw
are no longer builtin functions but regular inlined subroutines in sys
.
some floating point routines have been renamed to make the names more consistent:
floats.rndf -> floats.rnd
floats.parse_f -> floats.parse
floats.rndseedf -> floats.rndseed
floats.print_f -> floats.print
floats.str_f -> floats.tostr
some type casting rules have been tweaked. You may have to add or remove type casts in certain places.
boolean logical "and" and "or" expressions are now evaluated with McCarthy / short-circuit evaluation. This means that not every term in the expression will be evaluated if the result can already be determined! This should normally not cause any problems because it is bad practice to write code that depends on the order of evaluation of the terms, but sometimes we can't help ourselves.
if x in 10 to 100
)verafx.copy()
for fast vram to vram copy ("blitting")palette.get_color()
and palette.default_colors_16[]
sprites.set_mousepointer_image()
, sprites.set_mousepointer_hand()
and sprites.get_data_ptr()
cx16.cpu_is_65816()
to test for presence of the 65816 cpu vs the 6502 cpustring.isspace()
and string.isprint()
and string.contains()
.call
builtin function for efficient indirect subroutine call (indirect JSR)cbm.CLEARST()
-varsgolden
compiler option to put variables into golden ram at $0400-slabshigh
and -slabsgolden
to do the same for memory() slabs as for variables-printast1
and -printast2
command line options to dump the internal parse trees (useful for debugging purposes)-check
compiler option to only quickly syntax check a program%option ignore_unused
directive to suppress warnings about unused stuff, useful when writing librariesfloats.push()
and floats.pop()
to push and pop floating point numbers on the cpu stackmath.crc16()
and math.crc32()
to compute checksumsMany, many bug fixes and other improvements have been made. Check the commit list for all the details: https://github.com/irmen/prog8/compare/v9.7...v10.0
donation: If you'd like to buy me a hot coffee or spicy pizza, you can do so at ko-fi.com/irmen
A big release this time
diskio.set_drive()
, just set diskio.drivenumber
directlysys.set_irq()
and sys.set_rasterirq()
no longer have a useKernal parameter! The irq handler routine must return a boolean instead in the A register, that determines if the system IRQ handler should run afterwards or not.palette
module: changed in the available preset routines.ubyte x,y,z
x=y=z=calculate()
%encoding
to set the text encoding for the whole filecontinue
statement to continue with the next loop iterationknäckebröd
and π
are now valid identifiers. Added floats.π
constant.uword large = 320*240/8/8
is now okay.cx16.enable_irq_handlers()
and associated subroutines, and "Commander X16 specific IRQ handling" in the manualbmx
library to read and write "BMX" bitmap images. See "showbmx" examplemove
, movex
and movey
to move the sprite by on offsethash
, isdigit
, isupper
, islower
, isletter
pokef()
and peekf()
for floating point numbersfloats.str_f()
to convert a float number to a string (without printing it)Full Changelog: https://github.com/irmen/prog8/compare/v9.6...v9.7
math.diff()
and math.diffw()
gfx2.init_mode()
if you don't want to switch current screen mode but still use gfx2 librarygfx2.safe_circle()
and safe_disc()
that clip the pixels to the screen.textio
that can set and read the cursor position.f_seek_w
to diskio on commander X16 (needs f_open_w_seek() to work)verafx.mult/muls
now return the upper 16 bits of the 32 bits result in r0.diskio.f_write
now uses fast MCIOUT block transfer routine on the Commander X16sys.disable_caseswitch/enable_caseswitch
cx16.set_chrin_keyhandler
to insert custom key handler routine into CHRIN/BASINstring.append
cx16.vpeek()
pokemon()
now actually pokes a value but also returns the previous value that was in the memory location%zpallowed
to explicitly list the zeropage locations that the compiler can use (as opposed to %zpreserved
)fill()
flood fill routines to no longer read outside of the screen, also optimized them a bit more.Correcting some code generation errors and some additional tweaks:
-breakinstr
compiler option to emit STP or BRK for a %breakpointmany "Commander X16" enhancements in this release.
gfx2
has its screen modes renumbered! See the module's source code for the new listsetlsb
and setmsb
builtin functions to only set 1 byte of a wordmath.mul16_last_upper
routine to access the upper 16 bits of the 32 bits result of a word-multiplicationverafx
library module to access Vera FX functionalityemudbg
library module to access emulator debugging supportmonogfx
library module, this now contains the removed monochrome support that was in gfx2
.diskio
library module: more robust channel handling&array[2]
Bug fixes.