BigEd wrote:
It's not so small that the runtime would fit in 64k, so the build of micropython would - if I understand correctly - need to be partitioned into bank-sized chunks with long calls between them:
Quote:
MicroPython is packed full of advanced features such as an interactive prompt, arbitrary precision integers, closures, list comprehension, generators, exception handling and more. Yet it is compact enough to fit and run within just 256k of code space and 16k of RAM.
If I read that correctly, then the run-time is 256KB - that's 256KB of compiled MicroPython, compiled into its bytecode. The run-time only needs 16KB of RAM to run, so 'HelloWorld" Will just be a handful of bytes on-top of that 256KB?
(Or is the run-time configurable as to just how much run-time you need?)
So the bytecode interpreter/VM still needs to be written and that will need to "linearise" the RAM that the run-time library lives in along with the data - just in-case someone decides to calculate Pi using the arbitrary precision integers and starts with a 100,000 digit number...
In a way that's not much different to my BCPL system - the bytecode VM interpreter is 16KB of '816 ASM, it needs a few dozen bytes of zero (direct) page, but to run a BCPL program there is some 48KB of run-time libraries and the command line interpreter which is all compiled BCPL. MicroPython has much more though - list handling, long integers and so on and that's what's increasing the size of the run-time (I guess).
It's still do-able on an '816 with 512KB of RAM though. (Which my Ruby board has and maybe if I had any enthusiasm for Python I'd look at it, but I've not, so I won't)
-Gordon
_________________
--
Gordon Henderson.
See my
Ruby 6502 and 65816 SBC projects here:
https://projects.drogon.net/ruby/