Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask

Re: 6502 Perl

by afoken (Canon)
on Dec 11, 2019 at 22:02 UTC ( #11110000=note: print w/replies, xml ) Need Help??

in reply to 6502 Perl

Do you know Lua? Not quite Perl, but usable, and written entirely in C. Small enough to run on an 8 bit AVR microcontroller. So it should be possible to run on a C64 or similar.

Other ideas:

  • Forth, used for Open Firmware (a.k.a. OpenBoot) in Sun, Apple, IBM, various ARM systems
  • MUMPS, originally designed to run on 1960s hardware. It is a very compact, yet very powerful combination of language interpreter, database, and multi-user, multi-tasking operating system. Learning all of MUMPS takes no more that 10 days if you know Perl, expect to write your first non-hello-world program end the end of day 1. Some of my postings contain example MUMPS code.


Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)

Replies are listed 'Best First'.
Re^2: 6502 Perl
by RMGir (Prior) on Dec 12, 2019 at 14:47 UTC
    I agree that FORTH would likely be doable (and maybe even almost easy).

    I wonder if you could squeeze sed or awk into such a tiny footprint?

    Doubtful, I guess, since both are pretty well tied to regex engines.

      I very successfully built a "truly-compiled FORTH" on a 6502 machine it actually generated subroutines and I know that there were several TIL-based dialects for it also. Although the 6502 had some rather unique addressing capabilities, the fact that it only had three CPU registers and that two of them were only for addressing meant that it usually took quite a few more instructions to do things vs. other chips like the Z-80. Not what you want when you've only got 64K.
        The 6502 had a zero page addressing mode for the first 256 bytes. One could use this space as pseudo registers.

        An MMU switching between 64k memory blocks would need to preserve them "globally" to allow data transfer.

        This wouldn't be very fast and only a reasonable approach for a MacGyver scenario.

        Like if a strange natural disaster or God's will burnt all newer CPUs and miraculously spared only the 6502s family orf processors ;-)

        Cheers Rolf
        (addicted to the Perl Programming Language :)
        Wikisyntax for the Monastery FootballPerl is like chess, only without the dice

Re^2: 6502 Perl
by LanX (Archbishop) on Dec 14, 2019 at 02:46 UTC

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://11110000]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (4)
As of 2020-06-01 23:08 GMT
Find Nodes?
    Voting Booth?
    Do you really want to know if there is extraterrestrial life?

    Results (12 votes). Check out past polls.