ARMbasic is a compiler included in a family of modules using the ARM CPU from Coridium Corp. The compiler runs on the ARM processor for the ARMweb products or on the PC for the other ARM products.
ARMbasic has a syntax generally compatible with Visual BASIC,
ARMbasic is written in ANSI C, compiled with GCC.
There's no question that some problems require more complex languages. But many control problems are quite simple and this is what ARMbasic exceeds at. In many cases ARMbasic will run faster than a compiled C program. How is that possible, you ask? The answer is that ARMbasic has only global scope, there is no stack frame in the majority of the user code. Control transfers are faster than procedure calls of C or Java. ARMbasic is a compromise of speed and code size, but it compares favorably to programs written in C.
The fastest loops use the WHILE ... LOOP, with a simple loop running 7 million iterations per second.
Loops take a number of instructions to execute, when running simple instructions such as X= X+1, it will run at speeds exceeding 13 million lines per second.
ARMbasic does not support Object Oriented Programming.
Floating Point Math
Why have any of the compiler on the ARM?
The original ARMexpress had the compiler completely on the ARM, and this was the heritage of where the compiler came from and why it came into existence. But the intention was always to have an ARMweb product, and for that product to support adding ARMbasic statements into a web page that are executed on the fly. The only reasonable way to do that was to be able to compile those statements at runtime during page service, and that means the compiler has to live at least on the ARMweb.
The 2103 group of products uses a very small ARM memory chip, so the runtime and hardware libraries that are used by the ARMbasic are all that is included there.
Another side-effect of the compiler being on chip, is that it had to be small, and the smallest compilers are of the recursive-decent type, which includes the ARMbasic compiler. What this means is that the syntax of the language is included in the source of the compiler parser. An advantage of these compilers is the size and normally they are also pretty fast. Some of the bad things are you can break the compiler with some odd coding styles. As there is a stack being used for parsing, you can make that overflow with statements that cause a lot of recursion like-
x = ((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((1))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
But why would you need to write any code like that? Another "feature" of recursive decent compilers is that error recovery can be poor. The way we chose to do this is to have any error reset the parser to the "outermost" state. What this means is that if an error occurs inside a loop like
x x =2
y = 3
will cause an error on the LOOP statement as well as the x x = 2 statement, as the loop has been broken as the parser returns to the outermost state. Yes this causes errors on good statements, but its a prudent choice from our perspective. You don't want the compiler guessing what you meant and correcting your code (I believe PL1 tried that to comical results).
Coridium Corporation is aimed to produce high performance modules based on the latest technologies. Currently this includes the ARM processor. But Coridium also has the engineering resources to customize our designs for the specific needs of our OEM customers. This may include an interface to a specific peripheral chip with language extensions added to the ARMbasic. It may also include an FPGA solution to extend the capabilities of both the hardware and software.
So if you need something special, but want the ease of use of ARMbasic , tell us about your application. We are quick to respond, and have designed a custom hardware software combination that delivered prototypes in a couple of weeks, and production volumes within a month.
What volumes make sense for customization? It depends on the complexity, but at a few hundred units the numbers begin to pencil out.