Event Driven Scripting Language For Embedded Systems.


ACMEBasic is a resident interpreter and p-code compiler designed for the embedded market.

The interpreter core is written in ANSI C for portability and can be compiled for any platform, or on a host system for a simulator or to generate p-code for direct import.

The core supports all the traditional Basic commands like Print, Let, If, For, GoSub, etc, all the traditional Basic functions like Mid, Left, Hex, etc. along with a powerfull OnEvent command to create totaly event driven solutions. A multi-threaded version is available for concurrent execution of multiple Basic threads.

If the target has some form of character I/O (including Telnet) the core also supports immediate mode execution along with both a single line and a full screen editor for online program development and complete online help for all commands and functions.

The language syntax supports 5 Data Types , character, integer, long, floating point, character strings, and arrays of these data types. Variable names may be of any length but only the first 16 characters are significant. The core can be compiled for strict or loose typing. Loose typing will provide automatic promotion/demotion for all data types including floating point and strings.

The expression analyzer is fully prioritized, supports parenthesized expressions with left to right associtivity for all Arithmetic and Logical operators and right to left associtivity for assignment.

The symbol table is well structured and can easily be expanded to add functions for a particular platform's unique hardware or runtime libraries like parallel and serial I/O, Displays, TCP/IP, USB, I2C, SPI, ModBus, CanBus, OBDII etc.

ACMEBasic has been ported to several stand alone platforms, including Rabbit Semiconductor R3000 and R4000, Lantronix XPORT, Microchip 24F and 34F series processors, and several operating systems including Linux i38-ARM-MIPS, XP/XPEmbedded and DOS.

Measured performance for p-code execution on an 50Mhz Rabbit 8-bit processor is over 5,000 statements a second, 200Mhz P-Pro or ARM9 is over 50,000 statements a second, 2.3Ghz P-4 is over 500,000 statements a second.

This is a code example to do a simple web page dump out a serial port using an event for data reception.

Main:
 'open serial port and socket
 If SerOpen(1,115200) < 0 Then Error:  
 If SocOpen(1,"www.acmesi.com",80) < 0 Then Error: 
 'set an event for data available on the socket
 OnEvent SocStatus(1), ReadSocket:
 'build an http1.1 request
 Get$="GET /index.html HTTP/1.1" + CRLF(1) + "Host: www.acmesi.com" + CRLF(2)
 SocTx(1,Get$) 'send it
 Sleep 'loop doing nothing
 End
ReadSocket:
 SocRx(1,Data$) 'read from socket
 SerTx(1,Data$) 'write to serial port
 Return
Error:
 ? LastError(Error$) 'get and print the last error string
End

This picture shows a Rabbit 4000 running ACMEBasic, that is also directly generating video and has a PS2 Keyboard attached providing a total stand alone solution.

For more information concerning a demonstration of ACMEBasic
or licensing information please contact
Dave August at ACME Software
august@acmesi.com
831-372-3277