kernelthread.com

OpenBOOT PROM (Sun)

The Towers of Hanoi as a FORTH program for the OpenBOOT PROM found on SPARC systems.

: movedisk ." move " . ." --> " . ; : dohanoi dup 0 > if 1 - 2over 2over >r >r >r >r 1 roll 2 roll 3 roll 3 roll recurse 2r@ swap movedisk 2drop 2drop 2r> 2r> swap 3 roll swap recurse then ; : hanoi 3 1 2 3 roll dohanoi 2drop 2drop ;

Download

hanoi.prom