Page 1 of 1
nxtBasic language and compiler topic
Posted: Tue Aug 20, 2024 7:24 am
by unartic
nxtBasic 1.0 is now released and ready to download.
What is nxtBasic?
With nxtBasic, you can write familiar BASIC code and compile it into lightning-fast machine code, allowing you to create more sophisticated programs and compelling games. nxtBasic offers an extensive and ever-growing library of commands and built-in functions, empowering you to push the boundaries of your coding projects.
Whats new?
- Bug fixes
- LCASE/UCASE now also change the case of extended chars in an ISO charset
- Automatic run command wasn't working correctly without the -startin x16emu param.
- New:
- OVAL-function to draw circles and ovals.
- Improved:
- All sprite function have a performance improvement of up to 10%
- 9% performance increase in handling integer arrays with one dimension
- 23% performance increase with FOR-NEXT loops
- 20% performance increase in retrieving an integer variable
- Example charsets.bas is now showing ISO charsets correctly and Katakana charset is added
Docs and download:
https://github.com/unartic/nxtBasic/ or
https://nxtbasic.com/
Re: nxtBasic 0.6b has just been released
Posted: Tue Aug 20, 2024 11:14 am
by funkheld
hello...great...
If you keep going like this, you'll soon reach ASM speed.....
thanks.
greetings
Re: nxtBasic 1.0 has just been released
Posted: Sun Sep 29, 2024 8:16 am
by unartic
nxtBasic 1.0 has just been released.
Whats new?
- Bug fixes
- LCASE/UCASE now also change the case of extended chars in an ISO charset
- Automatic run command wasn't working correctly without the -startin x16emu param.
- New:
- OVAL-function to draw circles and ovals.
- Improved:
- All sprite function have a performance improvement of up to 10%
- 9% performance increase in handling integer arrays with one dimension
- 23% performance increase with FOR-NEXT loops
- 20% performance increase in retrieving an integer variable
- Example charsets.bas is now showing ISO charsets correctly and Katakana charset is added
Docs and download:
https://github.com/unartic/nxtBasic
Re: nxtBasic language and compiler topic
Posted: Mon Sep 30, 2024 3:02 pm
by Martin Schmalenbach
Fantastic!
I'm very excited by this project.
My first project with it is to convert (and refactor!) my Tiny Pascal pCode interpreter with it, so that it runs as a native machine code program on the CX16.
I imagine some time is needed for the documentation to catchup to the latest version?
Is there anything I can do to help with that, as I work on my conversion project?
One question - are multiple statements per line supported, such as
Code: Select all
A=1: B=2: C=3: GOSUB SomeLabel: Z=Q: PRINT "WOW!"
And is this also supported:
Code: Select all
IF SomeExpression = True THEN PRINT "YAY!!"
Or does it have to be altered to this...?
Code: Select all
IF SomeExpression = True THEN
PRINT "YAY!!"
END IF
Cheers
Martin
Re: nxtBasic language and compiler topic
Posted: Mon Sep 30, 2024 3:08 pm
by unartic
The documentation is up to date. If you're missing something or something seems wrong, please let me know
All of the above is supported in nxtBasic. So these will all work:
A=1: B=2: C=3: GOSUB SomeLabel: Z=Q: PRINT "WOW!"
IF SomeExpression = True THEN PRINT "YAY!!"
IF SomeExpression = True THEN
PRINT "YAY!!"
END IF
Re: nxtBasic language and compiler topic
Posted: Mon Sep 30, 2024 3:54 pm
by Martin Schmalenbach
Great stuff - much appreciated.
I'm half way through editing my source code to have 1 statement per line and the multi-line IF-THEN-END IF structure everywhere, so I'll continue.
I think it will make for more readable and maintainable code as I plan to add multi data type support to the pCode instruction set and interpreter, as well as multidimensional arrays, RECORDS, SETS, ENUM types and so on... at the moment there are only signed 16 bit integers and single dimension arrays, no string support, no floats...
Thanks again for such rapid response.
Re: nxtBasic language and compiler topic
Posted: Tue Oct 01, 2024 6:05 pm
by Martin Schmalenbach
I may have missed it, but some basic conditional compilation features would be handy, with access perhaps to the command line so that
Code: Select all
nxtBasic yourprogram.bas -debug true
can be accessed via something like
Code: Select all
#IF CLI_DEBUG
... conditional source code
#ELSE
... some other conditional source code
#ENDIF
and also providing
and so on.
Re: nxtBasic language and compiler topic
Posted: Wed Oct 02, 2024 7:10 am
by unartic
Thanks for your suggestion. I've put it on the list