Category : Miscellaneous Language Source Code
Archive   : PCLISP30.ZIP
Filename : HANOI.L
Output of file : HANOI.L contained in archive : PCLISP30.ZIP
;; HANOI.L for PC-LISP.EXE (V2.13)
;; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
;; Another program that was found with some XLISP stuff and modified to
;; run under PC-LISP. Again I do not know who the author is.
;;
;; Peter Ashwood-Smith
;; August 22nd, 1986
;; Good ol towers of hanoi
;;
;; Usage:
;; (hanoi
;;
(defun hanoi(n)
( transfer 'A 'B 'C n ))
(defun print-move ( from to )
(patom "Move Disk From ")
(patom from)
(patom " To ")
(patom to)
(patom "\n")
)
(defun transfer ( from to via n )
(cond ((equal n 1) (print-move from to ))
(t (transfer from via to (1- n))
(print-move from to)
(transfer via to from (1- n)]
Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!
This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.
But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/