Python architectural similarity th ZBasic/VM

This forum is for posts that might be considered off-topic but that may be useful or interesting to members. Examples include posts about electronics or programming in general, other microcontrollers or interesting devices, useful websites, etc.
Post Reply
stevech
Posts: 715
Joined: 22 February 2006, 20:56 PM

Python architectural similarity th ZBasic/VM

Post 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.
Post Reply