Questions tagged [forth]

Forth is a stack-based programming language originally developed in the 1970s by Charles H. Moore for controlling radiotelescopes.

Filter by
Sorted by
Tagged with
7
votes
2answers
211 views

A simple clock in FORTH

I try to program a stopwatch/countdown clock in FORTH with Gforth (and using Gforth-specific words). I'm a complete beginner and the following code is the basic stuff (going to add an alarm function ...
6
votes
2answers
323 views

Simple terminal graphics line drawing

The program starts at the center of the screen and starts drawing a line in 50ms steps. When the line hits the edge of the terminal it will be reflected and continue drawing. ...
2
votes
0answers
31 views

Forth to the past - mergesort preps

Still oiling my Forth. Below are few essential algorithms for in-place merge. Please review. Some introductory comments: >swap< is not a cute smiley. I am ...
6
votes
1answer
137 views

Forth to the past - qsort

To make a long story short, I must revive my Forth. It is rusty; last time I did anything serious in Forth was 30 years ago (man, I am old). As an exercise, I translated an STL-like implementation of <...
15
votes
3answers
1k views

Reverse Polish notation based compiler

Description Very small subset of Forth This is a proof of concept level compiler, no optimizations or over/underflow checking See the embedded POD for more information NASM is used as assembler gcc ...
22
votes
2answers
696 views

FizzBuzz in Forth

There are quite a large number of existing implementatons of FizzBuzz but I awoke this morning in a cold sweat with the terrible revelation that Code Review had no FizzBuzz implementation in Forth! ...
6
votes
1answer
308 views

Toy Forth interpreter

I've been reading too many papers and writing too little code. These are my first 300 lines of Haskell: ...