Prog8 language and compiler topic

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

Version 10.1 released

Post by desertfish »

:!: Prog8 version 10.1 has been released: https://github.com/irmen/prog8/releases/tag/v10.1

Please upgrade from 10.0, as a buch 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.

(donation: If you'd like to buy me a hot coffee or spicy pizza, keeping the project going, you can do so at https://ko-fi.com/irmen Thanks.)
funkheld
Posts: 322
Joined: Mon Feb 26, 2024 11:11 am

Re: Prog8 language and compiler topic

Post by funkheld »

Hi good afternoon.
I'm new to playing with the x16 emu at 75 years old.
I come from Germany.

I'm looking for a compiler that works well with the x16 and also
It's not as difficult to program as the CC65.

I was impressed by this prog8 and will use it.
The x16 is already used a lot with the prog8.
and there is already a lot of help for you if you
not progressing.

Maybe you can buy the x16 in Germany soon.
I would then buy one with accessories.

Thanks.
greeting
funkheld
Posts: 322
Joined: Mon Feb 26, 2024 11:11 am

Re: Prog8 language and compiler topic

Post by funkheld »

What I'm missing at an overview are the commands from prog8 that can be used in the x16.

A list of the commands and the values passed would be helpful for this wonderful prog8 compiler.

the porg8 deserves it and so does the x16. :D :D :D :D

Thanks.
greeting
User avatar
desertfish
Posts: 1101
Joined: Tue Aug 25, 2020 8:27 pm
Location: Netherlands

Re: Prog8 language and compiler topic

Post by desertfish »

There are 2 main reasons there is no reference manual for prog8 (yet):

1. prog8 still is under active development and things still change or get added
2. I don't have time to write it.

for now, just consult the source code of the library modules and the example applications.

Also note that all of the X16's kernal routines are found under the same name in cx16, or in cbm if they are part of the CBM-compatible kernal routines (such as PLOT.)
funkheld
Posts: 322
Joined: Mon Feb 26, 2024 11:11 am

Re: Prog8 language and compiler topic

Post by funkheld »

Hello, thanks for the help.

What you wrote helped me.

Thanks.
greeting
yock1960
Posts: 136
Joined: Tue Nov 16, 2021 8:42 pm

Re: Version 10.1 released

Post by yock1960 »

desertfish wrote: Sun Feb 04, 2024 3:35 pm :!: Prog8 version 10.1 has been released: https://github.com/irmen/prog8/releases/tag/v10.1

Please upgrade from 10.0, as a buch 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.

(donation: If you'd like to buy me a hot coffee or spicy pizza, keeping the project going, you can do so at https://ko-fi.com/irmen Thanks.)
Wait! I haven't upgraded from 9.7 yet! :lol:

I want that, get_program_args(), though, so here I go...
User avatar
desertfish
Posts: 1101
Joined: Tue Aug 25, 2020 8:27 pm
Location: Netherlands

next version is coming

Post by desertfish »

The next version is coming soon. If you can, please help me test the preview build of it.
you can snatch it from the github build action https://github.com/irmen/prog8/actions/runs/8240607070

biggest change is that the type checks for booleans are much stricter now. This enables better code generation (and less bugs).
funkheld
Posts: 322
Joined: Mon Feb 26, 2024 11:11 am

Re: Prog8 language and compiler topic

Post by funkheld »

Hi good afternoon.

the prog8 is a great thing.
Even at 75 years old, I can cope well with it.
It takes a little longer than it does for younger people, but it works.

For the new version, I would like the array byte to be able to hold more than 256 byte values, e.g. 1024 or 2048 bytes.
I would also like a command to write data from the video vera into a bank and back into the video ram vera.

You then take several banks for the data from Video-Vera.

Thanks.
greetings
User avatar
desertfish
Posts: 1101
Joined: Tue Aug 25, 2020 8:27 pm
Location: Netherlands

Re: Prog8 language and compiler topic

Post by desertfish »

You can use a uword pointer variable to point to an arbitrary length piece of memory. And you can initialize it with the memory() builtin function if you don't want to pin it on a fixed memory location.

The "real" arrays will likely always stay constrained to 256 bytes of element content because the 6502 cannot index beyond a single page of memory. Making this bigger would make the compiler much more complex and the resulting code much more inefficient (unless ofcourse the <256 case is optimized back but I don't have the time to make all that in the compiler...

About copying data to and from vram: for text screens like I said above, the VTUI library already contains those routines. I am not sure yet if I want to add something similar to the textio library. It's really more of the basics of a text windowing system (like VTUI) than part of a text output library. Then again, textio already contains routines to scroll the whole screen in all directions which is kinda special too....
funkheld
Posts: 322
Joined: Mon Feb 26, 2024 11:11 am

Re: Prog8 language and compiler topic

Post by funkheld »

Hello thanks for the information.
I didn't know that the 6502 was tailored for the 256-byte array at optimal speed.

I saw in the memory area of the x16, that it has several storage areas that you can use as a user.

this prog8 is an excellent wonderful compiler for den x16.
The prog8 is easy to learn, even for me as a beginner.
I quickly found my way around it and continue to admire the new discoveries I make.
The Prog8 is excellent and wonderful in graphics and text and super fast in execution and low memory consumption.

the diskspeed also in vram /ram....super.....

is thes banking 1-255 ?:
cx16.rambank(1...255) with 2mb

Can you please save from the rambank ?
cx16.rambank(1...255)
diskio.save("benchmark.dat",......

Can you please save from the vram ?
diskio.vsave("benchmark.dat",......

What a great job you did with the Prog8. :D :D :D :D :D

Thanks.
greeting
Post Reply