SHARE
TWEET

2015 Challenge24 Finals: C1 by HoChockiGon

a guest Jul 1st, 2015 250 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. MOV 152, ptr_s2_0
  2. MOV 156, ptr_s2_1
  3. MOV 160, ptr_s2_2
  4. MOV 164, ptr_s2_3
  5. MOV 168, ptr_s2_4
  6. MOV 172, ptr_s2_5
  7. MOV 176, ptr_s2_6
  8. MOV 180, ptr_s2_7
  9. MOV 197, ptr_s1_2
  10.  
  11. MOV 187, 198
  12. MOV 189, ptr_s1_0
  13. MOV 193, ptr_s1_1
  14. MOV 201, ptr_s1_3
  15. MOV 205, ptr_s1_4
  16. MOV 209, ptr_s1_5
  17. MOV 213, ptr_s1_6
  18. MOV 217, ptr_pom2
  19.  
  20. MOV 140, ptr_s3_0
  21.  
  22. MOV 240, loop_pointer
  23.  
  24. MOV 10, w0101
  25. MOV 183, init
  26. SUB 183, 10
  27.  
  28. # 99
  29. MOV 20, init2 #(10,9,9,9)
  30. JMP inner_label
  31.  
  32. #11 to w1010
  33.  
  34. loop:
  35.   SUB 183, 10
  36.   OUT 152
  37.   OUT 156
  38.   OUT 160
  39.   OUT 164
  40.   OUT 168
  41.   OUT 172
  42.   OUT 176
  43.   OUT 180
  44.   OUTB 186
  45.   OUT 187
  46.   OUT 191
  47.   OUT 195
  48.   OUT 199
  49.   OUT 203
  50.   OUT 207
  51.   OUT 211
  52.   OUT 140
  53.  
  54. inner_label:
  55.   OUT 185
  56.   OUT 189
  57.   OUT 193
  58.   OUT 197
  59.   OUT 201
  60.   OUT 205
  61.   OUT 209
  62.   OUT 213
  63.   OUT 185
  64.   OUT 189
  65.   OUT 193
  66.   OUT 197
  67.   OUT 217
  68.   JNZB 184, *240
  69.  
  70. MOV 183, init
  71. ADD 30, 11
  72. SUB 183, 30
  73. SUB 20, 11
  74.  
  75. JNZB 22, label
  76. SUBB 184, 11
  77. label:
  78.  
  79. JNZB 20, *240
  80.  
  81. MOVB 183, 23 #b48
  82.  
  83. OUT 152
  84. OUT 156
  85. OUT 160
  86. OUT 164
  87. OUT 168
  88. OUT 172
  89. OUT 176
  90. OUT 180
  91. OUTB 183
  92. OUT 187
  93. OUT 191
  94. OUT 195
  95. OUT 199
  96. OUT 203
  97. OUT 207
  98. OUT 211
  99. OUT 140
  100.  
  101. JMP 0
  102.  
  103.  
  104. # remember, no immediates, they have to be stored like this
  105.  
  106. # "er.\n bottles of beer on the wall, Take one down, pass it around, ...\n"
  107. ptr_pom2:
  108. ascii e
  109. ascii r
  110. db 46
  111. db 10
  112. ptr_s1_0:
  113. ascii ottl
  114. ptr_s1_1:
  115. ascii es
  116. db 32
  117. ascii o
  118. ptr_s1_2:
  119. ascii f
  120. db 32
  121. ascii be
  122. ptr_s1_3:
  123. ascii er
  124. db 32
  125. ascii o
  126. ptr_s1_4:
  127. ascii n
  128. db 32
  129. ascii th
  130. ptr_s1_5:
  131. ascii e
  132. db 32
  133. ascii wa
  134. ptr_s1_6:
  135. ascii ll
  136. ascii ,
  137. db 32
  138.  
  139. ptr_s2_0:
  140. ascii Ta
  141. ascii ke
  142. ptr_s2_1:
  143. db 32
  144. ascii o
  145. ascii ne
  146. ptr_s2_2:
  147. db 32
  148. ascii d
  149. ascii ow
  150. ptr_s2_3:
  151. ascii n
  152. db 44
  153. db 32
  154. ascii p
  155. ptr_s2_4:
  156. ascii as
  157. ascii s
  158. db 32
  159. ptr_s2_5:
  160. ascii it
  161. db 32
  162. ascii a
  163. ptr_s2_6:
  164. ascii ro
  165. ascii un
  166. ptr_s2_7:
  167. ascii d
  168. db 44
  169. db 32
  170.  
  171. ptr_s3_0:
  172. db 46
  173. db 46
  174. db 46
  175. db 10
  176.  
  177. loop_pointer:
  178. dw loop
  179.  
  180. init:
  181. db 57 # 183
  182. db 10 # 184
  183. db 57 # 185 '9'+1
  184. db 58 # 186
  185.  
  186. init2:
  187. db 10
  188. db 9
  189. db 9
  190. db 49
  191.  
  192. w0101:
  193. db 0
  194. one:
  195. db 1
  196. db 0
  197. db 1
RAW Paste Data
Challenge yourself this year...
Learn something new in 2017
Top