Hendrik van Rooyen wrote: > "Stef Mientki" <[EMAIL PROTECTED]> wrote: > >> I use Python as a replacement for MatLab, >> and intend to use it as replacement for Delphi, AutoIt, PHP, VB. >> And I'ld love to use it as a replacement for micro controller programming. > > If you have a little sub - 64k micro this is not really practical. > > What we have done is to define a limited virtual machine with > a simple "assembler" language and used Python to write the > "compiler" for it. > > Then you have to write the interpreter for the virtual machine > in the native micro's code - Either using C or assembler, and > you are away from the hardware, into a useful layer of abstraction. > > ... well sort of - in such a small thing, you are never really far from > the hardware, as that is what its supposed to be controlling - but > what it definitely buys you is that your apps written in your special > language become portable between disparate processors like say > an ARM at the upper end and an 8031/8051 at the lower... > > Such "interpreters" are surprisingly little code, and they work > well - faster than what one would expect. - often outperforming > C code that does pass by value... > > - Hendrik > hello Hendrik,
I use even smaller micro controllers (PIC) and as I'm just writing a functional simulator for it in Python, (see http://oase.uci.kun.nl/~mientki/data_www/pic/jalcc/python/jal_simulation.html and even a small movie: (600 kB) http://oase.uci.ru.nl/~mientki/download/jal_simulator1.htm I would love to see your code, not directly to use it (I want JAL), but it might give me some good ideas. cheers, Stef Mientki -- http://mail.python.org/mailman/listinfo/python-list