Home
JAQForum Ver 20.06
Log In or Join  
Active Topics
Local Time 05:19 04 May 2024 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : MMBASIC compiler - opnions wanted

     Page 1 of 2    
Author Message
tomxp411
Newbie

Joined: 04/04/2019
Location: United States
Posts: 24
Posted: 09:36pm 17 Apr 2019
Copy link to clipboard 
Print this post

So I've pretty much decided to build a code converter that will convert MMBASIC programs to either c# or VisualBasic code, then compile that to use a custom runtime I've developed.

This will give the user a graphic display equivalent to the Color Maximite in modes 1-4, with a couple of additional hi-res modes to take full advantage of a PC monitor, with up to 4K graphics.

The idea is simple: the user will open up a program that looks and acts like a Maximite terminal, with the same editor and immediate modes of the Color Maximite. When the user types RUN, the system converts the code to c# or VB, then compiles that using the standard DotNet Framework tools. The result should be a seamless environment that looks and acts very much like a Maximite, but actually works with Microsoft DotNet (or Mono).


So now the question: if you could have a tool like this, which programming language would you want the converter to emit? I'm not considering c or c++, but VB, c#, Python, and Lua are all on the table.

I can probably make them all happen at some point, but obviously I need to focus on one language to start with. What would your choice be? (Python would not have GOTO support, so this option would be a little limited.)

The second question is... would you want to support older code with line numbers? Supporting line numbers is fairly trivial, but it changes the way things work internaly. For example, if line 10 is entered after line 20, the converter has to re-order the list when line 10 is entered.

Third, does anyone see a pressing need to support MMBASIC 4.5? With differences in variable declarations, scope, graphics commands, and switch/case statements, skipping 4.5 would be simpler for me.

Finally, is an 8-bit style Windows BASIC with graphics something you'd use?


Edited by tomxp411 2019-04-19
 
sawasdee01
Newbie

Joined: 23/12/2016
Location: United Kingdom
Posts: 33
Posted: 12:39am 19 Apr 2019
Copy link to clipboard 
Print this post

Hi tomxp411,

I am not entirely sure whether this will help, as you seem to suggest a preference for full .net compatibility - but quite a few previous VB programmers now use B4J. Details can be found here:-

https://www.b4x.com/

Taking this route would also open some interesting opportunities for porting to other platforms.

I suspect that a lot will hinge on compatibility with the 'existing runtime' that you mention in your email.

If your aim is to make a PC based MMBASIC simulator, for use (for instance) by game developers, I wonder whether there isn't a way that cuts out the need for a second stage of compilation via a C# or VB compiler?

Best regards

Sawasdee
 
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 3017
Posted: 01:49am 19 Apr 2019
Copy link to clipboard 
Print this post

I admit to confusion about what is being sought here. If it's "a PC based MMBASIC simulator", there's mmbasic for DOS. I do think it would be nice if DOS mmbasic supported some sort of PC graphics window, but I'd question whether there would be enough demand to justify the effort it would take.

PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 3661
Posted: 05:15am 19 Apr 2019
Copy link to clipboard 
Print this post

Tying into .Net/mono would put me off, and ruling out C & C++ also would but if those are what's wanted then (other than surprise at the choices) go ahead.

John
 
Bizzie
Senior Member

Joined: 06/07/2014
Location: Australia
Posts: 185
Posted: 06:39am 19 Apr 2019
Copy link to clipboard 
Print this post

I support sawasdee01 I would suggest you look into B4X. It already supports Android, Apple, Arduino and Java. There is a very wide (not sure how deep!) user base and the developer is involved in the forums.

All the best with your endeavours.
Rob White
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 3661
Posted: 08:43am 19 Apr 2019
Copy link to clipboard 
Print this post

It looks like it's not free, though.

John
 
Bizzie
Senior Member

Joined: 06/07/2014
Location: Australia
Posts: 185
Posted: 11:33am 19 Apr 2019
Copy link to clipboard 
Print this post

Free for Java and Arduino.
Rob White
 
Tinine
Guru

Joined: 30/03/2016
Location: United Kingdom
Posts: 1646
Posted: 03:10pm 19 Apr 2019
Copy link to clipboard 
Print this post

  JohnS said   It looks like it's not free, though.

John


Been using B4A for 7+ years. Most find that it's better than free because, despite the fact that there is a purchase price, the payback in timesaving more than compensates.

It's an amazing development tool for Android devices and has a wonderful support community.
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 3661
Posted: 03:34pm 19 Apr 2019
Copy link to clipboard 
Print this post

  Bizzie said   Free for Java and Arduino.

So would one of those be the target?

It didn't read like it.

John
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 3661
Posted: 03:35pm 19 Apr 2019
Copy link to clipboard 
Print this post

  Tinine said  
  JohnS said   It looks like it's not free, though.

John


Been using B4A for 7+ years. Most find that it's better than free because, despite the fact that there is a purchase price, the payback in timesaving more than compensates.

It's an amazing development tool for Android devices and has a wonderful support community.


I don't see how that would apply in the case under discussion so please explain how it does.

John
 
Tinine
Guru

Joined: 30/03/2016
Location: United Kingdom
Posts: 1646
Posted: 04:50pm 19 Apr 2019
Copy link to clipboard 
Print this post

Someone posted a link to B4X

You stated it wasn't free.

True, B4A and B4i are not free.

So in reference to the "not free" products, I stated that they are worth the investment.

I can't believe that you found that so difficult to figure out so I can only assume that, as usual, you are looking for a tit-for-tat exchange.


 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 3661
Posted: 07:09pm 19 Apr 2019
Copy link to clipboard 
Print this post

You've overlooked the subject of the thread it's not Android.

Perhaps you might consider such things more carefully before adopting your unhelpful and nasty tone.

John
 
Tinine
Guru

Joined: 30/03/2016
Location: United Kingdom
Posts: 1646
Posted: 10:00pm 19 Apr 2019
Copy link to clipboard 
Print this post

  JohnS said   You've overlooked the subject of the thread it's not Android.

Perhaps you might consider such things more carefully before adopting your unhelpful and nasty tone.

John


It would be more helpful if you paid attention to what is and isn't free from the website, then you wouldn't have had to chirp in, would you.
Fact of the matter is that the B4X products were brought up and that might have piqued some interest.

I actually USE MM products in the real world....do you?

I have an Android front end talking to a E100 on real machine in a real factory.

This is a cool solution and maybe someone can benefit from this knowledge.

All I ever see from you is negative, condescending, belittling one-upmanship.

Have you ever made a positive contribution here? If you have, I must've missed that one post.

I am currently installing two E100s on two £150,000 machine tools... wanna see evidence?

Phil Boyce has pic's as I am keeping him informed.


 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 3661
Posted: 10:24pm 19 Apr 2019
Copy link to clipboard 
Print this post

With your attitude I'm leaving this for you to own.

I currently stick to open source (not in the odd MMBasic meaning) tools.

You may not know I pushed for the STM32 versions of MMBasic (despite them not being fully open source).

JohnEdited by JohnS 2019-04-21
 
Tinine
Guru

Joined: 30/03/2016
Location: United Kingdom
Posts: 1646
Posted: 10:51pm 19 Apr 2019
Copy link to clipboard 
Print this post

Yeah, I figured... can't give me a single example of something positive.

Remember the time I asked how much memory would be available with the Picromite and you had to jump in with "probably as much as you want, how much do you need"...like it was a stupid question?

As it turned out, Pete didn't change the memory model did he?

And you wanna talk "attitude"?
You need to read your posts.

Others may tolerate your cr@p... I won't!
 
tomxp411
Newbie

Joined: 04/04/2019
Location: United States
Posts: 24
Posted: 05:07am 20 Apr 2019
Copy link to clipboard 
Print this post

  lizby said   I admit to confusion about what is being sought here. If it's "a PC based MMBASIC simulator", there's mmbasic for DOS. I do think it would be nice if DOS mmbasic supported some sort of PC graphics window, but I'd question whether there would be enough demand to justify the effort it would take.


I actually tried to compile MMBASIC on Windows 10, and there were a lot of issues, mostly the use of older APIs that aren't really supported on Windows 10 and Visual Studio 2019.

So yes, I basically want to build an MMBASIC, Quick BASIC, and PC-BASIC environment for modern computers - something that looks and acts much like turning on a computer from the 80s, but with the power of a modern system behind it.

Why DotNet? I haven't found a programming language that will do everything I need, aside from C# and VB.Net.

Transcoding to Python is actually simple, and I have already prototyped this thing using a Python script... but Python doesn't have a proper GOTO command, and so this won't work with older, line-numbered BASIC programs.


 
tomxp411
Newbie

Joined: 04/04/2019
Location: United States
Posts: 24
Posted: 05:14am 20 Apr 2019
Copy link to clipboard 
Print this post

  sawasdee01 said   Hi tomxp411,

I am not entirely sure whether this will help, as you seem to suggest a preference for full .net compatibility - but quite a few previous VB programmers now use B4J. Details can be found here:-

https://www.b4x.com/


Thanks. I see there's a desktop version... I'll take a look. I'm not real fond of the Java runtime, though, and if I have to include a JRE with compiled programs, I don't think it'll be my first choice.





 
tomxp411
Newbie

Joined: 04/04/2019
Location: United States
Posts: 24
Posted: 05:23am 20 Apr 2019
Copy link to clipboard 
Print this post

  JohnS said   Tying into .Net/mono would put me off, and ruling out C & C++ also would but if those are what's wanted then (other than surprise at the choices) go ahead.


Mostly, it's what I know. I could do this in C++, but it would take longer, since I'd be doing a lot of work from the ground up, rather than leveraging stuff I already know and tools I've already written.

 
tomxp411
Newbie

Joined: 04/04/2019
Location: United States
Posts: 24
Posted: 05:35am 20 Apr 2019
Copy link to clipboard 
Print this post

  sawasdee01 said  I suspect that a lot will hinge on compatibility with the 'existing runtime' that you mention in your email.
[/quote]

I've written a terminal emulator that provides ANSI support, and I'd be using the CRT code for the first phase of this program's development. In fact, I'm already running the parser and immediate mode interface using the emulator.

Once I have the scripting engine working, I plan to go back and port my terminal to use SDL as the graphics engine.

[quote]If your aim is to make a PC based MMBASIC simulator, for use (for instance) by game developers, I wonder whether there isn't a way that cuts out the need for a second stage of compilation via a C# or VB compiler?


There is, but I'm not ready to write a compiler (I coould, but I just don't have the time.). And an interpreter doesn't meet my needs - to be able to create a final program that can be exported as an EXE file.


Edited by tomxp411 2019-04-21
 
Turbo46

Guru

Joined: 24/12/2017
Location: Australia
Posts: 1593
Posted: 08:32am 20 Apr 2019
Copy link to clipboard 
Print this post

Firstly, I should say that what you are proposing is a bit beyond me - but...

If I can write programs in MMBasic and compile them to a Windows .exe file then I am certainly interested.

As I see it, the intermediate program format doesn't concern me. I can imagine that some will want to take that and modify it. Given that, I would have thought that VB would be easier to do and so would be a logical first step.

I'm not concerned with line numbers either. I know that some forum members still like to use them though. TassyJim's excellent MMEdit can remove line numbers if that is necessary.

When you are talking about skipping MMBASIC 4.5 - do you mean to wait for Geoff to release MMBasic 5 for the Colour Maximite?

Bill
Keep safe. Live long and prosper.
 
     Page 1 of 2    
Print this page
© JAQ Software 2024