Interpreted language for a 70s/80s micro style project? - Page 1
Forum section: electronics / general

author: Mechanical Menace
author_rank: Super Contributor
timestamp: January 22, 2015, 03:01:08 pm
content: I miss my micros. The "just switch on and go" ability is something that our more capable but fragile systems just can't compete with and we started to lose in the 16 bit era even though they kept the "any one can hack with the docs provided, a soldering iron and some patience," but now even the RasPi can't compare in that respect either.Well nowadays flash is cheap so there's a "ROM" as big as I could want, so why not go where everyone has gone before and build my own? Can't see why not so I'm currently learning KiCad while designing the circuit and thinking of things that must be on the ROM. One of those is an interpreter of some sort but which language? For at all it's wrongs something at least based on BASIC seems the obvious choice but that's not set in stone so if anyone has some better ideas I'd love to hear them thanks.

author: free_electron
author_rank: Super Contributor
timestamp: January 22, 2015, 04:03:33 pm
content: take good ol 8051-ah-basic.8051 with embedded basic interpreter. works like a champ !the source and binaries can be found on the internet.intel sold this chip pre-programmedyou can take a standard 87c52 and flash it in.there are extensions to it to use eeprom and other stuff to store the basic programs. you can warite a progrma in basic and store it to eprom and set it to run on powerup.

author: dannyf
author_rank: Super Contributor
timestamp: January 22, 2015, 04:09:37 pm
content: QuoteThere were 8048/8049 with ROM Basic from Intel. Since the 1980s.

author: tggzzz
author_rank: Super Contributor
timestamp: January 22, 2015, 04:20:10 pm
content: Smallest language, nearest the hardware: Forth.More widely used language, an interpreter for UCSD p-code - presuming you can find a UCSD Pascal compiler somewhere.Most interesting language: Squeak Smalltalk. The Squeak system includes code for generating a new version of the virtual machine (VM) on which it runs. It also includes a VM simulator written in Squeak itself.For this reason, it is easily ported.Personally I'd go for Squeak, because it is fun and because it represents the shape of things to come. Bet you didn't know that Apple released a Smalltalk machine for the Mac Plus.

author: Howardlong
author_rank: Super Contributor
timestamp: January 22, 2015, 04:29:23 pm
content: I used to love Forth. I wrote a breakout in Forth once on one of those ZX80 lookalike machines that ran Forth, can't remember what it was called now*. If you struggle with RPN or stack concepts in general, Forth will be a baptism of fire that's for sure.Are we looking through rose tinted glasses though? The first (basic) Basic I wrote had to be keyed in by hand in hex, that'd take an hour or so, and almost certainly you'd have an error or two in there. Even with a cassette interface, it didn't take much for it not to work, they were always super unreliable.ROM Basic? Luxury. When I were a lad, etc...*Edit: Jupiter Ace.

author: Mechanical Menace
author_rank: Super Contributor
timestamp: January 22, 2015, 04:52:35 pm
content: Quote from: free_electron on January 22, 2015, 04:03:33 pmI'm wanting to go 32 bit, atm I'm playing with a 200-MHz ARM920T. Should of probably mentioned I'm not planning on making something period or recreating an old system, just being inspired by them.Quote from: Howardlong on January 22, 2015, 04:29:23 pmI'll admit I'm thinking of them more during the BBC, C64 and Speccy sort of era. And when it comes to the Beeb there's a definite rose hue to my lensesThanks everyone for the suggestions.

author: edavid
author_rank: Super Contributor
timestamp: January 22, 2015, 04:56:46 pm
content: I would use a C interpreter such as picoc or CINT.Forth is interesting as a curiosity, but I would never try to use it for a real project.

author: Balaur
author_rank: Unknown
timestamp: January 22, 2015, 04:59:21 pm
content: One more recommendation for Forth.Back in high school, together with a friend, we wrote an OS-like Forth-based interpreter that we wrote to an EPROM to run a Sinclair Spectrum clone with it, replacing the default Basic one.I don't remember the actual details, but kept good memories about that time.However, I don't know how you would implement tasks and other typical OS features in that Forth. Newer Forth implementations seems to be more up-to-date.

author: Howardlong
author_rank: Super Contributor
timestamp: January 22, 2015, 09:43:11 pm
content: Quote from: edavid on January 22, 2015, 04:56:46 pmForth seemed to work OK on the Rosetta spacecraft

author: helius
author_rank: Super Contributor
timestamp: January 22, 2015, 09:48:33 pm
content: The Tektronix 11401 DSO runs Smalltalk.

author: tggzzz
author_rank: Super Contributor
timestamp: January 22, 2015, 10:35:56 pm
content: Quote from: helius on January 22, 2015, 09:48:33 pmSo did some of the HP LAN protocol analysers, c1990.

author: edavid
author_rank: Super Contributor
timestamp: January 22, 2015, 11:51:30 pm
content: Quote from: Howardlong on January 22, 2015, 09:43:11 pmMaybe, but the OP is able to choose a much more capable processor, and doesn't have to be so masochistic.Quote from: helius on January 22, 2015, 09:48:33 pmIf you're saying that was a good idea, I think people will laugh at you.

author: Howardlong
author_rank: Super Contributor
timestamp: January 23, 2015, 12:06:02 am
content: Quote from: tggzzz on January 22, 2015, 10:35:56 pmWow, I never knew that. It was the flavour of the month back in the mid/late 80s. I remember reading about it in a few Byte articles, my poor old cranium didn't get it then, so there's no chance now.

author: zapta
author_rank: Super Contributor
timestamp: January 23, 2015, 12:06:46 am
content: If you plan to have a standalone interpreter you will also need to have a way to persist and edit the program. For example, a screen editor for Forth or a line editor for Basic. Keep this in mind when you pick a language.Basic is the natural candidate IMO. Lisp makes sense (but you will need to implement a function or file editor of some sort) and so is C. Forth is not that exciting IMO (I used to program in Forth and even wrote an interpreter while working for Motorola).

author: tggzzz
author_rank: Super Contributor
timestamp: January 23, 2015, 09:39:38 am
content: Quote from: Howardlong on January 23, 2015, 12:06:02 amThere wasn't any alternative back then, if you wanted an extendible and graphical environment.The "balloon" Byte article was in 1981; I still have it somewhere.I came across Smalltalk in 1986, when Apple released a Smalltalk for the Fat Mac (i.e. the original Mac but with 1MB ram). My response was that OOP directly addressed two client requests that I had heard repeatedly, viz:"now I want one exactly likethat, except...", with inheritance"now I need another of those", with instantiationOf course that is simplistic, but no otherlanguagecame close to addressing those points.Then came Objective-C, which is not far off Smalltalk-in-C-minus GC, and was nice and easy to get results fastand to change them in the face of changing client requests. And C++, which was and is the opposite (unless you fit in with someone else's choice of which subset to use/avoid).

author: Mechanical Menace
author_rank: Super Contributor
timestamp: January 23, 2015, 06:10:39 pm
content: Quote from: zapta on January 23, 2015, 12:06:46 amI've already got an "OS*"and basic apps (including a Nano like text editor) I wrote a few years ago for the Wii's security coprocessor** to use as a starting point. Tbh I'm much more daunted by the prospect of getting the hardware working than writing the software.*Single user, single tasking, in some ways not much more than a glorified bootloader.**And yes, I had absolutely no practical reason to do so.

author: Howardlong
author_rank: Super Contributor
timestamp: January 23, 2015, 07:46:36 pm
content: Quote from: Mechanical Menace on January 23, 2015, 06:10:39 pmYou're in the right forum then, plenty of those sorts of projects going on here.