For anyone who has dealt with the programming language Forth, odds are good that you picked it up back in the 80s. Since the language is still in use for many applications, though, you might not have this sort of nostalgic feeling for the language that some might have. For that, though, you might want to try out [Richard]’s implementation which simulates the microcomputers of the 80s using this unique language.
The system has an FPGA-based CPU written in Verilog. It runs on a Nexys-3 board and features PS/2 Keyboard input, a VGA output with a VHDL VT100 terminal emulation module, access to the Flash and onboard SRAM, and a UART. With all of that put together it’s virtually a Forth-based time machine. It’s also extremely well documented even if you’re just curious how it works and aren’t planning on building your own.
The project also includes a CPU simulator written in C which can model the entire computer if you don’t have the hardware for building the actual computer. [Richard] also released everything that you’d need to roll out your own Forth computer on the GitHub page. There are other ways of heading way back to the 1980s, though, like using the quirky Parralax Propeller.
Forth is pretty neat! Well worth a play with if you have not tried it yet.
It brings back some memories…
I have a couple of tubes of the RTX2000 Forth Engine chips left over from a real time imaging system we made in 1994.
This chip had the horsepower to sort a number of pieces of fruit per second for the local cannery I was involved with.
Not bad for a 20Mhz processor! The board had a hardware video grabber, a histogramer chip for the sorting, dual ported VRAM for video out and talked to another board with a Mitsubishi “6502”, again running Forth, that took care of the belt kickers that tossed the fruit off into the correct lines.
We did quite a few industrial product that ran the Forth language.
The first boards were on a 6511AQ chip. Then the Mitsubishi chip that I have forgotten the type number of, and finally the RTX2000.
One day I must figure out what to do with those RTX2000 chips. They did cost quite a lot originally.
RTX2010 was used in spacecraft.
https://en.wikipedia.org/wiki/RTX2010
Mitsubishi = Motorola?
https://en.wikipedia.org/wiki/Mitsubishi_740
Thanx. :-) Its just that the phrase [Mitsubishi “6502”] seemed so wrong when”Motorola 6502″ is so right, but not in this context. :-) You know this stuff better than I do. Thanks for sharing. :-) Where would we be without wikipedia.
The 6502 was originally from MOS Technology, not Motorola. The 6800 was from Motorola. There were various second sources for the 6502 and later the 65c02 and 65816 which were designed by Bill Mensch, owner of Western Design Center (WDC). Mot was never a second source though, since it was a competitor.
My bad. I was confusing the beloved 6502 with another classic, the Motorola 68000. Boy, you know your chips. :-)
M37450S4FP was the chip we used; apparently it was used in about half the VCRs in the universe circa 1990.
It had some nice instruction set extensions and was CMOS so substantially lower powered than the NMOS Rockwell 6511AQ.
According to a couple of ads I kept from back then, the RTX2000 ran more than one Forth instruction per cycle, typically about 16MIPS @ 12MHz, and peaked out at 50MIPS. I posted a scan of one of the ads at http://wilsonminesco.com/stacks/RPN_efficiency.html . You can see by the chart in that ad that as long as you didn’t need floating-point, the RTX2000 dramatically outperformed the ‘386.
I know
Replying to 3 yr old post….
But if you see this, AND, you still have some of those RTX2000 chips lying around drop me a note. They might be a good fit for a project I’m working on.
Thanks !
I just saw your message linked from a later posting…..
https://hackaday.com/2022/05/28/hackaday-prize-2022-reuse-those-dip-chips-to-make-a-1980s-style-single-board-computer/#comments
If you are still interested, here is my ebay…
https://www.ebay.com.au/itm/304496845543
I do need to stocktake my old-new stock. There are quite a few treasures there from before I retired!
Forth is great. Close to the Hardware. If you want to read about the basiscs – see A Start With Forth at https://wiki.forth-ev.de/doku.php/en:projects:a-start-with-forth:start0 or my current Forth Bookshelf at https://www.amazon.co.uk/Juergen-Pintaske/e/B00N8HVEZM you can build your own CDP1802 there and the EP32 https://www.amazon.co.uk/FIG-Forth-Manual-Documentation-Test-1802-ebook/dp/B01N42VLJE/ref=asap_bc?ie=UTF8 and https://www.amazon.co.uk/EP32-RISC-Processor-Description-Implementation-ebook/dp/B071D3XMPS/ref=asap_bc?ie=UTF8 for 1802 see as well the Core at https://wiki.forth-ev.de/doku.php/projects:fig-forth-1802-fpga:start
Do you have any links to free PDFs?
Forth is an old language, most of those books should be free already, why pay anything to tax-avoiding low-wage exploiter Amazon?
Most of them ARE free. But looks like a lot of them have been rewritten by Juergen Pintaske.
Did he add new stuff? Search me.
It’s been so long since I read the originals it’s difficult to tell. What I did notice was the original copyright info seems to have gone missing in some cases.
Some kind of responses you give on Facebook until you invite people to leave the group. Very helpful and constructive.
Thank you very much for your support
THE book in the day was “Starting FORTH” by Leo Brodie.
It has lots of little cartoons to illustrate various points. A free PDF can be found here…
https://www.forth.com/starting-forth/
Worth a look just for the fun :)
I like “Thinking FORTH”, but my copy is signed by Chuck so I might be biased ;-)
(I’d recommend anyone interested in learning read both. Want understanding? Definitely the latter)
Same author, but different purpose. Starting Forth is for beginners, whereas Thinking Forth is more about programming philosophy, and much of it could be applied to other languages as well, although it shows how well it works in Forth.
Dendad, this year is 50 Years Of Forth – a Hack of an RTX2000 system would be appropriate … the Forth facebook page has probably quite a few people who know this chip very well. https://www.facebook.com/groups/PROGRAMMINGFORTH/
Tings Footsteps book explains about the beginnings of Forth on Gates https://www.amazon.co.uk/Footsteps-Empty-Valley-issue-3-ebook/dp/B06X6JGM5L/ref=asap_bc?ie=UTF8
I used to play with Forth a long time ago, in the early 80’s. I also played around with an interesting variant called STOIC which had some interesting improvements and additions such as better support for underlying OS operations. This looks like it might be fun to play with and bring back some good memories.
FORTH, for when it IS the OS.
MPE offers VFX as Commercial Compiler, but there are as well free versions VFXTESTAPP.exe for Windows PC as part of A Start With Forth https://wiki.forth-ev.de/doku.php/en:projects:a-start-with-forth:start0 – no installation, just download the exe and as well free versions for MSP 430 and ARM boards, the LITE Vesrions are at http://www.mpeforth.com/cortex-and-msp430-stamp-and-lite-compilers/
Sometimes commercial tools are more polished, like with Smalltalk, and LISP, even if they scream NICHE.
Duncan is quite active with his Warriors and winning prices regarding Micromouse – and programmed in Forth http://www.micromouseonline.com/2017/04/28/minos-2017-presentations/
The next activity where they will race is at http://www.micromouseonline.com/events/robomaticon-2018/ in March organized by the IET.
A shoutout for DX-Forth. A modern Forth for CP/M (8080 compatible, not z80 rubbish) and MS-DOS: http://dxforth.netbay.com.au It’s fantastic.
@svofski — “Not z80 rubbish”.
Why would you say such a thing? The z80 fully supported the entire 8080 instruction set. It also had more registers and more instructions.
The z80 peripheral chips, with their Type 2 interrupt mode, also made it possible to build a full system with much fewer support chips.
I suppose that if you really wanted to be a purist Luddite, you could always elect not to use the extensions. But why would you want to????
@jackcrenshaw if a development tool targets z80 you can’t usually choose not to use the extensions. Development tools for 8080 are very scarce. Most CP/M compilers only generate z80 code. That’s why DX-Forth was such a pleasant surprise for me: modern and 8080.
Yes, I’m a purist Luddite :)
I’m actually playing with Mark Wills’ Turboforth for the TI-994a. Absolutely fantastic.
grainy ugly gif. how can one produce that and not withdraw it with horror, i cannot explain. why not using apng ?
I wrote a platform level designer in forth on the Atari ST in the late 80’s. I used the FORTH compiler’s built in assembler for the sprite routines. Reverse polish 68000 assembly language is not for the faint of heart:
d0 #7 l. move
Reverse polish anything is not for those who value their sanity :)
Oh, RPN and RPL aren’t that bad. Just takes some getting use to.
It depends on which way your brain works. Over the years, I have gradually come to the conclusion that it’s partly inborn. I myself do think in RPN, and I do not want any more algebraic languages, only RPN. Forth was a breeze for me to pick up and run with; but I absolutely cannot latch onto C. I also understand the Korean language is RPN, so Koreans tend to find Forth more natural.
Like myself, a different kind of thinker, you are. :-) Not all bad, is it not?
I don’t know anyone who can get the answer to 7 times 5 if you say “What is seven times….”. They have to mentally stack the 7, see they are going to multiply, and wait for the next argument. EVERYONE does that internally.
It’s partly from how you were taught, and also because of our language, not necessarily what’s natural. In English we say for example “put on your shoes.” OTOH, in Korean, it’s more like “shoes, install,” that is, first we present the things you’re going to operate on, then tell what to do with them. This is my normal way of thinking when it comes to technical programming. Do that, and you get a result. Now you do something else to it, preceding the action with any further parameters that might be needed.
In the calculator wars, TI’s argument for for their algebraic notation and their push in the education market was that it lets you enter the equation exactly the way you see it on paper. Where the education establishment goes wrong however is that in calculations in real-life engineering, we usually don’t have an equation in front of us.
To criticise myself, this really should have been a moveq.
Every Sun SPARC Station computer back in the day had a Forth engine for what we would now call the BIOS. You could drop to a command line at startup time (none of that menu rubbish, and certainly no graphics) and type Forth commands to control the NVRAM and boot the computer. Or just to play around.
Wish I’d known that back when I was surrounded by Suns.
Then again, maybe I did know that, but didn’t care…
B^)
Or had more sense :)
Most non-x86 Unix workstations in the late 90s used the Open Firmware pre-boot environment (the equivalent of the PC BIOS), including “new world” Power Macs. Open Firmware had a built-in command language based on Forth.
All the SparcStations I’ve used had a graphic frame buffer (no “true” text mode). So did Macs, SGI and HP PA-RISC workstations.
Shame UEFI doesn’t appear to. Missed opportunity.
Yes, Open Firmware / OpenBoot. On PowerPC Macs as well. This is where Device Tree comes from and it was written by a well known Forth guy who worked at SUN, Mitch Bradley.
Built 68010 forth board with fig Forth. It is fun to play with. Ran some steppers for a project. Rockwell had a computer called AIM65 which would run forth from a ROM.
Next stop… A Mir guidance computer on a mere chip. (:
I don’t know what’s quirky about the Propeller — it works very well for me and my clients. For those that choose, it can also be programmed in Forth. Tachyon seems to be the favored version, and its creator, Peter Jakacki, uses the Propeller with Forth in client apps. In this video Peter demonstrates using Forth in a network of small, Propeller-based controllers: https://youtu.be/xtlyE5YDZnY
> For anyone who has dealt with the programming language Forth, odds are good that you picked it up back in the 80s.
I’m not sure that’s actually true, statistically speaking – I think that it might actually be even odds that you instead encountered it in the 2010s while playing Minecraft. There was an *extremely* popular mod around 2012 or so, Redpower 2, which introduced massive expansions to redstone – including a computer, powered by an emulated 6502 processor, which came bundled with a custom FORTH-based operating system. Not a huge percentage of users actually *used* it – these were, after all, mostly children – but I’ll wager that most of them at least *tried* to use it and probably got as far as looking up a FORTH tutorial, or copy-pasting in some code from a forum for a door-lock password prompt.
Hm. Now I actually want to try and estimate this.
This page (http://www.angelfire.com/in/zydenbos/WhatisForth.html) estimates that ca. 1988, there were perhaps 50,000 serious Forth programmers and another 25-50,000 hobbyists and casual users, and the number of people who’ve at least encountered and tried to use it is probably significantly higher, so that’s maybe something in the 100K range, almost certainly less than 1M, who encountered it in the 80s. On the other hand, life expectancy and the passage of time will have reduced the number of people today who encountered it then; we’re probably mostly talking about people in their 20s-40s at the time here, and 30 years on from 1988 we’d definitely expect significant losses in the upper end of that range.
Minecraft ca. 2013 had 12 million PC sales, and maybe 1% (certainly less than 10%) of those played with mods; and if you were a modded player around then you very likely used RP2. So that’s also on the rough order of 100K exposed, depending on how accurate my assumptions are about modded players. A randomly-chosen RP2 computer tutorial on YouTube (https://youtu.be/udv1VRdB7GI) is showing >100K views; and while many of those are undoubtedly from people watching it multiple times, it’s also probable that not all users of this feature watched this particular video, so I’m probably roughly in the right range. Other videos show similar statistics; this (https://www.youtube.com/watch?v=_v_Jma1xX5s) fairly heavy tutorial on the specific nitty-gritty aspects of Redpower Forth has fewer views, but still shows ~100K as well.
So … given that someone has dealt with the programming language FORTH, the odds that they actually picked it up within the decade are *surprisingly high.*
Forth love ? if honk then
I had the bumper sticker with a heart for LOVE (no ? mark).
We used to call Forth the first write-only language. But there’s no question that, if you have a small, low-powered microprocessor, Forth is the _ONLY_ way to go. The kernel can be amazingly small. And portable. And if you loved the HP reverse-Polish calculators (also the only “rational” way to go, RPN just feels right.
Ca. 1979 or so, we at Honeywell wrote a Forth system for H’well’s 16-bit flight processor. It worked great. We used it to control calibration tests for our nav systems.
About the same time, a prof at Univ. South Fla. (USF) got a DoD contract to build a rather large & complicated real-time system in Forth. He had maybe 10-15 people working on it. AFAIK, it was successful.
The biggest problem in those days were the PRICES being charged by Forth, Inc.
I’ve definitely seen a lot of unreadable Forth source code; but I blame that on the programmer, not the language.
Hmm. It’s entirely possible to write unreadable code in an language. But in most languages you’d have to make an effort to do that. Not with Forth. :)
The thing with Forth is: if you know how to write readable assembly code, you also know how to write readable Forth code. But most people have never written one line of assembly code.
I like to think of Forth as interactive assembly++. It’s a heck of a lot easier to get up and running than in assembly, and the path from assembly to higher- or user-level languages is relatively easy to blaze, but you have to do it yourself. Having everything interactive, even at the lowest level, is a great help.
IMO, Forth would be the perfect language for small microcontroller projects, if it weren’t for the lack of libraries. The coverage of Arduino or mbed or most of the vendor code libraries is simply lacking in Forth. I don’t mind digging out the datasheets and hammering through for a few hours to get an SPI eeprom up and running, but I understand those who do. (OTOH, it’s a one-time cost.)
I’m really sold on Mecrisp-Stellaris and the STM32 parts at the moment, but I also use STM8EF (https://github.com/TG9541/stm8ef), developed right here on Hackaday.io for the smallest of projects. Why? Just b/c it’s fun.
you might want to have a look at the Sockpuppet Interface, google helps or for example http://www.forth.org/svfig/kk/07-2017-Sexton.pdf
Thanks Elliot for all your contributions. Your fantastic Mecrisp-Bluepill article was one of the two reasons that pushed me to experiment with forth again (after near a 20 year pause) . Mecrisp is a fantastic Forth implementation, much more agile and fast than any other commercial product since it is 100% written in machine code. STM boards at 32 bit, are almost a dream for pennies. They will beat any 16bit board in price-performance, and who needs to think twice 16 bit or a 32bit processor ? What else can we ask when all that power is free thanks Mecrisp ?
Garth I agree 100% with that. the “unreadable Forth” excuse is only another exageration from Forth haters. Those folks never did write 10 lines of assembler in his lives !
I always thought APL was the first write-only language.
IIRC, Byte magazine’s August 1980 language issue was all about Forth. That’s where I first encountered it. I’m sure there were many like me.
Yes, that’s the issue. I have it in front of me. I was not interested in computers yet until several years later (I was only interested in analog electronics), and I didn’t hear about Forth until perhaps 1985, through a friend who had an HP-71 hand-held computer and the Forth/Assembler module. I got into Forth in 1989 on the same computer. It was a rather poor implementation of Forth; but since it was Forth, I was able to improve and extend it a lot, even without learning the Saturn processor’s unusual architecture and assembly language.
Swapforth :)
Can fit a forth system (ttl rs232 access) in a single $10 chip these days. (ice40xx1k+ will fit the j1a). I have overclocked one up to 69MHz, usually clocks in at 40 to 48 MHz though. Plenty fast when ‘forth’ is native for it….
that escalated quickly. do you pay royalties to Shakespeare for using the English language?