// ---- Constant string
const string cHelloWorld = "Hello World!\n";
// ---- Working memory, simulates CPU memory
ubyte memory
{
// Memory array variable
sHelloWorld[16]
};
uint:4 i;
// ----- ARDUINO setup() function
setup()
{
// Copy constant string to memory
i = 0;
while(cHelloWorld[i] != 0 )
{
sHelloWorld[i] = cHelloWorld[i];
i++;
}
return;
}
// ----- ARDUINO loop() function
loop()
{
// Type any char to start
// Single step loop
while(!istrig(stdin)) {};
// Call stdio puts() as in C++
call puts(sHelloWorld);
// As for Arduino, loops forever
}