sd:star_forth
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| sd:star_forth [2026/03/12 13:18] – appledog | sd:star_forth [2026/03/12 16:16] (current) – appledog | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| = Star Forth | = Star Forth | ||
| + | |||
| + | Starting Forth is available online at [[https:// | ||
| + | |||
| + | == Welcome to Star Forth | ||
| + | SD/FORTH v0.5 | ||
| + | |||
| + | * 32-bit cells, subroutine-threaded | ||
| + | * Outer interpreter with TIB, word parser, dictionary search, number parsing | ||
| + | * Stack primitives with underflow protection | ||
| + | * 17 built-in words: BYE, .S, CR, ., DUP, DROP, SWAP, OVER, +, -, *, /, MOD, EMIT, DEPTH, WORDS, PROMPT | ||
| + | * Decimal, hex ($), binary (%), explicit decimal (#) number input | ||
| + | * Negative numbers with - prefix | ||
| + | * Paste-friendly '> ' stripping | ||
| + | |||
| + | Next phases when you're ready: | ||
| + | |||
| + | TODO: | ||
| + | * : and ; (colon definitions) — this is where FORTH becomes a real language | ||
| + | * 32-bit number printing (currently . only shows low 16 bits) | ||
| + | * Control flow — IF/ | ||
| + | * Memory words — @, !, C@, C!, HERE, ALLOT, , | ||
| + | * String I/O — .", TYPE, ACCEPT | ||
| + | * Save/load dictionary images | ||
| == FIG-FORTH | == FIG-FORTH | ||
| Line 12: | Line 35: | ||
| This list includes implementations for: the 1802, 6502, 6800, 68000, 6809, 8088, 9900, the Alpha Micro, Apple II, Eclipse, IBM-PC, Nova, Pace, the PDP-11, and the VAX. | This list includes implementations for: the 1802, 6502, 6800, 68000, 6809, 8088, 9900, the Alpha Micro, Apple II, Eclipse, IBM-PC, Nova, Pace, the PDP-11, and the VAX. | ||
| - | The point being proven, FORTH is out there with copious amounts of code in various architectures. It was thus easy to get a kind of FORTH running on the SD-8516. I quickly became obsessed with it. | + | The point being proven, FORTH is out there with copious amounts of code in various architectures. It was thus easy to get a kind of FORTH running on the SD-8516. I quickly became obsessed with it. It took quite a while to iron out all the stack bugs. |
| == Why | == Why | ||
| Line 142: | Line 165: | ||
| Several official Atari 7800 console games were developed in Forth as well. It was surprisingly common for quick ports and prototypes. Games like Karateka, Hat Trick, and Worms were written in Forth. Notably the Forth source code for Worms (1983) is available on GitHub. | Several official Atari 7800 console games were developed in Forth as well. It was surprisingly common for quick ports and prototypes. Games like Karateka, Hat Trick, and Worms were written in Forth. Notably the Forth source code for Worms (1983) is available on GitHub. | ||
| + | |||
| + | The original Atari 800 Dig Dug was done in Forth. Professor Pac-Man (1983, Bally/ | ||
| + | |||
| + | RAMBrandt (Antic Software) was written in Forth. | ||
| + | |||
| + | AtariLab was written in Forth. Landon Dyer who worked at Atari said that someone at Atari would often start porting a game in Forth, but then later it would be optimized in assembly due to speed and size concerns of the 2600 and 800--The Atari 800 had a base of 16k RAM and the 800 had, I believe, 128 bytes of RAM-- but the games game on cartridges containing 2k to 4k of ROM. | ||
| FORTH saw critical commercial success in the business world as well. RapidFile (1986, Ashton-Tate) was a flat-file database manager written in Forth. Ashton-Tate was big in databases back then (dBase III fame), so this reached business users. | FORTH saw critical commercial success in the business world as well. RapidFile (1986, Ashton-Tate) was a flat-file database manager written in Forth. Ashton-Tate was big in databases back then (dBase III fame), so this reached business users. | ||
| Line 152: | Line 181: | ||
| * C takes 2 or 3 weeks of pain to get pointers and structs and such, and you get better at it with time over the long run. | * C takes 2 or 3 weeks of pain to get pointers and structs and such, and you get better at it with time over the long run. | ||
| * Java takes 3 to 6 weeks due to it's OOP and verbosity. | * Java takes 3 to 6 weeks due to it's OOP and verbosity. | ||
| - | * Forth You are in hell. The only way out is to jump off a cliff. You check your survival pack. Inside is a gun with one bullet, some cyanide pills, and a scrap of paper on which is scribbled "good luck!". | + | * Forth The learning curve of C or Java compressed into the first week. Most will quit in the first week. But those survivors who make it through the first week often say they began writing real code faster than in C afterward, because there’s so little to learn. |
| - | + | ||
| - | Most will quit in the first week. But those survivors who make it through the first week often say they began writing real code faster than in C afterward, because there’s so little to learn. | + | |
| //Bindings for SDL, SDL2, OpenGL and many other vital libraries exist for FORTH -- as well as C bindings. In the end, it is a blue sky language, yours to discover.// | //Bindings for SDL, SDL2, OpenGL and many other vital libraries exist for FORTH -- as well as C bindings. In the end, it is a blue sky language, yours to discover.// | ||
sd/star_forth.1773321506.txt.gz · Last modified: by appledog
