Advertisement
a52

Brainfuck/P" Turing Machine (ungolfed version)

a52
May 7th, 2017
145
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. 0 _ | r init
  2. 0 * * l 0
  3.  
  4. init _ _ r init1
  5. init * * r init
  6. init1 _ ^ r p0
  7. p0 _ 0 l read
  8.  
  9. read \ > r read1
  10. read / < r read1
  11. read t + r read1
  12. read ~ - r read1
  13. read ( [ r read1
  14. read ) ] r read1
  15. read | _ r read1
  16. read * * l read
  17.  
  18. read1 > \ r >
  19. read1 < / r <
  20. read1 + t r +
  21. read1 - ~ r -
  22. read1 [ ( r [
  23. read1 ] ) r ]
  24. read1 _ _ * halt-Execution-finished
  25.  
  26. [skip ( [ r [skip1
  27. [skip * * l [skip
  28. [skip1 ] ] r read1
  29. [skip1 * * r [skip1
  30.  
  31. ]loop ) ] l ]loop1
  32. ]loop * * l ]loop
  33. ]loop1 [ [ r read1
  34. ]loop1 * * l ]loop1
  35.  
  36. > ^ - r >1
  37. < ^ - l <1
  38. + ^ ^ r +1
  39. - ^ ^ r -1
  40. [ ^ ^ r [1
  41. ] ^ ^ r ]1
  42.  
  43. >1 _ 0 r >2
  44. >1 * * r >2
  45. <1 _ _ * halt-Pointer-out-of-range
  46. <1 * * l <2
  47. >2 * ^ l read
  48. <2 * ^ l read
  49.  
  50. [1 0 0 l [skip
  51. [1 * * l read
  52. ]1 0 0 l read
  53. ]1 * * l ]loop
  54.  
  55. +1 0 1 l read
  56. +1 _ 1 l read
  57. +1 1 2 l read
  58. +1 2 3 l read
  59. +1 3 4 l read
  60. +1 4 5 l read
  61. +1 5 6 l read
  62. +1 6 7 l read
  63. +1 7 8 l read
  64. +1 8 9 l read
  65. +1 9 A l read
  66. +1 A B l read
  67. +1 B C l read
  68. +1 C D l read
  69. +1 D E l read
  70. +1 E F l read
  71. +1 F 0 l read
  72.  
  73. -1 0 F l read
  74. -1 _ F l read
  75. -1 1 0 l read
  76. -1 2 1 l read
  77. -1 3 2 l read
  78. -1 4 3 l read
  79. -1 5 4 l read
  80. -1 6 5 l read
  81. -1 7 6 l read
  82. -1 8 7 l read
  83. -1 9 8 l read
  84. -1 A 9 l read
  85. -1 B A l read
  86. -1 C B l read
  87. -1 D C l read
  88. -1 E D l read
  89. -1 F E l read
  90.  
  91. > * * r >
  92. < * * r <
  93. + * * r +
  94. - * * r -
  95. [ * * r [
  96. ] * * r ]
Advertisement
Advertisement
Advertisement
RAW Paste Data Copied
Advertisement