Live data from Hacker News

6502 Language Implementation Approaches

dwheeler.com

1–10 of 27 posts

Re: 6502 Language Implementation Approaches

#4
I still find it to be an interesting intellectual challenge, even though it has no commercial use that I know of.

The huge volume of embedded cores based on a 6502 would disagree strongly --- I'm sure everyone has at one point used a 6502-based embedded system. They're everywhere in things like keyboards and mouses, LCD monitors (the MCU responsible for generating the OSD and such), and toys like the famous Tamagotchi and Furby, as well as keychain picture frames:

https://hackaday.com/2013/05/24/tamagotchi-rom-dump-and-reve...

https://news.ycombinator.com/item?id=17751599

http://spritesmods.com/?art=picframe

Also popular "not very good for HLL" architectures that yet have (subset of) C compilers for them include the 8051 and the Microchip PIC series.

Re: 6502 Language Implementation Approaches

#5
post #3

It's actually quite amazing that it's possible to run Lisp in 48k of RAM, but it is. http://www.flownet.com/ron/plisp.html

I used a Pascal on a BBC Micro which consisted of 2 16KB ROMS: one for the editor and one for the compiler. It would have maybe 32KB of RAM minus the screen memory (1KB to 20KB).

Re: 6502 Language Implementation Approaches

#6
post #3

It's actually quite amazing that it's possible to run Lisp in 48k of RAM, but it is. http://www.flownet.com/ron/plisp.html

Why do you find it incredible? It really depends on many features you want to implement. I had LISP in ROM on my BBC Micro. That was about 5.5K of code (6502) on the ROM plus some data. The machine had 32KB of RAM.

Re: 6502 Language Implementation Approaches

#7
post #6
post #3

It's actually quite amazing that it's possible to run Lisp in 48k of RAM, but it is. http://www.flownet.com/ron/plisp.html

Why do you find it incredible? It really depends on many features you want to implement. I had LISP in ROM on my BBC Micro. That was about 5.5K of code (6502) on the ROM plus some data. The machine had 32KB of RAM.

Incredible != Amazing.

Re: 6502 Language Implementation Approaches

#8
post #6
post #3

It's actually quite amazing that it's possible to run Lisp in 48k of RAM, but it is. http://www.flownet.com/ron/plisp.html

Why do you find it incredible? It really depends on many features you want to implement. I had LISP in ROM on my BBC Micro. That was about 5.5K of code (6502) on the ROM plus some data. The machine had 32KB of RAM.

Agreed, Lisp will work on small environments pretty well. For smaller-still systems I'd recommend FORTH as a good alternative - as discussed in the article itself.

Re: 6502 Language Implementation Approaches

#9
Apple Contributed Programs Volume 3 included "MICROLISP", written in AppleSoft BASIC by Ole Anderson.

    MICROLISP/16-JUN-78
    COPYRIGHT 1978 APPLE COMPUTER INC
    IT WILL TAKE APPROXIMATELY 1.5 MINUTES
    TO INITIALIZE THE ARRAYS.
    LIST ELEMENTS= 3634
Text AppleSoft BASIC source code: http://apple.rscott.org/tools/view.htm?crc=e7d8e947136190aa&...

DSK file: http://apple.rscott.org/tools/dldsk.htm?crc=e7d8e947136190aa

Documentation: https://archive.org/details/Apple_Software_Bank_Vol_3-5/page...

MicroLisp and other languages (including other Lisps, Logos, etc) are discussed in:

The Apple II Programmer's Catalog of Languages and Toolkits

http://apple2.org.za/gswv/a2zine/GS.WorldView/v1999/Feb/A2.N...

Re: 6502 Language Implementation Approaches

#10
post #3

It's actually quite amazing that it's possible to run Lisp in 48k of RAM, but it is. http://www.flownet.com/ron/plisp.html

http://history.siam.org/sup/Fox_1960_LISP.pdf:

”The current basic LISP system uses about 12,000 of the 32,000 memory of the IBM 704.”

The 704 was 36 bits, so that 12,000 was 54 kilobytes.

Speed-wise, the 704 had more and larger registers, but ran slower than a 6502 (about 40 kHz for a 704 according to http://bitsavers.org/pdf/ibm/704/24-6661-2_704_Manual_1955.p... vs about a MHz for typical 6502s)

On the plus side, the 704 did multiplications and divisions. https://www-03.ibm.com/ibm/history/exhibits/mainframe/mainfr... gives it about 4,000 multiplications or divisions per second. I think that’s quite a bit faster than a 6502, on 36 bit words, but you don’t need 36-bit arithmetic for a LISP.

It also had floating point, but you don’t need that for a LISP, either.

Post reply on HN