eZ80 - correction [z80 vs Python thread]

Discussion in 'Python' started by Janusz U., Jun 24, 2004.

  1. Janusz U.

    Janusz U. Guest

    I have an idea that implements the Python interpreter for eZ80 as an
    universal flexible language (like scripts) to support attached hardware.
    What would it be shortest way to do it?
    I think of course about C (Zilog has good support of own products...).

    > I wouldn't recommend this. The standard Python interpreter is quite hefty
    > (>700K dynamically linked), not to mention the standard libraries. Seeing
    > as Z80 has only 64K address space, I don't see a full implementation as
    > possible.


    I know. Sorry, I didn't precise. I thought exactly about eZ80F91 - it's
    based on Z80 but much more expanded... I will start on the module (and
    deviloper kit) for that procesor. It would be independent platform for
    tests software in the Python.

    > What you /could/ do would be to implement a (very) small subset of Python;
    > i.e. leave out generators, new-style class, list comprehensions, ability
    > to override built-in types, functions, and operators, and most of the
    > standard library, then you /might/ be able to fit a language with Pythonic
    > syntax in that address space.


    I think to expand language by own library for Python - eg. control GPIO of
    eZ80, read

    >
    > Another issue would be speed. Z80s, though they've gotten faster over the
    > years, still only run at speeds on the order of 10MHz. You might be better
    > off writing a Z80 compiler for a Python-esque language -- this would save
    > both speed and memory.


    speed 50MHz (or 20MHz in F92, F93...)

    >
    > If you can pick a different chip, go with something like a StrongARM.
    > These have the power and address space necessary for Python. Plus, it's
    > been done before (Python runs beautifully on modern PDAs).


    I have just bought the developer kit for eZ80 so I have limited way. I'd be
    happy to run Python on eZ80 platform.

    I'm waiting for the opinion.

    The best regards
    Janusz U.
    Janusz U., Jun 24, 2004
    #1
    1. Advertising

  2. Perhaps you could look at the pippy project which is python on a PDA. They will
    have had to shrink python down, maybe you could use that as a starting point.
    Peter Hickman, Jun 24, 2004
    #2
    1. Advertising

  3. Why not start from Stackless Python and thus have a multithreaded
    language which is well suited to automata on your uc ?

    Python won't do threads on your Z80 because it relies on the OS, and you
    have no OS...
    Stackless has threadlets which use little memory (you need that) !


    On Thu, 24 Jun 2004 17:29:21 +0100, Peter Hickman <>
    wrote:

    > Perhaps you could look at the pippy project which is python on a PDA.
    > They will have had to shrink python down, maybe you could use that as a
    > starting point.




    --
    Using Opera's revolutionary e-mail client: http://www.opera.com/m2/
    =?iso-8859-15?Q?Pierre-Fr=E9d=E9ric_Caillaud?=, Jun 25, 2004
    #3
  4. Janusz U.

    Janusz U. Guest

    > Why not start from Stackless Python and thus have a multithreaded
    > language which is well suited to automata on your uc ?


    thanks, I'll try.

    > Python won't do threads on your Z80 because it relies on the OS, and you
    > have no OS...
    > Stackless has threadlets which use little memory (you need that) !


    Yes, I think it maybe critical in final application.

    > > Perhaps you could look at the pippy project which is python on a PDA.
    > > They will have had to shrink python down, maybe you could use that as a
    > > starting point.


    I'll compare that. eZ80 has sometimes implemented OS like linux kernel but
    I'm afraid I don't use it.

    thx again
    Janusz
    Janusz U., Jun 25, 2004
    #4
  5. Janusz U.

    Paul Rubin Guest

    "Janusz U." <> writes:
    > I have an idea that implements the Python interpreter for eZ80 as an
    > universal flexible language (like scripts) to support attached hardware.
    > What would it be shortest way to do it?
    > I think of course about C (Zilog has good support of own products...).


    I think Python is too large a language for such a small processor.
    Among embedded developers, FORTH is a favorite script language since
    implementations can be extremely compact and efficient. There are
    several Z80 implementations already existing. Programming in Forth is
    pain compared to Python though, in my opinion.

    To horrify Python and Forth fans simultaneously, I once implemented
    Forth in Python, where every Forth word compiled to a Python function
    closure. But on a Z80 you wouldn't do anything like that.
    Paul Rubin, Jun 25, 2004
    #5
  6. Janusz U.

    Janusz U. Guest

    > I think Python is too large a language for such a small processor.

    I know that Z80 or eZ80 aren't so powerfull like other 32-bit processors.
    But eZ80 can have eg. 1MB flash memory and 512kB RAM (it has 16MB memory/IO
    space!). Speed in my application isn't critical.

    > Among embedded developers, FORTH is a favorite script language since
    > implementations can be extremely compact and efficient. There are
    > several Z80 implementations already existing. Programming in Forth is
    > pain compared to Python though, in my opinion.

    thx, but I think about future - compatibility... (Puthon supports a lot of
    platforms)

    Janusz
    Janusz U., Jun 26, 2004
    #6
  7. Janusz U.

    Peter Hansen Guest

    Janusz U. wrote:

    >>I think Python is too large a language for such a small processor.

    >
    > I know that Z80 or eZ80 aren't so powerfull like other 32-bit processors.
    > But eZ80 can have eg. 1MB flash memory and 512kB RAM (it has 16MB memory/IO
    > space!). Speed in my application isn't critical.


    One megabyte, eh? Python will _fill_ that up nicely. ;-)

    (Actually, we were able to get a limited form down to a few hundred
    kilobytes on an embedded device. Testing showed, however, that
    even if speed wasn't critical, Python's speed _can_ be too slow
    for certain older hardware and we gave it up. For reference, it
    was a 33MHz 386-compatible processor...)

    -Peter
    Peter Hansen, Jun 26, 2004
    #7
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. ALuPin
    Replies:
    8
    Views:
    619
    Marcus Harnisch
    Apr 6, 2004
  2. reddy

    CRC Error CORRECTION

    reddy, Apr 21, 2004, in forum: VHDL
    Replies:
    14
    Views:
    12,179
    fauji86
    Mar 3, 2010
  3. Replies:
    4
    Views:
    646
    Uncle Noah
    Mar 22, 2006
  4. Janusz U.

    z80 vs Python

    Janusz U., Jun 24, 2004, in forum: Python
    Replies:
    11
    Views:
    893
    Grant Edwards
    Jun 25, 2004
  5. Georg Brandl

    Correction: Python Bug Day on April 25

    Georg Brandl, Apr 15, 2009, in forum: Python
    Replies:
    0
    Views:
    194
    Georg Brandl
    Apr 15, 2009
Loading...

Share This Page