I’m out. ![]()
check my earlier posting
http://www.stm32duino.com/viewtopic.php … 745#p14745
It contains a brief list of mods to get it all going.
<….>
It contains a brief list of mods to get it all going.
Other than as a diversion and a few special use-cases, BASIC is as dead as a rock… terrestrial rock or moon-stone or Martian rock… It’s dead. The paradigm simply does not fit into modern computing – in fact, IMO the teaching of BASIC should be banned because it promotes poor logic practices and awkward constructs.
The issue is all “good old” Basics are written in asm of the respective cpu/mcus. The Basics written in C usually require a lot of RAM and are slow.
Of course there are “not good practices” related to work with a Basic – spaghetti code, goto, try-and-error way of development, etc.
Indeed I would be happy to have something like the Intel’s 8052AH Basic running on today’s mcus..
BTW, I still posses a 3.5in diskette copied in 1992 with its asm source..
The issue is all “good old” Basics are written in asm of the respective cpu/mcus. The Basics written in C usually require a lot of RAM.
<…>
https://github.com/paladin-t/my_basic
I compiled it for pic32mx, it worked, a bit ram hungry and not extremely fast. But maybe it would have been fine-tuned since then.
@Ray – Basically you are right. What I do like with this gadgets is: they are standalone systems (no IDE needed, only a serial terminal connected). The Forth standalone gadgets are nice too, but the sources are not readable (write only language
). So the Basic is the closest alternative when talking simple prototyping standalone embedded mcu systems without a need for any IDE..
Really?
zoomx wrote:
There exist programs and online services that translate between VB.Net and C#, they are not perfect but demonstrates that today they are interchangeable.
I’m a MSCE (was, retired) but VB.Netreally is not BASIC. Just because Microsoft calls it BASIC does not mean that it is… the last “real’ basic Microsoft wrote was QBASIC.
MBASIC (BASIC-80) ===> GW-BASIC ===> QuickBASIC ===> QBASIC
Even QuickBASIC/QBASIC is ‘iffy’ because it broke new ground by not requiring line numbers and adding some control structures.
Visual Basic and VB.Net are like Arduino code … they are a front-facing facade. Just because Microsoft elected to call ’em BASIC does not make them so. One could sit down for a weekend fun play and rework/rename most of the Arduino commands to make it appear as BASIC… but that does not make it BASIC.
I made a lots of money on BASIC from the mid-70’s until the mid-90’s. One can do great things in BASIC, but one can screw up just as bad in BASIC as they can in C++. But BASIC is simply not the right 1st language for anyone. It is OK to play around with on old PC’s, Apple II, etc. But other than to load an old game tape from the cassette recorder, it is not a language that is moving forward. Whatever Microsoft has produced with VB.Net is not BASIC.
HTML5, Javascript, C++, and a long, long list of other event driven paradigms are the future of languages. Accept it. LUA (I do not use) is suppose to be a nice interpreter and Nick Gammon is very big on this language.
Ray
Really?
The B4R IDE converts a Structured BASIC program and converts it to C++ before compiling it using the arduino. They have similar products for IOS and Android. This means using one language you can write programs for PI, Arduino , iphone Android etc.
There is no real reason that code written in B4R should be much bigger than native android code, other than things like strings which may not convert into the same TYPES.
The IDE has intelisence and leaves the arduino IDE for dead. When it converts the source to C it annotates the c with the basic source for basic debugging. By default it uses the upload serial port as a logger for debugging which is what most beginners seem to do to figure out what there code is doing inside the MCU.
Example B4r
Sub Process_Globals
Public Serial1 As Serial
Private Timer1 As Timer
Private pin13 As Pin
End Sub
Private Sub AppStart
Serial1.Initialize(115200)
Log("AppStart")
pin13.Initialize(13, pin13.MODE_OUTPUT)
Timer1.Initialize("Timer1_Tick", 1000) '1000ms = 1 second
Timer1.Enabled = True
End Sub
Private Sub Timer1_Tick
Dim currentState As Boolean = pin13.DigitalRead
Log("CurrentState: ", currentState)
Dim NewState As Boolean = Not(currentState)
Log("NewState: ", NewState)
pin13.DigitalWrite(NewState)
End Sub
<…>
The B4R IDE converts a Structured BASIC program and converts it to C++ before compiling it using the arduino.
My opinion, if you are going to work in some pseudo language that spits out C++, just learn C++. For goodness sakes: do not learn C++ from studying what a translator spits out!
Ray

