Advertisement
Runer112

99 99 bottles

Mar 13th, 2015
339
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.17 KB | None | 0 0
  1. # 111.
  2. 99999 999
  3.  
  4. # Number of bottles.
  5. 999999999 999
  6. 999999999 999999999 99
  7. 999999999 999999999 9
  8.  
  9. # Start of 'main loop' address.
  10. 9999999999 99
  11. 9999999999 9999999999 9
  12. 9999999999 9999999999 9
  13. 9999999999 9999999999 9
  14.  
  15. # 0.
  16. 999 9 9
  17.  
  18. # Start of 'bottles of beer' address.
  19. 9999999 99
  20. 9999999 9999999 999 99
  21. 9999999 9999999 999 99
  22. 9999999 9999999 9
  23. 9999999 9999999 9
  24. 9999999 9999999 9
  25.  
  26. # Start of 'bottles of beer on the wall' address.
  27. 999999 99
  28. 999999 999999 999 99
  29. 999999 999999 999 99
  30. 999999 999999 999 99
  31. 999999 999999 9
  32. 999999 999999 9
  33. 999999 999999 9
  34. 999999 999999 9
  35. 999999 999999 9
  36. 999999 999999 9
  37.  
  38. # 'Return after gosub #1' address.
  39. 999999999999 9999999999 999 9
  40.  
  41. # 'Return after gosub #2' address.
  42. 99999999999 999999999999 999 9
  43. 99999999999 99999999999 999 9
  44.  
  45. # 'Return after gosub #3' address.
  46. 99999999 999999999999 9
  47. 99999999 99999999 9
  48. 99999999 99999999 9
  49. 99999999 99999999 999 99
  50. 99999999 99999999 999 99
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63. # 'Return after gosub #4' address.
  64. 999999999999999 999999 999 9
  65.  
  66. # 11.
  67. 9999 99
  68.  
  69.  
  70.  
  71. #############
  72. # MAIN LOOP #
  73. #############
  74.  
  75. # Print number of bottles.
  76. 999999999
  77.  
  78. # Run the 'bottles of beer on the wall' subroutine.
  79. 9999999999999 999999999999 # Set return address
  80. 999999 999 # Gosub #1
  81.  
  82. # Print ', '
  83. 99 9999
  84. 99 99 999 9999
  85. 99 99 999 9999
  86. 99 99 999 9999
  87. 99
  88. 99 99 9999
  89. 99 99 9
  90. 99
  91.  
  92. # Print number of bottles
  93. 999999999
  94.  
  95. # Run the 'bottles of beer' subroutine.
  96. 99999999999999 99999999999 # Set return address
  97. 9999999 999 # Gosub #2
  98.  
  99. # Print '. Take one down, pass it around, '
  100. 99 9999
  101. 99 99 999 9999
  102. 99 99 999 9999
  103. 99 99 999 9999
  104. 99 99 999 9
  105. 99 99 999 9
  106. 99 # .
  107. 99 9999
  108. 99 99 999 9999
  109. 99 99 999 9999
  110. 99 99 9
  111. 99 # <space>
  112. 99 99999
  113. 99 99 9999
  114. 99 99 9999
  115. 99 99 9
  116. 99 99 9
  117. 99 99 9
  118. 99 99 9
  119. 99 99 9
  120. 99 # T
  121. 99 99999
  122. 99 99 9999
  123. 99 99 9
  124. 99 99 9
  125. 99 99 9
  126. 99 # a
  127. 99 99 999 9999
  128. 99 99 9
  129. 99 # k
  130. 99 99999
  131. 99 99 9999
  132. 99 99 999 9
  133. 99 # e
  134. 99 9999
  135. 99 99 999 9999
  136. 99 99 999 9999
  137. 99 99 9
  138. 99 # <space>
  139. 99 99999
  140. 99 # o
  141. 99 99 9
  142. 99 # n
  143. 99 99 9999
  144. 99 99 999 9
  145. 99 99 999 9
  146. 99 # e
  147. 99 9999
  148. 99 99 999 9999
  149. 99 99 999 9999
  150. 99 99 9
  151. 99 # <space>
  152. 99 99999
  153. 99 99 9999
  154. 99 # d
  155. 99 99 999 9999
  156. 99 # o
  157. 99 99 999 9999
  158. 99 99 9
  159. 99 99 9
  160. 99 99 9
  161. 99 # w
  162. 99 99 9999
  163. 99 99 999 9
  164. 99 99 999 9
  165. 99 # n
  166. 99 9999
  167. 99 99 999 9999
  168. 99 99 999 9999
  169. 99 99 999 9999
  170. 99 # ,
  171. 99 99 9999
  172. 99 99 9
  173. 99 # <space>
  174. 99 99999
  175. 99 99 999 9
  176. 99 # p
  177. 99 99 9999
  178. 99 99 9
  179. 99 99 9
  180. 99 99 9
  181. 99 99 9
  182. 99 # a
  183. 99 99999
  184. 99 99 999 9
  185. 99 99 999 9
  186. 99 99 999 9
  187. 99 99 999 9
  188. 99 # s
  189. 99 # s
  190. 99 9999
  191. 99 99 999 9999
  192. 99 99 999 9999
  193. 99 99 9
  194. 99 # <space>
  195. 99 99999
  196. 99 99 9
  197. 99 99 9
  198. 99 99 9
  199. 99 99 9
  200. 99 99 9
  201. 99 99 9
  202. 99 # i
  203. 99 99 999 9999
  204. 99 # t
  205. 99 9999
  206. 99 99 999 9999
  207. 99 99 999 9999
  208. 99 99 9
  209. 99 # <space>
  210. 99 99999
  211. 99 99 9999
  212. 99 99 9
  213. 99 99 9
  214. 99 99 9
  215. 99 # a
  216. 99 99999
  217. 99 99 999 9
  218. 99 99 999 9
  219. 99 99 999 9
  220. 99 # r
  221. 99 99999
  222. 99 # o
  223. 99 99 999 9
  224. 99 99 999 9
  225. 99 99 999 9
  226. 99 99 999 9
  227. 99 99 999 9
  228. 99 99 999 9
  229. 99 # u
  230. 99 99999
  231. 99 99 9
  232. 99 # n
  233. 99 99999
  234. 99 99 9999
  235. 99 # d
  236. 99 9999
  237. 99 99 999 9999
  238. 99 99 999 9999
  239. 99 99 999 9999
  240. 99 # ,
  241. 99 99 9999
  242. 99 99 9
  243. 99 # <space>
  244.  
  245. # Decrement number of bottles.
  246. 999999999 999999999 9
  247.  
  248. # Print number of bottles.
  249. 999999999
  250. # Run 'bottles of beer on the wall' subroutine.
  251. 9999999999999 99999999 # Set return address
  252. 999999 999 # Gosub #3
  253.  
  254. # Print '.\n'
  255. 99 9999
  256. 99 99 999 9999
  257. 99 99 999 9999
  258. 99 99 999 9999
  259. 99 99 999 9
  260. 99 99 999 9
  261. 99
  262. 99 9999
  263. 99 99 9
  264. 99
  265.  
  266. # If number of bottles == 0, goto end. Otherwise, goto start of main loop.
  267. 999999999999999999 999999999
  268. 9999999999 999
  269.  
  270.  
  271. ################################
  272. # 'BOTTLES OF BEER' SUBROUTINE #
  273. ################################
  274.  
  275. # Print ' bottles of beer'
  276. 99 9999
  277. 99 99 999 9999
  278. 99 99 999 9999
  279. 99 99 9
  280. 99 # <space>
  281. 99 99999
  282. 99 99 9999
  283. 99 99 9
  284. 99 99 9
  285. 99 # b
  286. 99 99999
  287. 99 # o
  288. 99 99 999 9
  289. 99 99 999 9
  290. 99 99 999 9
  291. 99 99 999 9
  292. 99 99 999 9
  293. 99 # t
  294. 99 # t
  295. 99 99999
  296. 99 99 9
  297. 99 99 9
  298. 99 99 9
  299. 99 # l
  300. 99 99999
  301. 99 99 9999
  302. 99 99 999 9
  303. 99 # e
  304. 99 99 999 9999
  305. 99 99 999 9
  306. 99 99 999 9
  307. 99 99 999 9
  308. 99 # s
  309. 99 9999
  310. 99 99 999 9999
  311. 99 99 999 9999
  312. 99 99 9
  313. 99 # <space>
  314. 99 99999
  315. 99 # o
  316. 99 99 9999
  317. 99 99 999 9
  318. 99 99 999 9
  319. 99 # f
  320. 99 9999
  321. 99 99 999 9999
  322. 99 99 999 9999
  323. 99 99 9
  324. 99 # <space>
  325. 99 99999
  326. 99 99 9999
  327. 99 99 9
  328. 99 99 9
  329. 99 # b
  330. 99 99 999 9
  331. 99 99 999 9
  332. 99 99 999 9
  333. 99 # e
  334. 99 # e
  335. 99 99 999 9999
  336. 99 99 999 9
  337. 99 99 999 9
  338. 99 # r
  339.  
  340. # Return from subroutine.
  341. 99999999999999 999
  342.  
  343.  
  344.  
  345. ############################################
  346. # 'BOTTLES OF BEER ON THE WALL' SUBROUTINE #
  347. ############################################
  348.  
  349. # Call 'bottles of beer' subroutine.
  350. 99999999999999 999999999999999 # Set return address
  351. 9999999 999 # Gosub #4
  352.  
  353. # Print ' on the wall'
  354. 99 9999
  355. 99 99 999 9999
  356. 99 99 999 9999
  357. 99 99 9
  358. 99 # <space>
  359. 99 99999
  360. 99 # o
  361. 99 99 9
  362. 99 # n
  363. 99 9999
  364. 99 99 999 9999
  365. 99 99 999 9999
  366. 99 99 9
  367. 99 # <space>
  368. 99 99999
  369. 99 99 999 9
  370. 99 99 999 9
  371. 99 99 999 9
  372. 99 99 999 9
  373. 99 99 999 9
  374. 99 # t
  375. 99 99 9999
  376. 99 99 9
  377. 99 # h
  378. 99 99 9
  379. 99 99 9
  380. 99 99 9
  381. 99 # e
  382. 99 9999
  383. 99 99 999 9999
  384. 99 99 999 9999
  385. 99 99 9
  386. 99 # <space>
  387. 99 99999
  388. 99 99 999 9999
  389. 99 99 9
  390. 99 99 9
  391. 99 99 9
  392. 99 # w
  393. 99 99 9999
  394. 99 99 9999
  395. 99 # a
  396. 99 99 999 9999
  397. 99 # l
  398. 99 # l
  399.  
  400. # Return from subroutine.
  401. 9999999999999 999
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement