Page 1 of 1

Python architectural similarity th ZBasic/VM

Posted: 08 January 2013, 15:00 PM
by stevech
I've been developing a large and complex application in Python last couple of months. Runs on an ARM processor that uses, rather than Linux, a smaller OS called Net+OS. This OS has no GUI and is an RTOS. So it's somewhat like FreeRTOS for megabyte ARMs, with memory management.

The curious thing (to me) is that the Python "compiler" parses out Python code and creates bytecode for a Python interpreter that runs in Net+OS. The python language is odd and frustrating at times (lacking a declaration of variables which hurts us typing-impaired types).

The interpreter is written in C. Ah ha.

But its support of tuples, lists, threads, etc. is nice. Also nice is that I develop for a windows PC target, with breakpoint-capable debugger. When this works, I just copy the source to the ARM platform and run it. It does, like javascript and, I suppose ZB's VM, have the risk of timing upsets of from the memory garbage collector. But I think I've coded to mainly avoid that.

The Java VM is much larger than the Python interpreter, hence JVM probably wouldn't fit on a 1MB or so ARM system.

Anyway - interesting.