Forge – a new programming language for the Organiser

Use this section to showcase your programming examples. Or to ask members for programming suggestions
Cosi
Posts: 45
Joined: Thu Jan 19, 2023 5:23 pm
Location: Poland

Re: Forge – a new programming language for the Organiser

Post by Cosi »

Thanks, Andrew!

Forge has been on hold for a while, but when I decide it's time to get back to working on it, I'll definitely try to re-implement it using your framework.

Quick question (I'm too lazy to read into your code ;) ): is it possible to implement functions as inline machine code? I already make use of it (for SWAP), and there will certainly be more MC "words" if it is to even remotely resemble Forth.
amenjet
Posts: 437
Joined: Tue Jan 03, 2023 7:54 pm

Re: Forge – a new programming language for the Organiser

Post by amenjet »

Cosi wrote: Sun Mar 23, 2025 3:01 pm Thanks, Andrew!

Forge has been on hold for a while, but when I decide it's time to get back to working on it, I'll definitely try to re-implement it using your framework.

Quick question (I'm too lazy to read into your code ;) ): is it possible to implement functions as inline machine code? I already make use of it (for SWAP), and there will certainly be more MC "words" if it is to even remotely resemble Forth.
The translator generates QCode, so if that QCode is going to run on a real Organiser then 6303 machine code should work, the translator just needs to output it and insert the correct QCode to run it. I run the QCode on a Linux box so obviously 6303 machine code won't work. I have thought about allowing ARM code but I'm not sure that there's much to be gained.
If you are going to run on the newopl execution engine then you can implement a new QCode for SWAP etc and have the translator generate that QCode. That's a bit more portable too, as the QCode can then run on any machine and processor that newopl_exec has been ported to. As mentioned, the runtime isn't complete, but its close. I just need to find some time to finish it off.
Cosi
Posts: 45
Joined: Thu Jan 19, 2023 5:23 pm
Location: Poland

Re: Forge – a new programming language for the Organiser

Post by Cosi »

If you are going to run on the newopl execution engine then you can implement a new QCode for SWAP etc and have the translator generate that QCode.
Awesome! 8-)
Post Reply