Introduction
Note that this page has been updated with the introduction of BV-Basic version 2. For the original page see here
The language is based on standard BASIC but without line numbers. It is fully interactive in that you can enter variables and calculations and get results back immediately (interpreted). Programs can also be loaded into RAM or Flash and run from there.
The basic unit of a program is a function and programs can be built from the ground up using ‘function’, each one having a different function.
As an example hello world may look like:
print “Hello World”
endf
To run the program simply type ‘hello’ at the console.
A function may or may not return a value and programs are made up of functions that can be loaded from a PC or from an SD Card into either RAM or Flash.
Language
Syntax
In general the language follows conventional BASIC as found in other variants. There are some minor and some notable exceptions. One notable exception is the comments statement which is ‘//’ rather than the more conventional REM or single quote. The single quote has been reserved for defining characters, i.e. ‘a’.
The second notable exception is that ALL statements (keywords or commands like ‘print’) are in lower case and the language is case sensitive, so ‘print’ is a valid keyword and ‘Print’ is not and will produce an error. The same goes for variables, as$, As$, AS$ are three different variables.
The language is extendable in that writing a function is tantamount to creating a new keyword. These can be stored in flash and the built in searching algorithms will find them and so the user defined function can be used exactly like a keyword. This actually is quite important when dealing with microcontrollers as it is not always possible to provide a keyword for every register configuration.
All functions return a value but this can be ignored, as a
general rule keywords and functions with a bracket will return a value
those without will not.
print “hello”, a$
Print does not have a bracket but:
j=len(a$)
The keyword ‘len’ does return a value and so it has brackets. In this
case a value is inside the brackets, even where there is no parameter
brackets are used to indicate that there is a returned value, e.g.
ferror().
Reloading the PIC32-Basic Application
The BV-Basic application can be reloaded at any time very easily using the COM port. A typical scenario would be to save a continuous loop to flash and then run it with auto, the only way out of this is to re-install the application (BV-Basic), this is how to do it.
The file to use will be found in the downloads section and will have a (.bin) extension. This text refers to BV-Basic 2.xx and above for earlier version see the archived page here.
Setp 1
Press the reset icon
and within half a second press the backslash '\' key on the keyboard. This will take you
into the Application Loader menu

Step 2
Select option c by pressing c, this will erase sufficient flash for the
application (PIC32-Basic) to sit in. It will then wait for an xmodem
transfer by continually sending 'C'
Options a through d have only been provided for speed, as the erase process takes a finite amount of time there is no point in erasing all of the flash if its not needed, although there would be no harm done in doing this.
Step 3
Open the xmodem transfer
dialog and select the PIC32-Basic binary file found in the downloads section. It
is assumed that you have saved it to a convenient place on the local drive.

Step 4
When the transfer has completed, the dialog will close automatically if
the 'Close on transfer complete' box has been ticked, if not close
manually and you will be taken to the BV-Basic sign on screen, if not press
reset.