Prog8 language and compiler topic

All aspects of programming on the Commander X16.
Post Reply
User avatar
desertfish
Posts: 1096
Joined: Tue Aug 25, 2020 8:27 pm
Location: Netherlands

Prog8 language and compiler topic

Post by desertfish »


I've just made a BETA release of Prog8 6.0 available.

It contains a huge pile of improvements and changes, among which:


  • restructured part of the library modules, may break old code


  • moved many built in functions that should just be subroutines, to the library module "sys" or "string", may break old code


  • commanderX16 virtual registers cx16.r0 .. r15 available (for both cx16 and c64 compiler targets)


  • added new library modules and routines such as gfx2 and new diskio stuff


I've been using this version to create the multi-file-format imageviewer demo with color cycling, the highres bitmap graphics demo, and recently the W.I.P. file-based assembler.

It's still a beta release so things might still change, but I wanted to shove it out the door because it works very well for me at this time and the list of changes and improvements is getting pretty huge so it would be a waste to not let others use it as well already.

User avatar
desertfish
Posts: 1096
Joined: Tue Aug 25, 2020 8:27 pm
Location: Netherlands

Prog8 language and compiler topic

Post by desertfish »



I've just made the release of Prog8 6.0 available (it's no longer beta).



As always the documentation is here and the git repository is here.



This is a big new release with many improvements and changes (some backwards-incompatible). Hence a new major version number 6.



The most important improvements and changes are:




  • commanderX16 virtual registers cx16.r0 .. r15 directly accessible (for both cx16 and c64 compiler targets!)


  • used 65c02 (commanderx16) specific optimized code in many more places


  • much more efficient code generated for most pointer indexing operations. For some programs this means prog8 now outperforms CC65 by a significant margin


  • graphics drawing code is a lot faster. Especially on the c64, straight lines, circles and discs

     


  • added new library modules and routines such as gfx2 and new diskio stuff


  • added several new builtin functions: target(), offsetof(), memory()


  • the string to number conversion routines in conv module are now more robust and return the parsed length.


  • improved several compiler errors and warnings


  • moved the cx16 imageviewer and file based assembler out of this repo into their own git repositories


  • restructured part of the library modules, may break old code


  • moved many built in functions that should just be subroutines, to the library module "sys" or "string", may break old code


  • added some new handy functions to several library modules such as txt, conv, sys, diskio, cx16


  • many bugfixes and other tweaks



User avatar
desertfish
Posts: 1096
Joined: Tue Aug 25, 2020 8:27 pm
Location: Netherlands

Prog8 language and compiler topic

Post by desertfish »


Prog8 6.1 was just released. As always the documentation is here and the git repository is here.

Changes:

- some changes in gfx2 module to make screen mode numbering more intuitive

- gfx2 can now draw in highres 4 color mode as well

- fixed bug in repeat()

- fixed bug in mkword()

- fixed bug in signed word shift right

- fixed argument register clobber bug in certain asmsubs

- tehtriz example ported to CommanderX16

- added amiga desktop mockup draw example

- added peekw() and pokew() functions

- textelite game now has a star chart and nicer table printing

- some small for loop and other optimizations

- code restructuring to make all ast related code into its own separate module

kelli217
Posts: 531
Joined: Sun Jul 05, 2020 11:27 pm

Prog8 language and compiler topic

Post by kelli217 »


Speaking of Tehtriz... Would it be absolutely nuts to make the pieces look like this?


image.png
User avatar
desertfish
Posts: 1096
Joined: Tue Aug 25, 2020 8:27 pm
Location: Netherlands

Prog8 language and compiler topic

Post by desertfish »


Not at all, I think ?     Currently the code is 99% compatible with the Commodore-64 and as such it only uses regular PETSCII characters to draw everything.   How did you draw these blocks in your screenshot?

User avatar
kliepatsch
Posts: 247
Joined: Thu Oct 08, 2020 9:54 pm

Prog8 language and compiler topic

Post by kliepatsch »


To me it looks like PETSCII character 111 with background and foreground colors set accordingly.

User avatar
desertfish
Posts: 1096
Joined: Tue Aug 25, 2020 8:27 pm
Location: Netherlands

Prog8 language and compiler topic

Post by desertfish »


Ok that requires me to add some extended functions to prog8's textio library.   Currently it only can do a C-64 compatible text output, i.e. setting a character in a single color at a location on screen.  I'll have to add a background color option somehow

edit: right, that wasn't so hard.  Thanks for the suggestion, this looks good!!

image.png.6dbaf27cd43b88d9fa879ef6d9227e5c.png

 

kelli217
Posts: 531
Joined: Sun Jul 05, 2020 11:27 pm

Prog8 language and compiler topic

Post by kelli217 »


Awesome!

User avatar
desertfish
Posts: 1096
Joined: Tue Aug 25, 2020 8:27 pm
Location: Netherlands

Prog8 language and compiler topic

Post by desertfish »


Prog8 6.2 was just released. As always the documentation is here and the git repository is here.

Changes:

- like the R0..R15 virtual registers, the carry status bit Pc does no longer have to be specified as the last parameter but you can put it anywhere. The compiler will sort it.

- simplified the set_irq routines

- added irq handling routines for the commander x16

- added commanderx16 rasterbars irq example

- added cx16 vtui-library example, improved graphics on cx16 port of tehtriz and added sounds to it

- added animal guessing game example

- duplicate string literals are optimized better

- slightly optimized the gfx2 module pixel position calculations

- commanderX16 compiler target improvements

- source code restructurings to reduce internal dependencies

- bugfixes

- documentation fixes

User avatar
desertfish
Posts: 1096
Joined: Tue Aug 25, 2020 8:27 pm
Location: Netherlands

Prog8 language and compiler topic

Post by desertfish »


Prog8 6.3 was just released. As always the documentation is here and the git repository is here.

It contains a few important bug fixes and some further optimizations. Look at the release notes on Github if you want all the details.

I think this will be a nice release to work with for a while. I need my free time to do other things.

Post Reply