home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
pyth_os2.zip
/
python-1.0.2
/
Demo
/
turing
/
dec.tm
< prev
next >
Wrap
Text File
|
1994-03-02
|
318b
|
13 lines
;
; Decrement a number. This is easy.
; The tape head points to the output.
;
<1, 'a'> --> <2, ' '> ; decrement a sequence of a's
<1, ' '> --> <0, L> ; decrement zero
<1, 'S'> --> <2, ' '> ; decrement SSSS....SSSS0
<1, '0'> --> <0, L> ; decrement zero
<2, ' '> --> <0, R> ; move tape head right one before halting