Finally, the definition is terminated by a semi-colon. Typically, we design the highest-level routines first. This approach leads to conceptually correct solutions with a minimum of effort. But in Forth, words must be compiled before they can be referenced, so a listing begins with the most primitive definitions and ends with the highest-level words. A complete, annotated listing of the washing machine program is given below .
Subsequent lines define application words that do the work.
Even from this simple example, it may be clear that Forth is not so much a language as a tool for building application-oriented command sets. When developing this program, you would follow your top-down logic, as described above. If your hardware is available, your first step would be to see if it works. This would read port address 01 and display its current bit values. If the hardware is unavailable, you might temporarily re-define PORT as a variable you can read and write, and so test the rest of the logic.