z80 vs Python

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

  1. Janusz U.

    Janusz U. Guest

    Hello!

    I have an idea that implements the Python interpreter for z80 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'm waiting for the opinion.

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

  2. Janusz U.

    Janusz U. Guest

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

    thx
    Janusz U.

    > If you stick with the Z80 though, you've got quite a challenge ahead of
    > you - good luck! If you succeed, you'll be sure to make hackers of Game
    > Boys, TI-83s, and TRS-80s everywhere deliriously happy.
    >
     
    Janusz U., Jun 24, 2004
    #2
    1. Advertising

  3. > I have an idea that implements the Python interpreter for z80 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.

    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.

    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.

    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).

    If you stick with the Z80 though, you've got quite a challenge ahead of
    you - good luck! If you succeed, you'll be sure to make hackers of Game
    Boys, TI-83s, and TRS-80s everywhere deliriously happy.
     
    Christopher T King, Jun 24, 2004
    #3
  4. Personally, if I had the time, I'd try porting python to a gumstix
    board:

    http://www.gumstix.com/

    It probably wouldn't be too hard, but still, it'd be fun to get it
    onto that tiny board. :)




    "Janusz U." <> wrote in message news:<cbetoc$ljp$>...
    > > 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.
    >
    > thx
    > Janusz U.
    >
    > > If you stick with the Z80 though, you've got quite a challenge ahead of
    > > you - good luck! If you succeed, you'll be sure to make hackers of Game
    > > Boys, TI-83s, and TRS-80s everywhere deliriously happy.
    > >
     
    Corey Coughlin, Jun 25, 2004
    #4
  5. On 24 Jun 2004 16:36:09 -0700, Corey Coughlin <>
    wrote:

    > Personally, if I had the time, I'd try porting python to a gumstix
    > board:
    >
    > http://www.gumstix.com/
    >
    > It probably wouldn't be too hard, but still, it'd be fun to get it
    > onto that tiny board. :)


    That board is incredible !

    Is the "special" 286 processor on it 32-bit or 16-bit like the old 286
    was ?
    I guess you can't run Linux on a 16 bit so it must be 32...

    And the price is so small !
     
    =?iso-8859-15?Q?Pierre-Fr=E9d=E9ric_Caillaud?=, Jun 25, 2004
    #5
  6. Janusz U.

    Phil Frost Guest

    Actually, the 286 is essentially a 32 bit processor. It has most of the
    features of the 386, only many of the control structures such as the GDT
    are different, as well as the memory bus.

    On Fri, Jun 25, 2004 at 08:43:44AM +0200, Pierre-Fr?d?ric Caillaud wrote:
    > On 24 Jun 2004 16:36:09 -0700, Corey Coughlin <>
    > wrote:
    >
    > >Personally, if I had the time, I'd try porting python to a gumstix
    > >board:
    > >
    > >http://www.gumstix.com/
    > >
    > >It probably wouldn't be too hard, but still, it'd be fun to get it
    > >onto that tiny board. :)

    >
    > That board is incredible !
    >
    > Is the "special" 286 processor on it 32-bit or 16-bit like the old
    > 286 was ?
    > I guess you can't run Linux on a 16 bit so it must be 32...
    >
    > And the price is so small !
     
    Phil Frost, Jun 25, 2004
    #6
  7. Janusz U.

    Paul Boddie Guest

    Pierre-Frédéric Caillaud <> wrote in message news:<opr940y6ls1v4ijd@musicbox>...
    > On 24 Jun 2004 16:36:09 -0700, Corey Coughlin <>
    > wrote:
    >
    > > http://www.gumstix.com/


    [...]

    > Is the "special" 286 processor on it 32-bit or 16-bit like the old 286 was ?


    On the gumstix board? It's an XScale processor, meaning that it has a
    32-bit ARM architecture, although I don't follow the exact twists and
    turns of the different ARM architectures these days, so I may be
    simplifying there somewhat.

    Paul
     
    Paul Boddie, Jun 25, 2004
    #7
  8. Janusz U.

    Janusz U. Guest

    Uzytkownik "Phil Frost" <> napisal w wiadomosci
    news:...
    > Actually, the 286 is essentially a 32 bit processor. It has most of the
    > features of the 386, only many of the control structures such as the GDT
    > are different, as well as the memory bus.


    but '86 is not compatible with Z80 (only little in hardware part - buses)

    The best RGS
    Janusz
     
    Janusz U., Jun 25, 2004
    #8
  9. On 2004-06-25, Pierre-Frédéric Caillaud <> wrote:

    >> http://www.gumstix.com/
    >>
    >> It probably wouldn't be too hard, but still, it'd be fun to get it
    >> onto that tiny board. :)

    >
    > That board is incredible !
    >
    > Is the "special" 286 processor on it 32-bit or 16-bit like the old
    > 286 was ? I guess you can't run Linux on a 16 bit so it must be 32...


    There is a "16-bit" version of Linux called ELKS that runs on 8086 class CPUs.

    --
    Grant Edwards grante Yow! Yow! I just went
    at below the poverty line!
    visi.com
     
    Grant Edwards, Jun 25, 2004
    #9
  10. Oh, it's not a 286 processor, it's a Intel XScale® PXA255, which is a
    full 32 bit ARM architecture. Basically, it's the same processor you
    find in a lot of PocketPC PDAs. So it's not x86 compatible, but there
    are plenty of linux versions (full 32 bit) around for it. Although
    the memory constraints require you to scale things down a little. It
    looks like they're taking the processor and adding the minimum support
    chips to keep the board small.

    It's kind of a shame in some ways, what I'd really like to see is
    something using the new multicore ARM, so that you could go for a
    massive multiprocessor architecture with the lowest possible power.
    And a higher speed interface, like PCI, so you could gang them
    together to a normal pc, kind of like the clearspeed processor
    (www.clearspeed.com). Then you could really start looking at massive
    computing power on the desktop at low power. Not that I really need
    it or anything, but still, could be fun.


    Pierre-Frédéric Caillaud <> wrote in message news:<opr940y6ls1v4ijd@musicbox>...
    > On 24 Jun 2004 16:36:09 -0700, Corey Coughlin <>
    > wrote:
    >
    > > Personally, if I had the time, I'd try porting python to a gumstix
    > > board:
    > >
    > > http://www.gumstix.com/
    > >
    > > It probably wouldn't be too hard, but still, it'd be fun to get it
    > > onto that tiny board. :)

    >
    > That board is incredible !
    >
    > Is the "special" 286 processor on it 32-bit or 16-bit like the old 286
    > was ?
    > I guess you can't run Linux on a 16 bit so it must be 32...
    >
    > And the price is so small !
     
    Corey Coughlin, Jun 25, 2004
    #10
  11. Janusz U.

    Paul Rubin Guest

    Phil Frost <> writes:
    > Actually, the 286 is essentially a 32 bit processor. It has most of the
    > features of the 386, only many of the control structures such as the GDT
    > are different, as well as the memory bus.


    Huh? The 286 has memory protection and 386-like segment descriptors,
    but it's a 16 bit processor through and through. It has a 16-bit ALU
    with 16-bit registers, and addresses within a segment are 16 bits.
    Yes, there were versions of Unix that ran on it, which isn't too
    surprising given Unix's origins in the 16-bit PDP-11 world. I'm not
    aware of a Linux port to it, unless you mean something like ucLinux.
     
    Paul Rubin, Jun 25, 2004
    #11
  12. On 2004-06-25, Paul Rubin <> wrote:
    > Phil Frost <> writes:
    >> Actually, the 286 is essentially a 32 bit processor. It has most of the
    >> features of the 386, only many of the control structures such as the GDT
    >> are different, as well as the memory bus.

    >
    > Huh? The 286 has memory protection and 386-like segment descriptors,
    > but it's a 16 bit processor through and through. It has a 16-bit ALU
    > with 16-bit registers, and addresses within a segment are 16 bits.


    Definitely. The basic ALU architecture was carried over
    directly from the 8086. The 80286 just had some extra
    memory-protection and segmentation features along with some
    user/supervisor stuff.

    > Yes, there were versions of Unix that ran on it, which isn't too
    > surprising given Unix's origins in the 16-bit PDP-11 world.


    I ran Coherent (a v7 clone) on a '286 for a while. Each
    process was limited to 64K data and 64K text space because of
    the CPU's 16-bit architecture.

    > I'm not aware of a Linux port to it, unless you mean something
    > like ucLinux.


    IIRC ucLinux is still 32-bit and uses gcc (hence no 8086 port).
    ELKS, OTOH, runs on the 8086.

    --
    Grant Edwards grante Yow! .. are the STEWED
    at PRUNES still in the HAIR
    visi.com DRYER?
     
    Grant Edwards, Jun 25, 2004
    #12
    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. Janusz U.
    Replies:
    6
    Views:
    424
    Peter Hansen
    Jun 26, 2004
  2. Replies:
    0
    Views:
    770
  3. Paul Moore
    Replies:
    0
    Views:
    654
    Paul Moore
    Mar 1, 2008
  4. Martin v. Löwis
    Replies:
    0
    Views:
    691
    Martin v. Löwis
    Mar 1, 2008
  5. Senthil Kumaran
    Replies:
    0
    Views:
    600
    Senthil Kumaran
    Jan 17, 2011
Loading...

Share This Page