![]() |
Forum Index : Microcontroller and PC projects : could mmb be compiled?
Author | Message | ||||
stanleyella![]() Guru ![]() Joined: 25/06/2022 Location: United KingdomPosts: 2547 |
|
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10250 |
If you write a compiler for it ![]() |
||||
stanleyella![]() Guru ![]() Joined: 25/06/2022 Location: United KingdomPosts: 2547 |
oops messed up. was going to say used great cow basic and it's got a compiler so produces fast code for 8 bit. but would a mmbasic "compiler" make it faster? |
||||
PeteCotton![]() Guru ![]() Joined: 13/08/2020 Location: CanadaPosts: 543 |
I'm of the mindset that it wouldn't make as much of an impact as you might think (but I could be wrong). If you're talking about games, then sure it would speed up the loops and if statements, but the bulk of the time in a game loop is copying graphics between memory locations, rotating them etc. Those are already written in highly efficient compiled/machine code. Most other intensive tasks (enemy AI) can be split over multiple game loop iterations. If it's for very fast I/O, then chances are that you will want more granular control over the timing than a compiler would allow for. |
||||
Mixtel90![]() Guru ![]() Joined: 05/10/2019 Location: United KingdomPosts: 7877 |
It could be compiled if you rewrote most of it from the bottom up, I suppose. I doubt if there's any other way as it was written purely as an interpreter. If you absolutely *have* to have some lightning fast sections then you cam use (well commented) CSUBs. ;) Remember that even compiled programs usually spend lots of time waiting for something to happen. They just do nothing faster. :) Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
PhenixRising Guru ![]() Joined: 07/11/2023 Location: United KingdomPosts: 1362 |
I think the nearest you can get is B4R, part of the B4X suite. They're doing ESP and there has been a limited amount of Pico stuff. I haven't checked in a while. Basic syntax but kinda event driven which I have never really taken to. |
||||
JohnS Guru ![]() Joined: 18/11/2011 Location: United KingdomPosts: 4038 |
Some parts would be "awkward", such as EVAL & EXECUTE. Others would stretch a lexer/parser. And... why do it? John |
||||
![]() |
![]() |
The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |