Prog8 language and compiler topic

All aspects of programming on the Commander X16.
borgar
Posts: 52
Joined: Wed Mar 31, 2021 9:30 am
Location: Oslo

Prog8 language and compiler topic

Post by borgar »



On 6/15/2022 at 10:57 PM, desertfish said:




- greatly improved  code gen for logical expressions and array / pointer indexing.



I didn't get around to checking out the new compiler before now but there is a marked improvement in Petaxian when all enemies are on screen and moving with the latest update. 

I definitly use a lot of logical expresion and tons of array indexing so assume the above update is why ?

Very very nice.

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

Prog8 language and compiler topic

Post by desertfish »


Yeah! I noticed this as well (I am using Petaxian as a test bench for compiler changes).  The prg shrunk by a couple hundred bytes too.

I do think I'm at the limits of what I can reasonably improve in the current codegen. For the future I want to write a new one based on the 'vm' intermediate code but that will be a big undertaking. I do think that may eventually be a) way better to maintain and better structured and b) generating better code.

 

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

Prog8 language and compiler topic

Post by desertfish »


@borgar with the recent improvements made, is the game still too slow on the C64?

borgar
Posts: 52
Joined: Wed Mar 31, 2021 9:30 am
Location: Oslo

Prog8 language and compiler topic

Post by borgar »



On 6/28/2022 at 5:43 PM, desertfish said:




@borgar with the recent improvements made, is the game still too slow on the C64?



No, I'm not experiencing noticable slowdown on C64. The last update really helped a lot here.

I've just commited some updates with a couple of more enemies, more stages and a new bomb types now so the games should hopefully be more challenging as well. I got some comments that it was a bit easy ? At least I have not been able to complete the game myself yet after the update.

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

Prog8 language and compiler topic

Post by desertfish »


I was asking because the readme still contains the note about the speed on C64.

borgar
Posts: 52
Joined: Wed Mar 31, 2021 9:30 am
Location: Oslo

Prog8 language and compiler topic

Post by borgar »



On 6/28/2022 at 9:11 PM, desertfish said:




I was asking because the readme still contains the note about the speed on C64.



Ah, yes. The description hasn't been updated for a while. I took this as a gentle reminder and have done so now. The text should better reflects the current state of the project.

I'll update the game in the CX16 pages when it can work with the latest emulator.

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

Prog8 language and compiler topic

Post by desertfish »


Prog8 version 8.3 has been released.  It introduces the new 'bool' datatype, a psg library to play with Vera's psg sound generator, and several other new features that you can read about in the release notes:

https://github.com/irmen/prog8/releases/tag/v8.3

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

Prog8 language and compiler topic

Post by desertfish »


Version 8.4 has been released,

<https://github.com/irmen/prog8/releases/tag/v8.4>

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

Prog8 language and compiler topic

Post by desertfish »


Version 8.5 has been released.

https://github.com/irmen/prog8/releases/tag/v8.5

arkorott
Posts: 4
Joined: Thu Aug 04, 2022 2:23 am

Prog8 language and compiler topic

Post by arkorott »


Hello just trying out Prog8. Installed everything and compiled the hello world example with no issues.

I load the HELLO.PRG in the emulator and when I list it everything seems fine, but when I run it the screen flashes and the emulator seems to reset itself.

Might I be doing something wrong?

Compiling with: java -jar ~/Documents/workspace/prog8/prog8compiler-8.6.2-all.jar -target cx16 -emu hello.p8

Compiles with no issues. Using R41 emulator.

BTW, thank you for doing this and the great effort you have put behind it!

I just went through all the comments here. Impressive work.

Been using so far cc65 with C and mostly asm. Intrigued to try Prog8 and benchmark my prime number finder using trial division comparing cc65 vs Prog8 performance.

Post Reply