TIS-100 drawing program
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

tisdraw.txt 1.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166
  1. @0
  2. INIT:MOV 3 ACC
  3. SWP
  4. L:MOV ANY ACC
  5. JEZ SND
  6. SWP
  7. ADD RIGHT
  8. MOV 1 DOWN
  9. MOV ACC DOWN
  10. MOV DOWN ACC
  11. SAV
  12. JMP L
  13. SND:SWP
  14. MOV ACC DOWN
  15. SAV
  16. JMP L
  17. @1
  18. SND:MOV 0 DOWN
  19. B:MOV ANY ACC
  20. JLZ SND
  21. SUB 1
  22. JEZ COL1
  23. SUB 2
  24. JEZ COL2
  25. MOV ACC RIGHT
  26. JMP SND
  27. COL1:MOV -1 LEFT
  28. MOV -1 LEFT
  29. JMP SND
  30. COL2:MOV 1 LEFT
  31. MOV 1 LEFT
  32. @2
  33. B:MOV LEFT ACC
  34. JLZ DWN
  35. SUB 3
  36. JEZ RGT
  37. JGZ DUP
  38. MOV -1 DOWN#LFT
  39. MOV -1 DOWN
  40. MOV -1 LEFT#SND
  41. JMP B
  42. RGT:MOV 1 DOWN
  43. MOV 1 DOWN
  44. JMP B
  45. DWN:MOV 1 RIGHT
  46. JMP B
  47. DUP:MOV -1 RIGHT
  48. @3
  49. B:MOV LEFT ACC
  50. MOV ACC DOWN
  51. MOV ACC DOWN
  52. #NORMALIZE Y
  53. MOV ANY ACC
  54. JLZ Z
  55. SAV
  56. SUB 21
  57. JGZ BIG
  58. SWP
  59. MOV ACC LAST
  60. JMP B
  61. Z:MOV 21 LAST
  62. JMP B
  63. BIG:MOV 0 LAST
  64. @4
  65. B:MOV ANY ACC
  66. JEZ SND
  67. MOV UP ACC
  68. JLZ BAD
  69. SAV
  70. SUB 4
  71. JGZ BAD
  72. SWP
  73. MOV ACC UP
  74. JMP B
  75. BAD:MOV 4 UP
  76. JMP B
  77. SND:MOV ACC UP
  78. MOV UP RIGHT
  79. @5
  80. MOV UP LEFT
  81. MOV NIL RIGHT
  82. MOV RIGHT DOWN#X
  83. MOV RIGHT DOWN#Y
  84. MOV LEFT DOWN#COL
  85. @6
  86. B:MOV ANY ACC
  87. JEZ SND
  88. SWP
  89. ADD UP
  90. MOV 1 DOWN
  91. MOV ACC DOWN
  92. MOV DOWN ACC
  93. SAV
  94. JMP B
  95. SND:MOV ACC RIGHT
  96. MOV ACC DOWN
  97. SWP
  98. MOV ACC LEFT#X
  99. SAV
  100. MOV RIGHT LEFT#Y
  101. @7
  102. B:MOV ANY ACC
  103. JEZ SND
  104. SWP
  105. ADD UP
  106. MOV ACC UP
  107. MOV UP ACC
  108. SAV
  109. JMP B
  110. SND:SWP
  111. SAV
  112. MOV ACC LEFT#Y
  113. @8
  114. # _____________
  115. # / \
  116. #| TISDRAW |
  117. # \_____________/
  118. #
  119. # UP
  120. # |
  121. # LEFT 8
  122. # \- 4 6 -RIGHT
  123. # 1 2 3
  124. # / | \
  125. #COL- | COL+
  126. # DOWN
  127. #
  128. #WRITTEN BY ZERED
  129. @9
  130. MOV UP RIGHT
  131. MOV UP RIGHT
  132. MOV UP RIGHT
  133. @10
  134. B:MOV UP ACC
  135. JEZ SND
  136. MOV UP RIGHT
  137. MOV RIGHT UP
  138. JMP B
  139. SND:MOV LEFT DOWN
  140. MOV LEFT DOWN
  141. MOV LEFT DOWN
  142. MOV -1 DOWN
  143. @11
  144. #NORMALIZE X
  145. B:MOV ANY ACC
  146. JLZ Z
  147. SAV
  148. SUB 34
  149. JGZ BIG
  150. SWP
  151. MOV ACC LAST
  152. JMP B
  153. Z:MOV 34 LAST
  154. JMP B
  155. BIG:MOV 0 LAST