nxtBasic language and compiler topic

All aspects of programming on the Commander X16.
unartic
Posts: 148
Joined: Sat Oct 28, 2023 3:26 pm

Re: nxtBasic language and compiler topic

Post by unartic »

Martin Schmalenbach wrote: Wed Apr 16, 2025 3:04 pm
unartic wrote: Wed Oct 02, 2024 7:10 am Thanks for your suggestion. I've put it on the list :-)
Did this make it in to 1.0 and I missed the documentation on it? 😀
No, it's still on the todo-list :-)
unartic
Posts: 148
Joined: Sat Oct 28, 2023 3:26 pm

Re: nxtBasic language and compiler topic

Post by unartic »

Martin Schmalenbach wrote: Wed Apr 16, 2025 3:07 pm Also - does your specialist assembler support 65c02 per the CX16 or only the original 6502 opcodes?
It supports most of the 65c02 instruction set. Instructions that are not available havent been needed for nxtBasic to function, but can be added if needed.
Martin Schmalenbach
Posts: 145
Joined: Tue Jul 21, 2020 10:08 pm

Re: nxtBasic language and compiler topic

Post by Martin Schmalenbach »

Hoping to clarify the following...

This is allowed...

Code: Select all

DO WHILE|UNTIL {condition}

LOOP
But this apparently isn't...

Code: Select all

DO

LOOP WHILE|UNTIL {condition}
Why does this matter? Well, in the first case, the loop is executed ZERO or more times before exiting, and in the second case the loop is executed AT LEAST ONCE before exiting. I know I can use the BREAK command and EXIT LOOP commands to achieve the effect I want. It's just that the programmer's intent is much clearer and easier to spot with a LOOP WHILE | UNTIL {condition} capability.
unartic
Posts: 148
Joined: Sat Oct 28, 2023 3:26 pm

Re: nxtBasic language and compiler topic

Post by unartic »

At the moment the condtion at the 'loop-part' is not yet implemented :-) I'll add it to the list.
Post Reply