Advertisement
Guest User

Pong.ic

a guest
Dec 23rd, 2019
204
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 61.99 KB | None | 0 0
  1. // Pong.ic
  2. // This is an interpreted translation of the supplied Pong from project 11. It includes the supplied OS as well.
  3.  
  4. module "Array"
  5. function "Array.new" 0
  6. d_load arg 0
  7. jumpif_d gt -> Array.new$IF_FALSE0
  8. push_c 2
  9. call "Sys.error" 1
  10. -- (Array.new$IF_FALSE0)
  11. d_load arg 0
  12. push_d
  13. call "Memory.alloc" 1
  14. return
  15. function "Array.dispose" 0
  16. d_load arg 0
  17. copy_d ptr 0
  18. push_d
  19. call "Memory.deAlloc" 1
  20. return
  21. module "Ball"
  22. function "Ball.new" 0
  23. push_c 15
  24. call "Memory.alloc" 1
  25. d_load ret
  26. copy_d ptr 0
  27. d_load arg 0
  28. copy_d this 0
  29. d_load arg 1
  30. copy_d this 1
  31. d_load arg 2
  32. copy_d this 10
  33. d_load arg 3 [+65530]
  34. copy_d this 11
  35. d_load arg 4
  36. copy_d this 12
  37. d_load arg 5 [+65530]
  38. copy_d this 13
  39. copy_c 0, this 14
  40. d_load ptr 0
  41. push_d
  42. call "Ball.show" 1
  43. d_load ptr 0
  44. copy_d ret
  45. return
  46. function "Ball.dispose" 0
  47. d_load arg 0
  48. copy_d ptr 0
  49. push_d
  50. call "Memory.deAlloc" 1
  51. return
  52. function "Ball.show" 0
  53. d_load arg 0
  54. copy_d ptr 0
  55. push_c 65535
  56. call "Screen.setColor" 1
  57. d_load ptr 0
  58. push_d
  59. call "Ball.draw" 1
  60. return
  61. function "Ball.hide" 0
  62. d_load arg 0
  63. copy_d ptr 0
  64. push_c 0
  65. call "Screen.setColor" 1
  66. d_load ptr 0
  67. push_d
  68. call "Ball.draw" 1
  69. return
  70. function "Ball.draw" 0
  71. d_load arg 0
  72. copy_d ptr 0
  73. d_load this 0
  74. push_d
  75. d_load this 1
  76. push_d
  77. d_load this 0 [+5]
  78. push_d
  79. d_load this 1 [+5]
  80. push_d
  81. call "Screen.drawRectangle" 4
  82. return
  83. function "Ball.getLeft" 0
  84. d_load arg 0
  85. copy_d ptr 0
  86. d_load this 0
  87. copy_d ret
  88. return
  89. function "Ball.getRight" 0
  90. d_load arg 0
  91. copy_d ptr 0
  92. d_load this 0 [+5]
  93. copy_d ret
  94. return
  95. function "Ball.setDestination" 3
  96. d_load arg 0
  97. copy_d ptr 0
  98. d_load arg 1
  99. d_sub this 0
  100. copy_d this 2
  101. d_load arg 2
  102. d_sub this 1
  103. copy_d this 3
  104. d_load this 2
  105. push_d
  106. call "Math.abs" 1
  107. d_load ret
  108. copy_d lcl 0
  109. d_load this 3
  110. push_d
  111. call "Math.abs" 1
  112. d_load ret
  113. copy_d lcl 1
  114. d_load lcl 0
  115. d_sub lcl 1
  116. d_comp lt
  117. copy_d this 7
  118. jumpif_d eq -> Ball.setDestination$IF_FALSE0
  119. d_load lcl 0
  120. copy_d lcl 2
  121. d_load lcl 1
  122. copy_d lcl 0
  123. d_load lcl 2
  124. copy_d lcl 1
  125. d_load this 1
  126. d_sub arg 2
  127. d_comp lt
  128. copy_d this 8
  129. d_load this 0
  130. d_sub arg 1
  131. d_comp lt
  132. copy_d this 9
  133. jump -> Ball.setDestination$IF_END0
  134. -- (Ball.setDestination$IF_FALSE0)
  135. d_load this 0
  136. d_sub arg 1
  137. d_comp lt
  138. copy_d this 8
  139. d_load this 1
  140. d_sub arg 2
  141. d_comp lt
  142. copy_d this 9
  143. -- (Ball.setDestination$IF_END0)
  144. push_c 2
  145. d_load lcl 1
  146. push_d
  147. call "Math.multiply" 2
  148. d_load ret
  149. d_sub lcl 0
  150. copy_d this 4
  151. push_c 2
  152. d_load lcl 1
  153. push_d
  154. call "Math.multiply" 2
  155. d_load ret
  156. copy_d this 5
  157. push_c 2
  158. d_load lcl 1
  159. d_sub lcl 0
  160. push_d
  161. call "Math.multiply" 2
  162. d_load ret
  163. copy_d this 6
  164. return
  165. function "Ball.move" 0
  166. d_load arg 0
  167. copy_d ptr 0
  168. push_d
  169. call "Ball.hide" 1
  170. d_load this 4
  171. jumpif_d ge -> Ball.move$IF_FALSE0
  172. d_load this 5
  173. m_add this 4
  174. jump -> Ball.move$IF_END0
  175. -- (Ball.move$IF_FALSE0)
  176. d_load this 6
  177. m_add this 4
  178. d_load this 9
  179. jumpif_d eq -> Ball.move$IF_FALSE1
  180. d_load this 7
  181. jumpif_d eq -> Ball.move$IF_FALSE2
  182. m_op this 0 [+4]
  183. jump -> Ball.move$IF_END2
  184. -- (Ball.move$IF_FALSE2)
  185. m_op this 1 [+4]
  186. -- (Ball.move$IF_END2)
  187. jump -> Ball.move$IF_END1
  188. -- (Ball.move$IF_FALSE1)
  189. d_load this 7
  190. jumpif_d eq -> Ball.move$IF_FALSE3
  191. m_op this 0 [+65532]
  192. jump -> Ball.move$IF_END3
  193. -- (Ball.move$IF_FALSE3)
  194. m_op this 1 [+65532]
  195. -- (Ball.move$IF_END3)
  196. -- (Ball.move$IF_END1)
  197. -- (Ball.move$IF_END0)
  198. d_load this 8
  199. jumpif_d eq -> Ball.move$IF_FALSE4
  200. d_load this 7
  201. jumpif_d eq -> Ball.move$IF_FALSE5
  202. m_op this 1 [+4]
  203. jump -> Ball.move$IF_END5
  204. -- (Ball.move$IF_FALSE5)
  205. m_op this 0 [+4]
  206. -- (Ball.move$IF_END5)
  207. jump -> Ball.move$IF_END4
  208. -- (Ball.move$IF_FALSE4)
  209. d_load this 7
  210. jumpif_d eq -> Ball.move$IF_FALSE6
  211. m_op this 1 [+65532]
  212. jump -> Ball.move$IF_END6
  213. -- (Ball.move$IF_FALSE6)
  214. m_op this 0 [+65532]
  215. -- (Ball.move$IF_END6)
  216. -- (Ball.move$IF_END4)
  217. d_load this 0
  218. d_sub this 10
  219. jumpif_d gt -> Ball.move$IF_FALSE7
  220. copy_c 1, this 14
  221. d_load this 10
  222. copy_d this 0
  223. -- (Ball.move$IF_FALSE7)
  224. d_load this 0
  225. d_sub this 11
  226. jumpif_d lt -> Ball.move$IF_FALSE8
  227. copy_c 2, this 14
  228. d_load this 11
  229. copy_d this 0
  230. -- (Ball.move$IF_FALSE8)
  231. d_load this 1
  232. d_sub this 12
  233. jumpif_d gt -> Ball.move$IF_FALSE9
  234. copy_c 3, this 14
  235. d_load this 12
  236. copy_d this 1
  237. -- (Ball.move$IF_FALSE9)
  238. d_load this 1
  239. d_sub this 13
  240. jumpif_d lt -> Ball.move$IF_FALSE10
  241. copy_c 4, this 14
  242. d_load this 13
  243. copy_d this 1
  244. -- (Ball.move$IF_FALSE10)
  245. d_load ptr 0
  246. push_d
  247. call "Ball.show" 1
  248. d_load this 14
  249. copy_d ret
  250. return
  251. function "Ball.bounce" 5
  252. d_load arg 0
  253. copy_d ptr 0
  254. d_load this 2
  255. push_d
  256. push_c 10
  257. call "Math.divide" 2
  258. d_load ret
  259. copy_d lcl 2
  260. d_load this 3
  261. push_d
  262. push_c 10
  263. call "Math.divide" 2
  264. d_load ret
  265. copy_d lcl 3
  266. d_load arg 1
  267. jumpif_d ne -> Ball.bounce$IF_FALSE0
  268. copy_c 10, lcl 4
  269. jump -> Ball.bounce$IF_END0
  270. -- (Ball.bounce$IF_FALSE0)
  271. d_load this 2
  272. d_comp ge
  273. push_d
  274. d_load arg 1 [+65535]
  275. d_comp eq
  276. d_and pop
  277. push_d
  278. d_load this 2
  279. d_comp lt
  280. push_d
  281. d_load arg 1 [+1]
  282. d_comp eq
  283. d_and pop
  284. d_or pop
  285. jumpif_d eq -> Ball.bounce$IF_FALSE1
  286. copy_c 20, lcl 4
  287. jump -> Ball.bounce$IF_END1
  288. -- (Ball.bounce$IF_FALSE1)
  289. copy_c 5, lcl 4
  290. -- (Ball.bounce$IF_END1)
  291. -- (Ball.bounce$IF_END0)
  292. d_load this 14 [+65535]
  293. jumpif_d ne -> Ball.bounce$IF_FALSE2
  294. copy_c 506, lcl 0
  295. d_load lcl 3
  296. push_d
  297. push_c 65486
  298. call "Math.multiply" 2
  299. d_load ret
  300. push_d
  301. d_load lcl 2
  302. push_d
  303. call "Math.divide" 2
  304. d_load ret
  305. copy_d lcl 1
  306. d_load this 1
  307. push_d
  308. d_load lcl 1
  309. push_d
  310. d_load lcl 4
  311. push_d
  312. call "Math.multiply" 2
  313. d_load ret
  314. d_add pop
  315. copy_d lcl 1
  316. jump -> Ball.bounce$IF_END2
  317. -- (Ball.bounce$IF_FALSE2)
  318. d_load this 14 [+65534]
  319. jumpif_d ne -> Ball.bounce$IF_FALSE3
  320. copy_c 0, lcl 0
  321. d_load lcl 3
  322. push_d
  323. push_c 50
  324. call "Math.multiply" 2
  325. d_load ret
  326. push_d
  327. d_load lcl 2
  328. push_d
  329. call "Math.divide" 2
  330. d_load ret
  331. copy_d lcl 1
  332. d_load this 1
  333. push_d
  334. d_load lcl 1
  335. push_d
  336. d_load lcl 4
  337. push_d
  338. call "Math.multiply" 2
  339. d_load ret
  340. d_add pop
  341. copy_d lcl 1
  342. jump -> Ball.bounce$IF_END3
  343. -- (Ball.bounce$IF_FALSE3)
  344. d_load this 14 [+65533]
  345. jumpif_d ne -> Ball.bounce$IF_FALSE4
  346. copy_c 250, lcl 1
  347. d_load lcl 2
  348. push_d
  349. push_c 65511
  350. call "Math.multiply" 2
  351. d_load ret
  352. push_d
  353. d_load lcl 3
  354. push_d
  355. call "Math.divide" 2
  356. d_load ret
  357. copy_d lcl 0
  358. d_load this 0
  359. push_d
  360. d_load lcl 0
  361. push_d
  362. d_load lcl 4
  363. push_d
  364. call "Math.multiply" 2
  365. d_load ret
  366. d_add pop
  367. copy_d lcl 0
  368. jump -> Ball.bounce$IF_END4
  369. -- (Ball.bounce$IF_FALSE4)
  370. copy_c 0, lcl 1
  371. d_load lcl 2
  372. push_d
  373. push_c 25
  374. call "Math.multiply" 2
  375. d_load ret
  376. push_d
  377. d_load lcl 3
  378. push_d
  379. call "Math.divide" 2
  380. d_load ret
  381. copy_d lcl 0
  382. d_load this 0
  383. push_d
  384. d_load lcl 0
  385. push_d
  386. d_load lcl 4
  387. push_d
  388. call "Math.multiply" 2
  389. d_load ret
  390. d_add pop
  391. copy_d lcl 0
  392. -- (Ball.bounce$IF_END4)
  393. -- (Ball.bounce$IF_END3)
  394. -- (Ball.bounce$IF_END2)
  395. d_load ptr 0
  396. push_d
  397. d_load lcl 0
  398. push_d
  399. d_load lcl 1
  400. push_d
  401. call "Ball.setDestination" 3
  402. return
  403. module "Bat"
  404. function "Bat.new" 0
  405. push_c 5
  406. call "Memory.alloc" 1
  407. d_load ret
  408. copy_d ptr 0
  409. d_load arg 0
  410. copy_d this 0
  411. d_load arg 1
  412. copy_d this 1
  413. d_load arg 2
  414. copy_d this 2
  415. d_load arg 3
  416. copy_d this 3
  417. copy_c 2, this 4
  418. d_load ptr 0
  419. push_d
  420. call "Bat.show" 1
  421. d_load ptr 0
  422. copy_d ret
  423. return
  424. function "Bat.dispose" 0
  425. d_load arg 0
  426. copy_d ptr 0
  427. push_d
  428. call "Memory.deAlloc" 1
  429. return
  430. function "Bat.show" 0
  431. d_load arg 0
  432. copy_d ptr 0
  433. push_c 65535
  434. call "Screen.setColor" 1
  435. d_load ptr 0
  436. push_d
  437. call "Bat.draw" 1
  438. return
  439. function "Bat.hide" 0
  440. d_load arg 0
  441. copy_d ptr 0
  442. push_c 0
  443. call "Screen.setColor" 1
  444. d_load ptr 0
  445. push_d
  446. call "Bat.draw" 1
  447. return
  448. function "Bat.draw" 0
  449. d_load arg 0
  450. copy_d ptr 0
  451. d_load this 0
  452. push_d
  453. d_load this 1
  454. push_d
  455. d_load this 0
  456. d_add this 2
  457. push_d
  458. d_load this 1
  459. d_add this 3
  460. push_d
  461. call "Screen.drawRectangle" 4
  462. return
  463. function "Bat.setDirection" 0
  464. d_load arg 0
  465. copy_d ptr 0
  466. d_load arg 1
  467. copy_d this 4
  468. return
  469. function "Bat.getLeft" 0
  470. d_load arg 0
  471. copy_d ptr 0
  472. d_load this 0
  473. copy_d ret
  474. return
  475. function "Bat.getRight" 0
  476. d_load arg 0
  477. copy_d ptr 0
  478. d_load this 0
  479. d_add this 2
  480. copy_d ret
  481. return
  482. function "Bat.setWidth" 0
  483. d_load arg 0
  484. copy_d ptr 0
  485. push_d
  486. call "Bat.hide" 1
  487. d_load arg 1
  488. copy_d this 2
  489. d_load ptr 0
  490. push_d
  491. call "Bat.show" 1
  492. return
  493. function "Bat.move" 0
  494. d_load arg 0
  495. copy_d ptr 0
  496. d_load this 4 [+65535]
  497. jumpif_d ne -> Bat.move$IF_FALSE0
  498. m_op this 0 [+65532]
  499. d_pop
  500. jumpif_d ge -> Bat.move$IF_FALSE1
  501. copy_c 0, this 0
  502. -- (Bat.move$IF_FALSE1)
  503. push_c 0
  504. call "Screen.setColor" 1
  505. d_load this 0
  506. d_add this 2 [+1]
  507. push_d
  508. d_load this 1
  509. push_d
  510. d_load this 0
  511. d_add this 2 [+4]
  512. push_d
  513. d_load this 1
  514. d_add this 3
  515. push_d
  516. call "Screen.drawRectangle" 4
  517. push_c 65535
  518. call "Screen.setColor" 1
  519. d_load this 0
  520. push_d
  521. d_load this 1
  522. push_d
  523. d_load this 0 [+3]
  524. push_d
  525. d_load this 1
  526. d_add this 3
  527. push_d
  528. call "Screen.drawRectangle" 4
  529. jump -> Bat.move$IF_END0
  530. -- (Bat.move$IF_FALSE0)
  531. m_op this 0 [+4]
  532. d_pop
  533. d_add this 2 [+65025]
  534. jumpif_d le -> Bat.move$IF_FALSE2
  535. d_load this 2 [+65025]
  536. copy_d this 0
  537. -- (Bat.move$IF_FALSE2)
  538. push_c 0
  539. call "Screen.setColor" 1
  540. d_load this 0 [+65532]
  541. push_d
  542. d_load this 1
  543. push_d
  544. d_load this 0 [+65535]
  545. push_d
  546. d_load this 1
  547. d_add this 3
  548. push_d
  549. call "Screen.drawRectangle" 4
  550. push_c 65535
  551. call "Screen.setColor" 1
  552. d_load this 0
  553. d_add this 2 [+65533]
  554. push_d
  555. d_load this 1
  556. push_d
  557. d_load this 0
  558. d_add this 2
  559. push_d
  560. d_load this 1
  561. d_add this 3
  562. push_d
  563. call "Screen.drawRectangle" 4
  564. -- (Bat.move$IF_END0)
  565. return
  566. module "Keyboard"
  567. function "Keyboard.init" 0
  568. return
  569. function "Keyboard.keyPressed" 0
  570. push_c 24576
  571. call "Memory.peek" 1
  572. return
  573. module "Main"
  574. function "Main.main" 1
  575. call "PongGame.newInstance" 0
  576. call "PongGame.getInstance" 0
  577. d_load ret
  578. copy_d lcl 0
  579. push_d
  580. call "PongGame.run" 1
  581. d_load lcl 0
  582. push_d
  583. call "PongGame.dispose" 1
  584. return
  585. module "Math"
  586. function "Math.init" 1
  587. push_c 16
  588. call "Array.new" 1
  589. d_load ret
  590. copy_d stc 1
  591. push_c 16
  592. call "Array.new" 1
  593. d_load ret
  594. copy_d stc 0
  595. d_load stc 0 [+0]
  596. push_d
  597. copy_c 1, tmp 0
  598. d_pop
  599. copy_d ptr 1
  600. d_load tmp 0
  601. copy_d that 0
  602. -- (Math.init$WHILE_EXP0)
  603. d_load lcl 0 [+65521]
  604. jumpif_d ge -> Math.init$WHILE_END0
  605. m_op lcl 0 [+1]
  606. d_pop
  607. d_add stc 0
  608. push_d
  609. d_load lcl 0 [+65535]
  610. d_add stc 0
  611. copy_d ptr 1
  612. d_load that 0
  613. push_d
  614. d_load lcl 0 [+65535]
  615. d_add stc 0
  616. copy_d ptr 1
  617. d_pop
  618. d_add that 0
  619. copy_d tmp 0
  620. d_pop
  621. copy_d ptr 1
  622. d_load tmp 0
  623. copy_d that 0
  624. jump -> Math.init$WHILE_EXP0
  625. -- (Math.init$WHILE_END0)
  626. return
  627. function "Math.abs" 0
  628. d_load arg 0
  629. jumpif_d ge -> Math.abs$IF_FALSE0
  630. m_op arg 0 [0-]
  631. -- (Math.abs$IF_FALSE0)
  632. d_load arg 0
  633. copy_d ret
  634. return
  635. function "Math.multiply" 5
  636. d_load arg 0
  637. d_comp lt
  638. push_d
  639. d_load arg 1
  640. d_comp gt
  641. d_and pop
  642. push_d
  643. d_load arg 0
  644. d_comp gt
  645. push_d
  646. d_load arg 1
  647. d_comp lt
  648. d_and pop
  649. d_or pop
  650. copy_d lcl 4
  651. d_load arg 0
  652. push_d
  653. call "Math.abs" 1
  654. d_load ret
  655. copy_d arg 0
  656. d_load arg 1
  657. push_d
  658. call "Math.abs" 1
  659. d_load ret
  660. copy_d arg 1
  661. d_load arg 0
  662. d_sub arg 1
  663. jumpif_d ge -> Math.multiply$IF_FALSE0
  664. d_load arg 0
  665. copy_d lcl 1
  666. d_load arg 1
  667. copy_d arg 0
  668. d_load lcl 1
  669. copy_d arg 1
  670. -- (Math.multiply$IF_FALSE0)
  671. -- (Math.multiply$WHILE_EXP0)
  672. d_load lcl 2 [+65535]
  673. d_sub arg 1 [+65535]
  674. jumpif_d ge -> Math.multiply$WHILE_END0
  675. d_load lcl 3
  676. d_add stc 0
  677. copy_d ptr 1
  678. d_load that 0
  679. d_and arg 1
  680. jumpif_d eq -> Math.multiply$IF_FALSE1
  681. d_load arg 0
  682. m_add lcl 0
  683. d_load lcl 2
  684. push_d
  685. d_load lcl 3
  686. d_add stc 0
  687. copy_d ptr 1
  688. d_pop
  689. d_add that 0
  690. copy_d lcl 2
  691. -- (Math.multiply$IF_FALSE1)
  692. d_load arg 0
  693. m_add arg 0
  694. m_op lcl 3 [+1]
  695. jump -> Math.multiply$WHILE_EXP0
  696. -- (Math.multiply$WHILE_END0)
  697. d_load lcl 4
  698. jumpif_d eq -> Math.multiply$IF_FALSE2
  699. m_op lcl 0 [0-]
  700. -- (Math.multiply$IF_FALSE2)
  701. d_load lcl 0
  702. copy_d ret
  703. return
  704. function "Math.divide" 4
  705. d_load arg 1
  706. jumpif_d ne -> Math.divide$IF_FALSE0
  707. push_c 3
  708. call "Sys.error" 1
  709. -- (Math.divide$IF_FALSE0)
  710. d_load arg 0
  711. d_comp lt
  712. push_d
  713. d_load arg 1
  714. d_comp gt
  715. d_and pop
  716. push_d
  717. d_load arg 0
  718. d_comp gt
  719. push_d
  720. d_load arg 1
  721. d_comp lt
  722. d_and pop
  723. d_or pop
  724. copy_d lcl 2
  725. d_load stc 1 [+0]
  726. push_d
  727. d_load arg 1
  728. push_d
  729. call "Math.abs" 1
  730. d_load ret
  731. copy_d tmp 0
  732. d_pop
  733. copy_d ptr 1
  734. d_load tmp 0
  735. copy_d that 0
  736. d_load arg 0
  737. push_d
  738. call "Math.abs" 1
  739. d_load ret
  740. copy_d arg 0
  741. -- (Math.divide$WHILE_EXP0)
  742. d_load lcl 0 [+65521]
  743. d_comp ge
  744. d_or lcl 3 [+0]
  745. jumpif_d ne -> Math.divide$WHILE_END0
  746. push_c 32767
  747. d_load lcl 0
  748. d_add stc 1
  749. copy_d ptr 1
  750. d_pop
  751. d_sub that 0 [+65535]
  752. push_d
  753. d_load lcl 0
  754. d_add stc 1
  755. copy_d ptr 1
  756. d_pop
  757. d_sub that 0 [+65535]
  758. d_comp lt
  759. copy_d lcl 3
  760. jumpif_d ne -> Math.divide$IF_FALSE1
  761. d_load lcl 0 [+1]
  762. d_add stc 1
  763. push_d
  764. d_load lcl 0
  765. d_add stc 1
  766. copy_d ptr 1
  767. d_load that 0
  768. push_d
  769. d_load lcl 0
  770. d_add stc 1
  771. copy_d ptr 1
  772. d_pop
  773. d_add that 0
  774. copy_d tmp 0
  775. d_pop
  776. copy_d ptr 1
  777. d_load tmp 0
  778. copy_d that 0
  779. d_load lcl 0 [+1]
  780. d_add stc 1
  781. copy_d ptr 1
  782. d_load that 0 [+65535]
  783. d_sub arg 0 [+65535]
  784. d_comp gt
  785. copy_d lcl 3
  786. jumpif_d ne -> Math.divide$IF_FALSE2
  787. m_op lcl 0 [+1]
  788. -- (Math.divide$IF_FALSE2)
  789. -- (Math.divide$IF_FALSE1)
  790. jump -> Math.divide$WHILE_EXP0
  791. -- (Math.divide$WHILE_END0)
  792. -- (Math.divide$WHILE_EXP1)
  793. d_load lcl 0 [+1]
  794. jumpif_d le -> Math.divide$WHILE_END1
  795. d_load lcl 0
  796. d_add stc 1
  797. copy_d ptr 1
  798. d_load that 0 [+65535]
  799. d_sub arg 0 [+65535]
  800. jumpif_d gt -> Math.divide$IF_FALSE3
  801. d_load lcl 1
  802. push_d
  803. d_load lcl 0
  804. d_add stc 0
  805. copy_d ptr 1
  806. d_pop
  807. d_add that 0
  808. copy_d lcl 1
  809. d_load arg 0
  810. push_d
  811. d_load lcl 0
  812. d_add stc 1
  813. copy_d ptr 1
  814. d_pop
  815. d_sub that 0
  816. copy_d arg 0
  817. -- (Math.divide$IF_FALSE3)
  818. m_op lcl 0 [+65535]
  819. jump -> Math.divide$WHILE_EXP1
  820. -- (Math.divide$WHILE_END1)
  821. d_load lcl 2
  822. jumpif_d eq -> Math.divide$IF_FALSE4
  823. m_op lcl 1 [0-]
  824. -- (Math.divide$IF_FALSE4)
  825. d_load lcl 1
  826. copy_d ret
  827. return
  828. module "Memory"
  829. function "Memory.init" 0
  830. copy_c 0, stc 0
  831. d_load stc 0 [+2048]
  832. push_d
  833. copy_c 14334, tmp 0
  834. d_pop
  835. copy_d ptr 1
  836. d_load tmp 0
  837. copy_d that 0
  838. d_load stc 0 [+2049]
  839. push_d
  840. copy_c 2050, tmp 0
  841. d_pop
  842. copy_d ptr 1
  843. d_load tmp 0
  844. copy_d that 0
  845. return
  846. function "Memory.peek" 0
  847. d_load arg 0
  848. d_add stc 0
  849. copy_d ptr 1
  850. d_load that 0
  851. copy_d ret
  852. return
  853. function "Memory.alloc" 1
  854. d_load arg 0 [+65535]
  855. jumpif_d ge -> Memory.alloc$IF_FALSE0
  856. push_c 5
  857. call "Sys.error" 1
  858. -- (Memory.alloc$IF_FALSE0)
  859. copy_c 2048, lcl 0
  860. -- (Memory.alloc$WHILE_EXP0)
  861. d_load lcl 0 [+0]
  862. copy_d ptr 1
  863. d_load that 0
  864. d_sub arg 0
  865. jumpif_d ge -> Memory.alloc$WHILE_END0
  866. d_load lcl 0 [+1]
  867. copy_d ptr 1
  868. d_load that 0
  869. copy_d lcl 0
  870. jump -> Memory.alloc$WHILE_EXP0
  871. -- (Memory.alloc$WHILE_END0)
  872. d_load lcl 0
  873. d_add arg 0 [+49157]
  874. jumpif_d le -> Memory.alloc$IF_FALSE1
  875. push_c 6
  876. call "Sys.error" 1
  877. -- (Memory.alloc$IF_FALSE1)
  878. d_load lcl 0 [+0]
  879. copy_d ptr 1
  880. d_load that 0
  881. d_sub arg 0 [+2]
  882. jumpif_d le -> Memory.alloc$IF_FALSE2
  883. d_load arg 0 [+2]
  884. d_add lcl 0
  885. push_d
  886. d_load lcl 0 [+0]
  887. copy_d ptr 1
  888. d_load that 0
  889. d_sub arg 0 [+65534]
  890. copy_d tmp 0
  891. d_pop
  892. copy_d ptr 1
  893. d_load tmp 0
  894. copy_d that 0
  895. d_load lcl 0 [+1]
  896. copy_d ptr 1
  897. d_load that 0
  898. d_sub lcl 0 [+2]
  899. jumpif_d ne -> Memory.alloc$IF_FALSE3
  900. d_load arg 0 [+3]
  901. d_add lcl 0
  902. push_d
  903. d_load lcl 0
  904. d_add arg 0 [+4]
  905. copy_d tmp 0
  906. d_pop
  907. copy_d ptr 1
  908. d_load tmp 0
  909. copy_d that 0
  910. jump -> Memory.alloc$IF_END3
  911. -- (Memory.alloc$IF_FALSE3)
  912. d_load arg 0 [+3]
  913. d_add lcl 0
  914. push_d
  915. d_load lcl 0 [+1]
  916. copy_d ptr 1
  917. d_load that 0
  918. copy_d tmp 0
  919. d_pop
  920. copy_d ptr 1
  921. d_load tmp 0
  922. copy_d that 0
  923. -- (Memory.alloc$IF_END3)
  924. d_load lcl 0 [+1]
  925. push_d
  926. d_op [+65535]
  927. d_add arg 0 [+2]
  928. copy_d tmp 0
  929. d_pop
  930. copy_d ptr 1
  931. d_load tmp 0
  932. copy_d that 0
  933. -- (Memory.alloc$IF_FALSE2)
  934. d_load lcl 0 [+0]
  935. push_d
  936. copy_c 0, tmp 0
  937. d_pop
  938. copy_d ptr 1
  939. d_load tmp 0
  940. copy_d that 0
  941. d_load lcl 0 [+2]
  942. copy_d ret
  943. return
  944. function "Memory.deAlloc" 2
  945. d_load arg 0 [+65534]
  946. copy_d lcl 0
  947. d_load lcl 0 [+1]
  948. copy_d ptr 1
  949. d_load that 0
  950. copy_d lcl 1
  951. d_load lcl 1 [+0]
  952. copy_d ptr 1
  953. d_load that 0
  954. jumpif_d ne -> Memory.deAlloc$IF_FALSE0
  955. d_load lcl 0 [+0]
  956. push_d
  957. d_op [+1]
  958. copy_d ptr 1
  959. d_load that 0
  960. d_sub lcl 0 [+65534]
  961. copy_d tmp 0
  962. d_pop
  963. copy_d ptr 1
  964. d_load tmp 0
  965. copy_d that 0
  966. jump -> Memory.deAlloc$IF_END0
  967. -- (Memory.deAlloc$IF_FALSE0)
  968. d_load lcl 0 [+0]
  969. push_d
  970. d_op [+1]
  971. copy_d ptr 1
  972. d_load that 0
  973. d_sub lcl 0
  974. push_d
  975. d_load lcl 1 [+0]
  976. copy_d ptr 1
  977. d_pop
  978. d_add that 0
  979. copy_d tmp 0
  980. d_pop
  981. copy_d ptr 1
  982. d_load tmp 0
  983. copy_d that 0
  984. d_load lcl 1 [+1]
  985. copy_d ptr 1
  986. d_load that 0
  987. d_sub lcl 1 [+2]
  988. jumpif_d ne -> Memory.deAlloc$IF_FALSE1
  989. d_load lcl 0 [+1]
  990. push_d
  991. d_op [+1]
  992. copy_d tmp 0
  993. d_pop
  994. copy_d ptr 1
  995. d_load tmp 0
  996. copy_d that 0
  997. jump -> Memory.deAlloc$IF_END1
  998. -- (Memory.deAlloc$IF_FALSE1)
  999. d_load lcl 0 [+1]
  1000. push_d
  1001. d_load lcl 1 [+1]
  1002. copy_d ptr 1
  1003. d_load that 0
  1004. copy_d tmp 0
  1005. d_pop
  1006. copy_d ptr 1
  1007. d_load tmp 0
  1008. copy_d that 0
  1009. -- (Memory.deAlloc$IF_END1)
  1010. -- (Memory.deAlloc$IF_END0)
  1011. return
  1012. module "Output"
  1013. function "Output.init" 0
  1014. copy_c 16384, stc 4
  1015. copy_c 65535, stc 2
  1016. copy_c 32, stc 1
  1017. copy_c 0, stc 0
  1018. push_c 6
  1019. call "String.new" 1
  1020. d_load ret
  1021. copy_d stc 3
  1022. call "Output.initMap" 0
  1023. call "Output.createShiftedMap" 0
  1024. return
  1025. function "Output.initMap" 0
  1026. push_c 127
  1027. call "Array.new" 1
  1028. d_load ret
  1029. copy_d stc 5
  1030. push_c 0
  1031. push_c 63
  1032. push_d
  1033. push_d
  1034. push_d
  1035. push_d
  1036. push_d
  1037. push_d
  1038. push_d
  1039. push_d
  1040. push_c 0
  1041. push_d
  1042. call "Output.create" 12
  1043. push_c 32
  1044. push_c 0
  1045. push_d
  1046. push_d
  1047. push_d
  1048. push_d
  1049. push_d
  1050. push_d
  1051. push_d
  1052. push_d
  1053. push_d
  1054. push_d
  1055. call "Output.create" 12
  1056. push_c 33
  1057. push_c 12
  1058. push_c 30
  1059. push_d
  1060. push_d
  1061. push_c 12
  1062. push_d
  1063. push_c 0
  1064. push_c 12
  1065. push_d
  1066. push_c 0
  1067. push_d
  1068. call "Output.create" 12
  1069. push_c 34
  1070. push_c 54
  1071. push_d
  1072. push_c 20
  1073. push_c 0
  1074. push_d
  1075. push_d
  1076. push_d
  1077. push_d
  1078. push_d
  1079. push_d
  1080. push_d
  1081. call "Output.create" 12
  1082. push_c 35
  1083. push_c 0
  1084. push_c 18
  1085. push_d
  1086. push_c 63
  1087. push_c 18
  1088. push_d
  1089. push_c 63
  1090. push_c 18
  1091. push_d
  1092. push_c 0
  1093. push_d
  1094. call "Output.create" 12
  1095. push_c 36
  1096. push_c 12
  1097. push_c 30
  1098. push_c 51
  1099. push_c 3
  1100. push_c 30
  1101. push_c 48
  1102. push_c 51
  1103. push_c 30
  1104. push_c 12
  1105. push_d
  1106. push_c 0
  1107. call "Output.create" 12
  1108. push_c 37
  1109. push_c 0
  1110. push_d
  1111. push_c 35
  1112. push_c 51
  1113. push_c 24
  1114. push_c 12
  1115. push_c 6
  1116. push_c 51
  1117. push_c 49
  1118. push_c 0
  1119. push_d
  1120. call "Output.create" 12
  1121. push_c 38
  1122. push_c 12
  1123. push_c 30
  1124. push_d
  1125. push_c 12
  1126. push_c 54
  1127. push_c 27
  1128. push_d
  1129. push_d
  1130. push_c 54
  1131. push_c 0
  1132. push_d
  1133. call "Output.create" 12
  1134. push_c 39
  1135. push_c 12
  1136. push_d
  1137. push_c 6
  1138. push_c 0
  1139. push_d
  1140. push_d
  1141. push_d
  1142. push_d
  1143. push_d
  1144. push_d
  1145. push_d
  1146. call "Output.create" 12
  1147. push_c 40
  1148. push_c 24
  1149. push_c 12
  1150. push_c 6
  1151. push_d
  1152. push_d
  1153. push_d
  1154. push_d
  1155. push_c 12
  1156. push_c 24
  1157. push_c 0
  1158. push_d
  1159. call "Output.create" 12
  1160. push_c 41
  1161. push_c 6
  1162. push_c 12
  1163. push_c 24
  1164. push_d
  1165. push_d
  1166. push_d
  1167. push_d
  1168. push_c 12
  1169. push_c 6
  1170. push_c 0
  1171. push_d
  1172. call "Output.create" 12
  1173. push_c 42
  1174. push_c 0
  1175. push_d
  1176. push_d
  1177. push_c 51
  1178. push_c 30
  1179. push_c 63
  1180. push_c 30
  1181. push_c 51
  1182. push_c 0
  1183. push_d
  1184. push_d
  1185. call "Output.create" 12
  1186. push_c 43
  1187. push_c 0
  1188. push_d
  1189. push_d
  1190. push_c 12
  1191. push_d
  1192. push_c 63
  1193. push_c 12
  1194. push_d
  1195. push_c 0
  1196. push_d
  1197. push_d
  1198. call "Output.create" 12
  1199. push_c 44
  1200. push_c 0
  1201. push_d
  1202. push_d
  1203. push_d
  1204. push_d
  1205. push_d
  1206. push_d
  1207. push_c 12
  1208. push_d
  1209. push_c 6
  1210. push_c 0
  1211. call "Output.create" 12
  1212. push_c 45
  1213. push_c 0
  1214. push_d
  1215. push_d
  1216. push_d
  1217. push_d
  1218. push_c 63
  1219. push_c 0
  1220. push_d
  1221. push_d
  1222. push_d
  1223. push_d
  1224. call "Output.create" 12
  1225. push_c 46
  1226. push_c 0
  1227. push_d
  1228. push_d
  1229. push_d
  1230. push_d
  1231. push_d
  1232. push_d
  1233. push_c 12
  1234. push_d
  1235. push_c 0
  1236. push_d
  1237. call "Output.create" 12
  1238. push_c 47
  1239. push_c 0
  1240. push_d
  1241. push_c 32
  1242. push_c 48
  1243. push_c 24
  1244. push_c 12
  1245. push_c 6
  1246. push_c 3
  1247. push_c 1
  1248. push_c 0
  1249. push_d
  1250. call "Output.create" 12
  1251. push_c 48
  1252. push_c 12
  1253. push_c 30
  1254. push_c 51
  1255. push_d
  1256. push_d
  1257. push_d
  1258. push_d
  1259. push_c 30
  1260. push_c 12
  1261. push_c 0
  1262. push_d
  1263. call "Output.create" 12
  1264. push_c 49
  1265. push_c 12
  1266. push_c 14
  1267. push_c 15
  1268. push_c 12
  1269. push_d
  1270. push_d
  1271. push_d
  1272. push_d
  1273. push_c 63
  1274. push_c 0
  1275. push_d
  1276. call "Output.create" 12
  1277. push_c 50
  1278. push_c 30
  1279. push_c 51
  1280. push_c 48
  1281. push_c 24
  1282. push_c 12
  1283. push_c 6
  1284. push_c 3
  1285. push_c 51
  1286. push_c 63
  1287. push_c 0
  1288. push_d
  1289. call "Output.create" 12
  1290. push_c 51
  1291. push_c 30
  1292. push_c 51
  1293. push_c 48
  1294. push_d
  1295. push_c 28
  1296. push_c 48
  1297. push_d
  1298. push_c 51
  1299. push_c 30
  1300. push_c 0
  1301. push_d
  1302. call "Output.create" 12
  1303. push_c 52
  1304. push_c 16
  1305. push_c 24
  1306. push_c 28
  1307. push_c 26
  1308. push_c 25
  1309. push_c 63
  1310. push_c 24
  1311. push_d
  1312. push_c 60
  1313. push_c 0
  1314. push_d
  1315. call "Output.create" 12
  1316. push_c 53
  1317. push_c 63
  1318. push_c 3
  1319. push_d
  1320. push_c 31
  1321. push_c 48
  1322. push_d
  1323. push_d
  1324. push_c 51
  1325. push_c 30
  1326. push_c 0
  1327. push_d
  1328. call "Output.create" 12
  1329. push_c 54
  1330. push_c 28
  1331. push_c 6
  1332. push_c 3
  1333. push_d
  1334. push_c 31
  1335. push_c 51
  1336. push_d
  1337. push_d
  1338. push_c 30
  1339. push_c 0
  1340. push_d
  1341. call "Output.create" 12
  1342. push_c 55
  1343. push_c 63
  1344. push_c 49
  1345. push_c 48
  1346. push_d
  1347. push_c 24
  1348. push_c 12
  1349. push_d
  1350. push_d
  1351. push_d
  1352. push_c 0
  1353. push_d
  1354. call "Output.create" 12
  1355. push_c 56
  1356. push_c 30
  1357. push_c 51
  1358. push_d
  1359. push_d
  1360. push_c 30
  1361. push_c 51
  1362. push_d
  1363. push_d
  1364. push_c 30
  1365. push_c 0
  1366. push_d
  1367. call "Output.create" 12
  1368. push_c 57
  1369. push_c 30
  1370. push_c 51
  1371. push_d
  1372. push_d
  1373. push_c 62
  1374. push_c 48
  1375. push_d
  1376. push_c 24
  1377. push_c 14
  1378. push_c 0
  1379. push_d
  1380. call "Output.create" 12
  1381. push_c 58
  1382. push_c 0
  1383. push_d
  1384. push_c 12
  1385. push_d
  1386. push_c 0
  1387. push_d
  1388. push_c 12
  1389. push_d
  1390. push_c 0
  1391. push_d
  1392. push_d
  1393. call "Output.create" 12
  1394. push_c 59
  1395. push_c 0
  1396. push_d
  1397. push_c 12
  1398. push_d
  1399. push_c 0
  1400. push_d
  1401. push_c 12
  1402. push_d
  1403. push_c 6
  1404. push_c 0
  1405. push_d
  1406. call "Output.create" 12
  1407. push_c 60
  1408. push_c 0
  1409. push_d
  1410. push_c 24
  1411. push_c 12
  1412. push_c 6
  1413. push_c 3
  1414. push_c 6
  1415. push_c 12
  1416. push_c 24
  1417. push_c 0
  1418. push_d
  1419. call "Output.create" 12
  1420. push_c 61
  1421. push_c 0
  1422. push_d
  1423. push_d
  1424. push_c 63
  1425. push_c 0
  1426. push_d
  1427. push_c 63
  1428. push_c 0
  1429. push_d
  1430. push_d
  1431. push_d
  1432. call "Output.create" 12
  1433. push_c 62
  1434. push_c 0
  1435. push_d
  1436. push_c 3
  1437. push_c 6
  1438. push_c 12
  1439. push_c 24
  1440. push_c 12
  1441. push_c 6
  1442. push_c 3
  1443. push_c 0
  1444. push_d
  1445. call "Output.create" 12
  1446. push_c 64
  1447. push_c 30
  1448. push_c 51
  1449. push_d
  1450. push_c 59
  1451. push_d
  1452. push_d
  1453. push_c 27
  1454. push_c 3
  1455. push_c 30
  1456. push_c 0
  1457. push_d
  1458. call "Output.create" 12
  1459. push_c 63
  1460. push_c 30
  1461. push_c 51
  1462. push_d
  1463. push_c 24
  1464. push_c 12
  1465. push_d
  1466. push_c 0
  1467. push_c 12
  1468. push_d
  1469. push_c 0
  1470. push_d
  1471. call "Output.create" 12
  1472. push_c 65
  1473. push_c 12
  1474. push_c 30
  1475. push_c 51
  1476. push_d
  1477. push_c 63
  1478. push_c 51
  1479. push_d
  1480. push_d
  1481. push_d
  1482. push_c 0
  1483. push_d
  1484. call "Output.create" 12
  1485. push_c 66
  1486. push_c 31
  1487. push_c 51
  1488. push_d
  1489. push_d
  1490. push_c 31
  1491. push_c 51
  1492. push_d
  1493. push_d
  1494. push_c 31
  1495. push_c 0
  1496. push_d
  1497. call "Output.create" 12
  1498. push_c 67
  1499. push_c 28
  1500. push_c 54
  1501. push_c 35
  1502. push_c 3
  1503. push_d
  1504. push_d
  1505. push_c 35
  1506. push_c 54
  1507. push_c 28
  1508. push_c 0
  1509. push_d
  1510. call "Output.create" 12
  1511. push_c 68
  1512. push_c 15
  1513. push_c 27
  1514. push_c 51
  1515. push_d
  1516. push_d
  1517. push_d
  1518. push_d
  1519. push_c 27
  1520. push_c 15
  1521. push_c 0
  1522. push_d
  1523. call "Output.create" 12
  1524. push_c 69
  1525. push_c 63
  1526. push_c 51
  1527. push_c 35
  1528. push_c 11
  1529. push_c 15
  1530. push_c 11
  1531. push_c 35
  1532. push_c 51
  1533. push_c 63
  1534. push_c 0
  1535. push_d
  1536. call "Output.create" 12
  1537. push_c 70
  1538. push_c 63
  1539. push_c 51
  1540. push_c 35
  1541. push_c 11
  1542. push_c 15
  1543. push_c 11
  1544. push_c 3
  1545. push_d
  1546. push_d
  1547. push_c 0
  1548. push_d
  1549. call "Output.create" 12
  1550. push_c 71
  1551. push_c 28
  1552. push_c 54
  1553. push_c 35
  1554. push_c 3
  1555. push_c 59
  1556. push_c 51
  1557. push_d
  1558. push_c 54
  1559. push_c 44
  1560. push_c 0
  1561. push_d
  1562. call "Output.create" 12
  1563. push_c 72
  1564. push_c 51
  1565. push_d
  1566. push_d
  1567. push_d
  1568. push_c 63
  1569. push_c 51
  1570. push_d
  1571. push_d
  1572. push_d
  1573. push_c 0
  1574. push_d
  1575. call "Output.create" 12
  1576. push_c 73
  1577. push_c 30
  1578. push_c 12
  1579. push_d
  1580. push_d
  1581. push_d
  1582. push_d
  1583. push_d
  1584. push_d
  1585. push_c 30
  1586. push_c 0
  1587. push_d
  1588. call "Output.create" 12
  1589. push_c 74
  1590. push_c 60
  1591. push_c 24
  1592. push_d
  1593. push_d
  1594. push_d
  1595. push_d
  1596. push_c 27
  1597. push_d
  1598. push_c 14
  1599. push_c 0
  1600. push_d
  1601. call "Output.create" 12
  1602. push_c 75
  1603. push_c 51
  1604. push_d
  1605. push_d
  1606. push_c 27
  1607. push_c 15
  1608. push_c 27
  1609. push_c 51
  1610. push_d
  1611. push_d
  1612. push_c 0
  1613. push_d
  1614. call "Output.create" 12
  1615. push_c 76
  1616. push_c 3
  1617. push_d
  1618. push_d
  1619. push_d
  1620. push_d
  1621. push_d
  1622. push_c 35
  1623. push_c 51
  1624. push_c 63
  1625. push_c 0
  1626. push_d
  1627. call "Output.create" 12
  1628. push_c 77
  1629. push_c 33
  1630. push_c 51
  1631. push_c 63
  1632. push_d
  1633. push_c 51
  1634. push_d
  1635. push_d
  1636. push_d
  1637. push_d
  1638. push_c 0
  1639. push_d
  1640. call "Output.create" 12
  1641. push_c 78
  1642. push_c 51
  1643. push_d
  1644. push_c 55
  1645. push_d
  1646. push_c 63
  1647. push_c 59
  1648. push_d
  1649. push_c 51
  1650. push_d
  1651. push_c 0
  1652. push_d
  1653. call "Output.create" 12
  1654. push_c 79
  1655. push_c 30
  1656. push_c 51
  1657. push_d
  1658. push_d
  1659. push_d
  1660. push_d
  1661. push_d
  1662. push_d
  1663. push_c 30
  1664. push_c 0
  1665. push_d
  1666. call "Output.create" 12
  1667. push_c 80
  1668. push_c 31
  1669. push_c 51
  1670. push_d
  1671. push_d
  1672. push_c 31
  1673. push_c 3
  1674. push_d
  1675. push_d
  1676. push_d
  1677. push_c 0
  1678. push_d
  1679. call "Output.create" 12
  1680. push_c 81
  1681. push_c 30
  1682. push_c 51
  1683. push_d
  1684. push_d
  1685. push_d
  1686. push_d
  1687. push_c 63
  1688. push_c 59
  1689. push_c 30
  1690. push_c 48
  1691. push_c 0
  1692. call "Output.create" 12
  1693. push_c 82
  1694. push_c 31
  1695. push_c 51
  1696. push_d
  1697. push_d
  1698. push_c 31
  1699. push_c 27
  1700. push_c 51
  1701. push_d
  1702. push_d
  1703. push_c 0
  1704. push_d
  1705. call "Output.create" 12
  1706. push_c 83
  1707. push_c 30
  1708. push_c 51
  1709. push_d
  1710. push_c 6
  1711. push_c 28
  1712. push_c 48
  1713. push_c 51
  1714. push_d
  1715. push_c 30
  1716. push_c 0
  1717. push_d
  1718. call "Output.create" 12
  1719. push_c 84
  1720. push_c 63
  1721. push_d
  1722. push_c 45
  1723. push_c 12
  1724. push_d
  1725. push_d
  1726. push_d
  1727. push_d
  1728. push_c 30
  1729. push_c 0
  1730. push_d
  1731. call "Output.create" 12
  1732. push_c 85
  1733. push_c 51
  1734. push_d
  1735. push_d
  1736. push_d
  1737. push_d
  1738. push_d
  1739. push_d
  1740. push_d
  1741. push_c 30
  1742. push_c 0
  1743. push_d
  1744. call "Output.create" 12
  1745. push_c 86
  1746. push_c 51
  1747. push_d
  1748. push_d
  1749. push_d
  1750. push_d
  1751. push_c 30
  1752. push_d
  1753. push_c 12
  1754. push_d
  1755. push_c 0
  1756. push_d
  1757. call "Output.create" 12
  1758. push_c 87
  1759. push_c 51
  1760. push_d
  1761. push_d
  1762. push_d
  1763. push_d
  1764. push_c 63
  1765. push_d
  1766. push_d
  1767. push_c 18
  1768. push_c 0
  1769. push_d
  1770. call "Output.create" 12
  1771. push_c 88
  1772. push_c 51
  1773. push_d
  1774. push_c 30
  1775. push_d
  1776. push_c 12
  1777. push_c 30
  1778. push_d
  1779. push_c 51
  1780. push_d
  1781. push_c 0
  1782. push_d
  1783. call "Output.create" 12
  1784. push_c 89
  1785. push_c 51
  1786. push_d
  1787. push_d
  1788. push_d
  1789. push_c 30
  1790. push_c 12
  1791. push_d
  1792. push_d
  1793. push_c 30
  1794. push_c 0
  1795. push_d
  1796. call "Output.create" 12
  1797. push_c 90
  1798. push_c 63
  1799. push_c 51
  1800. push_c 49
  1801. push_c 24
  1802. push_c 12
  1803. push_c 6
  1804. push_c 35
  1805. push_c 51
  1806. push_c 63
  1807. push_c 0
  1808. push_d
  1809. call "Output.create" 12
  1810. push_c 91
  1811. push_c 30
  1812. push_c 6
  1813. push_d
  1814. push_d
  1815. push_d
  1816. push_d
  1817. push_d
  1818. push_d
  1819. push_c 30
  1820. push_c 0
  1821. push_d
  1822. call "Output.create" 12
  1823. push_c 92
  1824. push_c 0
  1825. push_d
  1826. push_c 1
  1827. push_c 3
  1828. push_c 6
  1829. push_c 12
  1830. push_c 24
  1831. push_c 48
  1832. push_c 32
  1833. push_c 0
  1834. push_d
  1835. call "Output.create" 12
  1836. push_c 93
  1837. push_c 30
  1838. push_c 24
  1839. push_d
  1840. push_d
  1841. push_d
  1842. push_d
  1843. push_d
  1844. push_d
  1845. push_c 30
  1846. push_c 0
  1847. push_d
  1848. call "Output.create" 12
  1849. push_c 94
  1850. push_c 8
  1851. push_c 28
  1852. push_c 54
  1853. push_c 0
  1854. push_d
  1855. push_d
  1856. push_d
  1857. push_d
  1858. push_d
  1859. push_d
  1860. push_d
  1861. call "Output.create" 12
  1862. push_c 95
  1863. push_c 0
  1864. push_d
  1865. push_d
  1866. push_d
  1867. push_d
  1868. push_d
  1869. push_d
  1870. push_d
  1871. push_d
  1872. push_c 63
  1873. push_c 0
  1874. call "Output.create" 12
  1875. push_c 96
  1876. push_c 6
  1877. push_c 12
  1878. push_c 24
  1879. push_c 0
  1880. push_d
  1881. push_d
  1882. push_d
  1883. push_d
  1884. push_d
  1885. push_d
  1886. push_d
  1887. call "Output.create" 12
  1888. push_c 97
  1889. push_c 0
  1890. push_d
  1891. push_d
  1892. push_c 14
  1893. push_c 24
  1894. push_c 30
  1895. push_c 27
  1896. push_d
  1897. push_c 54
  1898. push_c 0
  1899. push_d
  1900. call "Output.create" 12
  1901. push_c 98
  1902. push_c 3
  1903. push_d
  1904. push_d
  1905. push_c 15
  1906. push_c 27
  1907. push_c 51
  1908. push_d
  1909. push_d
  1910. push_c 30
  1911. push_c 0
  1912. push_d
  1913. call "Output.create" 12
  1914. push_c 99
  1915. push_c 0
  1916. push_d
  1917. push_d
  1918. push_c 30
  1919. push_c 51
  1920. push_c 3
  1921. push_d
  1922. push_c 51
  1923. push_c 30
  1924. push_c 0
  1925. push_d
  1926. call "Output.create" 12
  1927. push_c 100
  1928. push_c 48
  1929. push_d
  1930. push_d
  1931. push_c 60
  1932. push_c 54
  1933. push_c 51
  1934. push_d
  1935. push_d
  1936. push_c 30
  1937. push_c 0
  1938. push_d
  1939. call "Output.create" 12
  1940. push_c 101
  1941. push_c 0
  1942. push_d
  1943. push_d
  1944. push_c 30
  1945. push_c 51
  1946. push_c 63
  1947. push_c 3
  1948. push_c 51
  1949. push_c 30
  1950. push_c 0
  1951. push_d
  1952. call "Output.create" 12
  1953. push_c 102
  1954. push_c 28
  1955. push_c 54
  1956. push_c 38
  1957. push_c 6
  1958. push_c 15
  1959. push_c 6
  1960. push_d
  1961. push_d
  1962. push_c 15
  1963. push_c 0
  1964. push_d
  1965. call "Output.create" 12
  1966. push_c 103
  1967. push_c 0
  1968. push_d
  1969. push_c 30
  1970. push_c 51
  1971. push_d
  1972. push_d
  1973. push_c 62
  1974. push_c 48
  1975. push_c 51
  1976. push_c 30
  1977. push_c 0
  1978. call "Output.create" 12
  1979. push_c 104
  1980. push_c 3
  1981. push_d
  1982. push_d
  1983. push_c 27
  1984. push_c 55
  1985. push_c 51
  1986. push_d
  1987. push_d
  1988. push_d
  1989. push_c 0
  1990. push_d
  1991. call "Output.create" 12
  1992. push_c 105
  1993. push_c 12
  1994. push_d
  1995. push_c 0
  1996. push_c 14
  1997. push_c 12
  1998. push_d
  1999. push_d
  2000. push_d
  2001. push_c 30
  2002. push_c 0
  2003. push_d
  2004. call "Output.create" 12
  2005. push_c 106
  2006. push_c 48
  2007. push_d
  2008. push_c 0
  2009. push_c 56
  2010. push_c 48
  2011. push_d
  2012. push_d
  2013. push_d
  2014. push_c 51
  2015. push_c 30
  2016. push_c 0
  2017. call "Output.create" 12
  2018. push_c 107
  2019. push_c 3
  2020. push_d
  2021. push_d
  2022. push_c 51
  2023. push_c 27
  2024. push_c 15
  2025. push_d
  2026. push_c 27
  2027. push_c 51
  2028. push_c 0
  2029. push_d
  2030. call "Output.create" 12
  2031. push_c 108
  2032. push_c 14
  2033. push_c 12
  2034. push_d
  2035. push_d
  2036. push_d
  2037. push_d
  2038. push_d
  2039. push_d
  2040. push_c 30
  2041. push_c 0
  2042. push_d
  2043. call "Output.create" 12
  2044. push_c 109
  2045. push_c 0
  2046. push_d
  2047. push_d
  2048. push_c 29
  2049. push_c 63
  2050. push_c 43
  2051. push_d
  2052. push_d
  2053. push_d
  2054. push_c 0
  2055. push_d
  2056. call "Output.create" 12
  2057. push_c 110
  2058. push_c 0
  2059. push_d
  2060. push_d
  2061. push_c 29
  2062. push_c 51
  2063. push_d
  2064. push_d
  2065. push_d
  2066. push_d
  2067. push_c 0
  2068. push_d
  2069. call "Output.create" 12
  2070. push_c 111
  2071. push_c 0
  2072. push_d
  2073. push_d
  2074. push_c 30
  2075. push_c 51
  2076. push_d
  2077. push_d
  2078. push_d
  2079. push_c 30
  2080. push_c 0
  2081. push_d
  2082. call "Output.create" 12
  2083. push_c 112
  2084. push_c 0
  2085. push_d
  2086. push_d
  2087. push_c 30
  2088. push_c 51
  2089. push_d
  2090. push_d
  2091. push_c 31
  2092. push_c 3
  2093. push_d
  2094. push_c 0
  2095. call "Output.create" 12
  2096. push_c 113
  2097. push_c 0
  2098. push_d
  2099. push_d
  2100. push_c 30
  2101. push_c 51
  2102. push_d
  2103. push_d
  2104. push_c 62
  2105. push_c 48
  2106. push_d
  2107. push_c 0
  2108. call "Output.create" 12
  2109. push_c 114
  2110. push_c 0
  2111. push_d
  2112. push_d
  2113. push_c 29
  2114. push_c 55
  2115. push_c 51
  2116. push_c 3
  2117. push_d
  2118. push_c 7
  2119. push_c 0
  2120. push_d
  2121. call "Output.create" 12
  2122. push_c 115
  2123. push_c 0
  2124. push_d
  2125. push_d
  2126. push_c 30
  2127. push_c 51
  2128. push_c 6
  2129. push_c 24
  2130. push_c 51
  2131. push_c 30
  2132. push_c 0
  2133. push_d
  2134. call "Output.create" 12
  2135. push_c 116
  2136. push_c 4
  2137. push_c 6
  2138. push_d
  2139. push_c 15
  2140. push_c 6
  2141. push_d
  2142. push_d
  2143. push_c 54
  2144. push_c 28
  2145. push_c 0
  2146. push_d
  2147. call "Output.create" 12
  2148. push_c 117
  2149. push_c 0
  2150. push_d
  2151. push_d
  2152. push_c 27
  2153. push_d
  2154. push_d
  2155. push_d
  2156. push_d
  2157. push_c 54
  2158. push_c 0
  2159. push_d
  2160. call "Output.create" 12
  2161. push_c 118
  2162. push_c 0
  2163. push_d
  2164. push_d
  2165. push_c 51
  2166. push_d
  2167. push_d
  2168. push_d
  2169. push_c 30
  2170. push_c 12
  2171. push_c 0
  2172. push_d
  2173. call "Output.create" 12
  2174. push_c 119
  2175. push_c 0
  2176. push_d
  2177. push_d
  2178. push_c 51
  2179. push_d
  2180. push_d
  2181. push_c 63
  2182. push_d
  2183. push_c 18
  2184. push_c 0
  2185. push_d
  2186. call "Output.create" 12
  2187. push_c 120
  2188. push_c 0
  2189. push_d
  2190. push_d
  2191. push_c 51
  2192. push_c 30
  2193. push_c 12
  2194. push_d
  2195. push_c 30
  2196. push_c 51
  2197. push_c 0
  2198. push_d
  2199. call "Output.create" 12
  2200. push_c 121
  2201. push_c 0
  2202. push_d
  2203. push_d
  2204. push_c 51
  2205. push_d
  2206. push_d
  2207. push_c 62
  2208. push_c 48
  2209. push_c 24
  2210. push_c 15
  2211. push_c 0
  2212. call "Output.create" 12
  2213. push_c 122
  2214. push_c 0
  2215. push_d
  2216. push_d
  2217. push_c 63
  2218. push_c 27
  2219. push_c 12
  2220. push_c 6
  2221. push_c 51
  2222. push_c 63
  2223. push_c 0
  2224. push_d
  2225. call "Output.create" 12
  2226. push_c 123
  2227. push_c 56
  2228. push_c 12
  2229. push_d
  2230. push_d
  2231. push_c 7
  2232. push_c 12
  2233. push_d
  2234. push_d
  2235. push_c 56
  2236. push_c 0
  2237. push_d
  2238. call "Output.create" 12
  2239. push_c 124
  2240. push_c 12
  2241. push_d
  2242. push_d
  2243. push_d
  2244. push_d
  2245. push_d
  2246. push_d
  2247. push_d
  2248. push_d
  2249. push_c 0
  2250. push_d
  2251. call "Output.create" 12
  2252. push_c 125
  2253. push_c 7
  2254. push_c 12
  2255. push_d
  2256. push_d
  2257. push_c 56
  2258. push_c 12
  2259. push_d
  2260. push_d
  2261. push_c 7
  2262. push_c 0
  2263. push_d
  2264. call "Output.create" 12
  2265. push_c 126
  2266. push_c 38
  2267. push_c 45
  2268. push_c 25
  2269. push_c 0
  2270. push_d
  2271. push_d
  2272. push_d
  2273. push_d
  2274. push_d
  2275. push_d
  2276. push_d
  2277. call "Output.create" 12
  2278. return
  2279. function "Output.create" 1
  2280. push_c 11
  2281. call "Array.new" 1
  2282. d_load ret
  2283. copy_d lcl 0
  2284. d_load arg 0
  2285. d_add stc 5
  2286. push_d
  2287. d_load lcl 0
  2288. copy_d tmp 0
  2289. d_pop
  2290. copy_d ptr 1
  2291. d_load tmp 0
  2292. copy_d that 0
  2293. d_load lcl 0 [+0]
  2294. push_d
  2295. d_load arg 1
  2296. copy_d tmp 0
  2297. d_pop
  2298. copy_d ptr 1
  2299. d_load tmp 0
  2300. copy_d that 0
  2301. d_load lcl 0 [+1]
  2302. push_d
  2303. d_load arg 2
  2304. copy_d tmp 0
  2305. d_pop
  2306. copy_d ptr 1
  2307. d_load tmp 0
  2308. copy_d that 0
  2309. d_load lcl 0 [+2]
  2310. push_d
  2311. d_load arg 3
  2312. copy_d tmp 0
  2313. d_pop
  2314. copy_d ptr 1
  2315. d_load tmp 0
  2316. copy_d that 0
  2317. d_load lcl 0 [+3]
  2318. push_d
  2319. d_load arg 4
  2320. copy_d tmp 0
  2321. d_pop
  2322. copy_d ptr 1
  2323. d_load tmp 0
  2324. copy_d that 0
  2325. d_load lcl 0 [+4]
  2326. push_d
  2327. d_load arg 5
  2328. copy_d tmp 0
  2329. d_pop
  2330. copy_d ptr 1
  2331. d_load tmp 0
  2332. copy_d that 0
  2333. d_load lcl 0 [+5]
  2334. push_d
  2335. d_load arg 6
  2336. copy_d tmp 0
  2337. d_pop
  2338. copy_d ptr 1
  2339. d_load tmp 0
  2340. copy_d that 0
  2341. d_load lcl 0 [+6]
  2342. push_d
  2343. d_load arg 7
  2344. copy_d tmp 0
  2345. d_pop
  2346. copy_d ptr 1
  2347. d_load tmp 0
  2348. copy_d that 0
  2349. d_load lcl 0 [+7]
  2350. push_d
  2351. d_load arg 8
  2352. copy_d tmp 0
  2353. d_pop
  2354. copy_d ptr 1
  2355. d_load tmp 0
  2356. copy_d that 0
  2357. d_load lcl 0 [+8]
  2358. push_d
  2359. d_load arg 9
  2360. copy_d tmp 0
  2361. d_pop
  2362. copy_d ptr 1
  2363. d_load tmp 0
  2364. copy_d that 0
  2365. d_load lcl 0 [+9]
  2366. push_d
  2367. d_load arg 10
  2368. copy_d tmp 0
  2369. d_pop
  2370. copy_d ptr 1
  2371. d_load tmp 0
  2372. copy_d that 0
  2373. d_load lcl 0 [+10]
  2374. push_d
  2375. d_load arg 11
  2376. copy_d tmp 0
  2377. d_pop
  2378. copy_d ptr 1
  2379. d_load tmp 0
  2380. copy_d that 0
  2381. return
  2382. function "Output.createShiftedMap" 4
  2383. push_c 127
  2384. call "Array.new" 1
  2385. d_load ret
  2386. copy_d stc 6
  2387. copy_c 0, lcl 2
  2388. -- (Output.createShiftedMap$WHILE_EXP0)
  2389. d_load lcl 2 [+65409]
  2390. jumpif_d ge -> Output.createShiftedMap$WHILE_END0
  2391. d_load lcl 2
  2392. d_add stc 5
  2393. copy_d ptr 1
  2394. d_load that 0
  2395. copy_d lcl 0
  2396. push_c 11
  2397. call "Array.new" 1
  2398. d_load ret
  2399. copy_d lcl 1
  2400. d_load lcl 2
  2401. d_add stc 6
  2402. push_d
  2403. d_load lcl 1
  2404. copy_d tmp 0
  2405. d_pop
  2406. copy_d ptr 1
  2407. d_load tmp 0
  2408. copy_d that 0
  2409. copy_c 0, lcl 3
  2410. -- (Output.createShiftedMap$WHILE_EXP1)
  2411. d_load lcl 3 [+65525]
  2412. jumpif_d ge -> Output.createShiftedMap$WHILE_END1
  2413. d_load lcl 3
  2414. d_add lcl 1
  2415. push_d
  2416. d_load lcl 3
  2417. d_add lcl 0
  2418. copy_d ptr 1
  2419. d_load that 0
  2420. push_d
  2421. push_c 256
  2422. call "Math.multiply" 2
  2423. d_load ret
  2424. copy_d tmp 0
  2425. d_pop
  2426. copy_d ptr 1
  2427. d_load tmp 0
  2428. copy_d that 0
  2429. m_op lcl 3 [+1]
  2430. jump -> Output.createShiftedMap$WHILE_EXP1
  2431. -- (Output.createShiftedMap$WHILE_END1)
  2432. d_load lcl 2
  2433. jumpif_d ne -> Output.createShiftedMap$IF_FALSE0
  2434. copy_c 32, lcl 2
  2435. jump -> Output.createShiftedMap$IF_END0
  2436. -- (Output.createShiftedMap$IF_FALSE0)
  2437. m_op lcl 2 [+1]
  2438. -- (Output.createShiftedMap$IF_END0)
  2439. jump -> Output.createShiftedMap$WHILE_EXP0
  2440. -- (Output.createShiftedMap$WHILE_END0)
  2441. return
  2442. function "Output.getMap" 1
  2443. d_load arg 0 [+65504]
  2444. d_comp lt
  2445. push_d
  2446. d_load arg 0 [+65410]
  2447. d_comp gt
  2448. d_or pop
  2449. jumpif_d eq -> Output.getMap$IF_FALSE0
  2450. copy_c 0, arg 0
  2451. -- (Output.getMap$IF_FALSE0)
  2452. d_load stc 2
  2453. jumpif_d eq -> Output.getMap$IF_FALSE1
  2454. d_load arg 0
  2455. d_add stc 5
  2456. copy_d ptr 1
  2457. d_load that 0
  2458. copy_d lcl 0
  2459. jump -> Output.getMap$IF_END1
  2460. -- (Output.getMap$IF_FALSE1)
  2461. d_load arg 0
  2462. d_add stc 6
  2463. copy_d ptr 1
  2464. d_load that 0
  2465. copy_d lcl 0
  2466. -- (Output.getMap$IF_END1)
  2467. d_load lcl 0
  2468. copy_d ret
  2469. return
  2470. function "Output.drawChar" 4
  2471. d_load arg 0
  2472. push_d
  2473. call "Output.getMap" 1
  2474. d_load ret
  2475. copy_d lcl 2
  2476. d_load stc 1
  2477. copy_d lcl 0
  2478. -- (Output.drawChar$WHILE_EXP0)
  2479. d_load lcl 1 [+65525]
  2480. jumpif_d ge -> Output.drawChar$WHILE_END0
  2481. d_load stc 2
  2482. jumpif_d eq -> Output.drawChar$IF_FALSE0
  2483. d_load lcl 0
  2484. d_add stc 4
  2485. copy_d ptr 1
  2486. d_load that 0
  2487. d_and cte 65280
  2488. copy_d lcl 3
  2489. jump -> Output.drawChar$IF_END0
  2490. -- (Output.drawChar$IF_FALSE0)
  2491. d_load lcl 0
  2492. d_add stc 4
  2493. copy_d ptr 1
  2494. d_load that 0
  2495. d_and cte 255
  2496. copy_d lcl 3
  2497. -- (Output.drawChar$IF_END0)
  2498. d_load lcl 0
  2499. d_add stc 4
  2500. push_d
  2501. d_load lcl 1
  2502. d_add lcl 2
  2503. copy_d ptr 1
  2504. d_load that 0
  2505. d_or lcl 3
  2506. copy_d tmp 0
  2507. d_pop
  2508. copy_d ptr 1
  2509. d_load tmp 0
  2510. copy_d that 0
  2511. m_op lcl 0 [+32]
  2512. m_op lcl 1 [+1]
  2513. jump -> Output.drawChar$WHILE_EXP0
  2514. -- (Output.drawChar$WHILE_END0)
  2515. return
  2516. function "Output.moveCursor" 0
  2517. d_load arg 0
  2518. d_comp lt
  2519. push_d
  2520. d_load arg 0 [+65514]
  2521. d_comp gt
  2522. d_or pop
  2523. push_d
  2524. d_load arg 1
  2525. d_comp lt
  2526. d_or pop
  2527. push_d
  2528. d_load arg 1 [+65473]
  2529. d_comp gt
  2530. d_or pop
  2531. jumpif_d eq -> Output.moveCursor$IF_FALSE0
  2532. push_c 20
  2533. call "Sys.error" 1
  2534. -- (Output.moveCursor$IF_FALSE0)
  2535. d_load arg 1
  2536. push_d
  2537. push_c 2
  2538. call "Math.divide" 2
  2539. d_load ret
  2540. copy_d stc 0
  2541. push_c 32
  2542. d_load arg 0
  2543. push_d
  2544. push_c 352
  2545. call "Math.multiply" 2
  2546. d_load ret
  2547. d_add pop
  2548. d_add stc 0
  2549. copy_d stc 1
  2550. d_load arg 1
  2551. push_d
  2552. d_load stc 0
  2553. push_d
  2554. push_c 2
  2555. call "Math.multiply" 2
  2556. d_load ret
  2557. d_sub pop
  2558. d_comp eq
  2559. copy_d stc 2
  2560. push_c 32
  2561. call "Output.drawChar" 1
  2562. return
  2563. function "Output.printChar" 0
  2564. d_load arg 0
  2565. push_d
  2566. call "String.newLine" 0
  2567. d_load ret
  2568. d_sub pop
  2569. jumpif_d ne -> Output.printChar$IF_FALSE0
  2570. call "Output.println" 0
  2571. jump -> Output.printChar$IF_END0
  2572. -- (Output.printChar$IF_FALSE0)
  2573. d_load arg 0
  2574. push_d
  2575. call "String.backSpace" 0
  2576. d_load ret
  2577. d_sub pop
  2578. jumpif_d ne -> Output.printChar$IF_FALSE1
  2579. call "Output.backSpace" 0
  2580. jump -> Output.printChar$IF_END1
  2581. -- (Output.printChar$IF_FALSE1)
  2582. d_load arg 0
  2583. push_d
  2584. call "Output.drawChar" 1
  2585. d_load stc 2 [65535-]
  2586. jumpif_d eq -> Output.printChar$IF_FALSE2
  2587. m_op stc 0 [+1]
  2588. m_op stc 1 [+1]
  2589. -- (Output.printChar$IF_FALSE2)
  2590. d_load stc 0 [+65504]
  2591. jumpif_d ne -> Output.printChar$IF_FALSE3
  2592. call "Output.println" 0
  2593. jump -> Output.printChar$IF_END3
  2594. -- (Output.printChar$IF_FALSE3)
  2595. m_op stc 2 [65535-]
  2596. -- (Output.printChar$IF_END3)
  2597. -- (Output.printChar$IF_END1)
  2598. -- (Output.printChar$IF_END0)
  2599. return
  2600. function "Output.printString" 2
  2601. d_load arg 0
  2602. push_d
  2603. call "String.length" 1
  2604. d_load ret
  2605. copy_d lcl 1
  2606. -- (Output.printString$WHILE_EXP0)
  2607. d_load lcl 0
  2608. d_sub lcl 1
  2609. jumpif_d ge -> Output.printString$WHILE_END0
  2610. d_load arg 0
  2611. push_d
  2612. d_load lcl 0
  2613. push_d
  2614. call "String.charAt" 2
  2615. d_load ret
  2616. push_d
  2617. call "Output.printChar" 1
  2618. m_op lcl 0 [+1]
  2619. jump -> Output.printString$WHILE_EXP0
  2620. -- (Output.printString$WHILE_END0)
  2621. return
  2622. function "Output.printInt" 0
  2623. d_load stc 3
  2624. push_d
  2625. d_load arg 0
  2626. push_d
  2627. call "String.setInt" 2
  2628. d_load stc 3
  2629. push_d
  2630. call "Output.printString" 1
  2631. return
  2632. function "Output.println" 0
  2633. d_load stc 0 [0-]
  2634. m_sub stc 1 [65184-]
  2635. copy_c 0, stc 0
  2636. copy_c 65535, stc 2
  2637. d_load stc 1 [+57408]
  2638. jumpif_d ne -> Output.println$IF_FALSE0
  2639. copy_c 32, stc 1
  2640. -- (Output.println$IF_FALSE0)
  2641. return
  2642. function "Output.backSpace" 0
  2643. d_load stc 2
  2644. jumpif_d eq -> Output.backSpace$IF_FALSE0
  2645. d_load stc 0
  2646. jumpif_d le -> Output.backSpace$IF_FALSE1
  2647. m_op stc 0 [+65535]
  2648. m_op stc 1 [+65535]
  2649. jump -> Output.backSpace$IF_END1
  2650. -- (Output.backSpace$IF_FALSE1)
  2651. copy_c 31, stc 0
  2652. d_load stc 1 [+65504]
  2653. jumpif_d ne -> Output.backSpace$IF_FALSE2
  2654. copy_c 8128, stc 1
  2655. -- (Output.backSpace$IF_FALSE2)
  2656. m_op stc 1 [+65215]
  2657. -- (Output.backSpace$IF_END1)
  2658. copy_c 0, stc 2
  2659. jump -> Output.backSpace$IF_END0
  2660. -- (Output.backSpace$IF_FALSE0)
  2661. copy_c 65535, stc 2
  2662. -- (Output.backSpace$IF_END0)
  2663. push_c 32
  2664. call "Output.drawChar" 1
  2665. return
  2666. module "PongGame"
  2667. function "PongGame.new" 0
  2668. push_c 7
  2669. call "Memory.alloc" 1
  2670. d_load ret
  2671. copy_d ptr 0
  2672. call "Screen.clearScreen" 0
  2673. copy_c 50, this 6
  2674. push_c 230
  2675. push_c 229
  2676. d_load this 6
  2677. push_d
  2678. push_c 7
  2679. call "Bat.new" 4
  2680. d_load ret
  2681. copy_d this 0
  2682. push_c 253
  2683. push_c 222
  2684. push_c 0
  2685. push_c 511
  2686. push_c 0
  2687. push_c 229
  2688. call "Ball.new" 6
  2689. d_load ret
  2690. copy_d this 1
  2691. push_d
  2692. push_c 400
  2693. push_c 0
  2694. call "Ball.setDestination" 3
  2695. push_c 0
  2696. push_c 238
  2697. push_c 511
  2698. push_c 240
  2699. call "Screen.drawRectangle" 4
  2700. push_c 22
  2701. push_c 0
  2702. call "Output.moveCursor" 2
  2703. push_c 8
  2704. call "String.new" 1
  2705. d_load ret
  2706. push_d
  2707. push_c 83
  2708. call "String.appendChar" 2
  2709. d_load ret
  2710. push_d
  2711. push_c 99
  2712. call "String.appendChar" 2
  2713. d_load ret
  2714. push_d
  2715. push_c 111
  2716. call "String.appendChar" 2
  2717. d_load ret
  2718. push_d
  2719. push_c 114
  2720. call "String.appendChar" 2
  2721. d_load ret
  2722. push_d
  2723. push_c 101
  2724. call "String.appendChar" 2
  2725. d_load ret
  2726. push_d
  2727. push_c 58
  2728. call "String.appendChar" 2
  2729. d_load ret
  2730. push_d
  2731. push_c 32
  2732. call "String.appendChar" 2
  2733. d_load ret
  2734. push_d
  2735. push_c 48
  2736. call "String.appendChar" 2
  2737. d_load ret
  2738. push_d
  2739. call "Output.printString" 1
  2740. copy_c 0, this 3
  2741. copy_c 0, this 4
  2742. copy_c 0, this 2
  2743. copy_c 0, this 5
  2744. d_load ptr 0
  2745. copy_d ret
  2746. return
  2747. function "PongGame.dispose" 0
  2748. d_load arg 0
  2749. copy_d ptr 0
  2750. d_load this 0
  2751. push_d
  2752. call "Bat.dispose" 1
  2753. d_load this 1
  2754. push_d
  2755. call "Ball.dispose" 1
  2756. d_load ptr 0
  2757. push_d
  2758. call "Memory.deAlloc" 1
  2759. return
  2760. function "PongGame.newInstance" 0
  2761. call "PongGame.new" 0
  2762. d_load ret
  2763. copy_d stc 0
  2764. return
  2765. function "PongGame.getInstance" 0
  2766. d_load stc 0
  2767. copy_d ret
  2768. return
  2769. function "PongGame.run" 1
  2770. d_load arg 0
  2771. copy_d ptr 0
  2772. -- (PongGame.run$WHILE_EXP0)
  2773. d_load this 3 [+0]
  2774. jumpif_d ne -> PongGame.run$WHILE_END0
  2775. -- (PongGame.run$WHILE_EXP1)
  2776. d_load lcl 0
  2777. d_comp ne
  2778. d_or this 3 [+0]
  2779. jumpif_d ne -> PongGame.run$WHILE_END1
  2780. call "Keyboard.keyPressed" 0
  2781. d_load ret
  2782. copy_d lcl 0
  2783. d_load this 0
  2784. push_d
  2785. call "Bat.move" 1
  2786. d_load ptr 0
  2787. push_d
  2788. call "PongGame.moveBall" 1
  2789. push_c 50
  2790. call "Sys.wait" 1
  2791. jump -> PongGame.run$WHILE_EXP1
  2792. -- (PongGame.run$WHILE_END1)
  2793. d_load lcl 0 [+65406]
  2794. jumpif_d ne -> PongGame.run$IF_FALSE0
  2795. d_load this 0
  2796. push_d
  2797. push_c 1
  2798. call "Bat.setDirection" 2
  2799. jump -> PongGame.run$IF_END0
  2800. -- (PongGame.run$IF_FALSE0)
  2801. d_load lcl 0 [+65404]
  2802. jumpif_d ne -> PongGame.run$IF_FALSE1
  2803. d_load this 0
  2804. push_d
  2805. push_c 2
  2806. call "Bat.setDirection" 2
  2807. jump -> PongGame.run$IF_END1
  2808. -- (PongGame.run$IF_FALSE1)
  2809. d_load lcl 0 [+65396]
  2810. jumpif_d ne -> PongGame.run$IF_FALSE2
  2811. copy_c 65535, this 3
  2812. -- (PongGame.run$IF_FALSE2)
  2813. -- (PongGame.run$IF_END1)
  2814. -- (PongGame.run$IF_END0)
  2815. -- (PongGame.run$WHILE_EXP2)
  2816. d_load lcl 0
  2817. d_comp eq
  2818. d_or this 3 [+0]
  2819. jumpif_d ne -> PongGame.run$WHILE_END2
  2820. call "Keyboard.keyPressed" 0
  2821. d_load ret
  2822. copy_d lcl 0
  2823. d_load this 0
  2824. push_d
  2825. call "Bat.move" 1
  2826. d_load ptr 0
  2827. push_d
  2828. call "PongGame.moveBall" 1
  2829. push_c 50
  2830. call "Sys.wait" 1
  2831. jump -> PongGame.run$WHILE_EXP2
  2832. -- (PongGame.run$WHILE_END2)
  2833. jump -> PongGame.run$WHILE_EXP0
  2834. -- (PongGame.run$WHILE_END0)
  2835. d_load this 3
  2836. jumpif_d eq -> PongGame.run$IF_FALSE3
  2837. push_c 10
  2838. push_c 27
  2839. call "Output.moveCursor" 2
  2840. push_c 9
  2841. call "String.new" 1
  2842. d_load ret
  2843. push_d
  2844. push_c 71
  2845. call "String.appendChar" 2
  2846. d_load ret
  2847. push_d
  2848. push_c 97
  2849. call "String.appendChar" 2
  2850. d_load ret
  2851. push_d
  2852. push_c 109
  2853. call "String.appendChar" 2
  2854. d_load ret
  2855. push_d
  2856. push_c 101
  2857. call "String.appendChar" 2
  2858. d_load ret
  2859. push_d
  2860. push_c 32
  2861. call "String.appendChar" 2
  2862. d_load ret
  2863. push_d
  2864. push_c 79
  2865. call "String.appendChar" 2
  2866. d_load ret
  2867. push_d
  2868. push_c 118
  2869. call "String.appendChar" 2
  2870. d_load ret
  2871. push_d
  2872. push_c 101
  2873. call "String.appendChar" 2
  2874. d_load ret
  2875. push_d
  2876. push_c 114
  2877. call "String.appendChar" 2
  2878. d_load ret
  2879. push_d
  2880. call "Output.printString" 1
  2881. -- (PongGame.run$IF_FALSE3)
  2882. return
  2883. function "PongGame.moveBall" 5
  2884. d_load arg 0
  2885. copy_d ptr 0
  2886. d_load this 1
  2887. push_d
  2888. call "Ball.move" 1
  2889. d_load ret
  2890. copy_d this 2
  2891. d_comp gt
  2892. push_d
  2893. d_load this 2
  2894. d_sub this 5
  2895. d_comp ne
  2896. d_and pop
  2897. jumpif_d eq -> PongGame.moveBall$IF_FALSE0
  2898. d_load this 2
  2899. copy_d this 5
  2900. copy_c 0, lcl 0
  2901. d_load this 0
  2902. push_d
  2903. call "Bat.getLeft" 1
  2904. d_load ret
  2905. copy_d lcl 1
  2906. d_load this 0
  2907. push_d
  2908. call "Bat.getRight" 1
  2909. d_load ret
  2910. copy_d lcl 2
  2911. d_load this 1
  2912. push_d
  2913. call "Ball.getLeft" 1
  2914. d_load ret
  2915. copy_d lcl 3
  2916. d_load this 1
  2917. push_d
  2918. call "Ball.getRight" 1
  2919. d_load ret
  2920. copy_d lcl 4
  2921. d_load this 2 [+65532]
  2922. jumpif_d ne -> PongGame.moveBall$IF_FALSE1
  2923. d_load lcl 1
  2924. d_sub lcl 4
  2925. d_comp gt
  2926. push_d
  2927. d_load lcl 2
  2928. d_sub lcl 3
  2929. d_comp lt
  2930. d_or pop
  2931. copy_d this 3
  2932. jumpif_d ne -> PongGame.moveBall$IF_FALSE2
  2933. d_load lcl 4
  2934. d_sub lcl 1 [+10]
  2935. jumpif_d ge -> PongGame.moveBall$IF_FALSE3
  2936. copy_c 65535, lcl 0
  2937. jump -> PongGame.moveBall$IF_END3
  2938. -- (PongGame.moveBall$IF_FALSE3)
  2939. d_load lcl 3
  2940. d_sub lcl 2 [+65526]
  2941. jumpif_d le -> PongGame.moveBall$IF_FALSE4
  2942. copy_c 1, lcl 0
  2943. -- (PongGame.moveBall$IF_FALSE4)
  2944. -- (PongGame.moveBall$IF_END3)
  2945. m_op this 6 [+65534]
  2946. d_load this 0
  2947. push_d
  2948. d_load this 6
  2949. push_d
  2950. call "Bat.setWidth" 2
  2951. m_op this 4 [+1]
  2952. push_c 22
  2953. push_c 7
  2954. call "Output.moveCursor" 2
  2955. d_load this 4
  2956. push_d
  2957. call "Output.printInt" 1
  2958. -- (PongGame.moveBall$IF_FALSE2)
  2959. -- (PongGame.moveBall$IF_FALSE1)
  2960. d_load this 1
  2961. push_d
  2962. d_load lcl 0
  2963. push_d
  2964. call "Ball.bounce" 2
  2965. -- (PongGame.moveBall$IF_FALSE0)
  2966. return
  2967. module "Screen"
  2968. function "Screen.init" 1
  2969. copy_c 16384, stc 1
  2970. copy_c 65535, stc 2
  2971. push_c 17
  2972. call "Array.new" 1
  2973. d_load ret
  2974. copy_d stc 0
  2975. d_load stc 0 [+0]
  2976. push_d
  2977. copy_c 1, tmp 0
  2978. d_pop
  2979. copy_d ptr 1
  2980. d_load tmp 0
  2981. copy_d that 0
  2982. -- (Screen.init$WHILE_EXP0)
  2983. d_load lcl 0 [+65520]
  2984. jumpif_d ge -> Screen.init$WHILE_END0
  2985. m_op lcl 0 [+1]
  2986. d_pop
  2987. d_add stc 0
  2988. push_d
  2989. d_load lcl 0 [+65535]
  2990. d_add stc 0
  2991. copy_d ptr 1
  2992. d_load that 0
  2993. push_d
  2994. d_load lcl 0 [+65535]
  2995. d_add stc 0
  2996. copy_d ptr 1
  2997. d_pop
  2998. d_add that 0
  2999. copy_d tmp 0
  3000. d_pop
  3001. copy_d ptr 1
  3002. d_load tmp 0
  3003. copy_d that 0
  3004. jump -> Screen.init$WHILE_EXP0
  3005. -- (Screen.init$WHILE_END0)
  3006. return
  3007. function "Screen.clearScreen" 1
  3008. -- (Screen.clearScreen$WHILE_EXP0)
  3009. d_load lcl 0 [+57344]
  3010. jumpif_d ge -> Screen.clearScreen$WHILE_END0
  3011. d_load lcl 0
  3012. d_add stc 1
  3013. push_d
  3014. copy_c 0, tmp 0
  3015. d_pop
  3016. copy_d ptr 1
  3017. d_load tmp 0
  3018. copy_d that 0
  3019. m_op lcl 0 [+1]
  3020. jump -> Screen.clearScreen$WHILE_EXP0
  3021. -- (Screen.clearScreen$WHILE_END0)
  3022. return
  3023. function "Screen.updateLocation" 0
  3024. d_load stc 2
  3025. jumpif_d eq -> Screen.updateLocation$IF_FALSE0
  3026. d_load arg 0
  3027. d_add stc 1
  3028. push_d
  3029. d_load arg 0
  3030. d_add stc 1
  3031. copy_d ptr 1
  3032. d_load that 0
  3033. d_or arg 1
  3034. copy_d tmp 0
  3035. d_pop
  3036. copy_d ptr 1
  3037. d_load tmp 0
  3038. copy_d that 0
  3039. jump -> Screen.updateLocation$IF_END0
  3040. -- (Screen.updateLocation$IF_FALSE0)
  3041. d_load arg 0
  3042. d_add stc 1
  3043. push_d
  3044. d_load arg 0
  3045. d_add stc 1
  3046. copy_d ptr 1
  3047. d_load that 0 [65535-]
  3048. d_nor arg 1 [+0]
  3049. copy_d tmp 0
  3050. d_pop
  3051. copy_d ptr 1
  3052. d_load tmp 0
  3053. copy_d that 0
  3054. -- (Screen.updateLocation$IF_END0)
  3055. return
  3056. function "Screen.setColor" 0
  3057. d_load arg 0
  3058. copy_d stc 2
  3059. return
  3060. function "Screen.drawRectangle" 9
  3061. d_load arg 0
  3062. d_sub arg 2
  3063. d_comp gt
  3064. push_d
  3065. d_load arg 1
  3066. d_sub arg 3
  3067. d_comp gt
  3068. d_or pop
  3069. push_d
  3070. d_load arg 0
  3071. d_comp lt
  3072. d_or pop
  3073. push_d
  3074. d_load arg 2 [+65025]
  3075. d_comp gt
  3076. d_or pop
  3077. push_d
  3078. d_load arg 1
  3079. d_comp lt
  3080. d_or pop
  3081. push_d
  3082. d_load arg 3 [+65281]
  3083. d_comp gt
  3084. d_or pop
  3085. jumpif_d eq -> Screen.drawRectangle$IF_FALSE0
  3086. push_c 9
  3087. call "Sys.error" 1
  3088. -- (Screen.drawRectangle$IF_FALSE0)
  3089. d_load arg 0
  3090. push_d
  3091. push_c 16
  3092. call "Math.divide" 2
  3093. d_load ret
  3094. copy_d lcl 3
  3095. d_load arg 0
  3096. push_d
  3097. d_load lcl 3
  3098. push_d
  3099. push_c 16
  3100. call "Math.multiply" 2
  3101. d_load ret
  3102. d_sub pop
  3103. copy_d lcl 7
  3104. d_load arg 2
  3105. push_d
  3106. push_c 16
  3107. call "Math.divide" 2
  3108. d_load ret
  3109. copy_d lcl 4
  3110. d_load arg 2
  3111. push_d
  3112. d_load lcl 4
  3113. push_d
  3114. push_c 16
  3115. call "Math.multiply" 2
  3116. d_load ret
  3117. d_sub pop
  3118. copy_d lcl 8
  3119. d_load lcl 7
  3120. d_add stc 0
  3121. copy_d ptr 1
  3122. d_load that 0 [65535-]
  3123. copy_d lcl 6
  3124. d_load lcl 8 [+1]
  3125. d_add stc 0
  3126. copy_d ptr 1
  3127. d_load that 0 [+65535]
  3128. copy_d lcl 5
  3129. d_load arg 1
  3130. push_d
  3131. push_c 32
  3132. call "Math.multiply" 2
  3133. d_load ret
  3134. d_add lcl 3
  3135. copy_d lcl 0
  3136. d_load lcl 4
  3137. d_sub lcl 3
  3138. copy_d lcl 2
  3139. -- (Screen.drawRectangle$WHILE_EXP0)
  3140. d_load arg 1
  3141. d_sub arg 3
  3142. jumpif_d gt -> Screen.drawRectangle$WHILE_END0
  3143. d_load lcl 0
  3144. d_add lcl 2
  3145. copy_d lcl 1
  3146. d_load lcl 2
  3147. jumpif_d ne -> Screen.drawRectangle$IF_FALSE1
  3148. d_load lcl 0
  3149. push_d
  3150. d_load lcl 5
  3151. d_and lcl 6
  3152. push_d
  3153. call "Screen.updateLocation" 2
  3154. jump -> Screen.drawRectangle$IF_END1
  3155. -- (Screen.drawRectangle$IF_FALSE1)
  3156. d_load lcl 0
  3157. push_d
  3158. d_load lcl 6
  3159. push_d
  3160. call "Screen.updateLocation" 2
  3161. m_op lcl 0 [+1]
  3162. -- (Screen.drawRectangle$WHILE_EXP1)
  3163. d_load lcl 0
  3164. d_sub lcl 1
  3165. jumpif_d ge -> Screen.drawRectangle$WHILE_END1
  3166. d_load lcl 0
  3167. push_d
  3168. push_c 65535
  3169. call "Screen.updateLocation" 2
  3170. m_op lcl 0 [+1]
  3171. jump -> Screen.drawRectangle$WHILE_EXP1
  3172. -- (Screen.drawRectangle$WHILE_END1)
  3173. d_load lcl 1
  3174. push_d
  3175. d_load lcl 5
  3176. push_d
  3177. call "Screen.updateLocation" 2
  3178. -- (Screen.drawRectangle$IF_END1)
  3179. m_op arg 1 [+1]
  3180. d_load lcl 1 [+32]
  3181. d_sub lcl 2
  3182. copy_d lcl 0
  3183. jump -> Screen.drawRectangle$WHILE_EXP0
  3184. -- (Screen.drawRectangle$WHILE_END0)
  3185. return
  3186. module "String"
  3187. function "String.new" 0
  3188. push_c 3
  3189. call "Memory.alloc" 1
  3190. d_load ret
  3191. copy_d ptr 0
  3192. d_load arg 0
  3193. jumpif_d ge -> String.new$IF_FALSE0
  3194. push_c 14
  3195. call "Sys.error" 1
  3196. -- (String.new$IF_FALSE0)
  3197. d_load arg 0
  3198. jumpif_d le -> String.new$IF_FALSE1
  3199. d_load arg 0
  3200. push_d
  3201. call "Array.new" 1
  3202. d_load ret
  3203. copy_d this 1
  3204. -- (String.new$IF_FALSE1)
  3205. d_load arg 0
  3206. copy_d this 0
  3207. copy_c 0, this 2
  3208. d_load ptr 0
  3209. copy_d ret
  3210. return
  3211. function "String.length" 0
  3212. d_load arg 0
  3213. copy_d ptr 0
  3214. d_load this 2
  3215. copy_d ret
  3216. return
  3217. function "String.charAt" 0
  3218. d_load arg 0
  3219. copy_d ptr 0
  3220. d_load arg 1
  3221. d_comp lt
  3222. push_d
  3223. d_load arg 1
  3224. d_sub this 2
  3225. d_comp gt
  3226. d_or pop
  3227. push_d
  3228. d_load arg 1
  3229. d_sub this 2
  3230. d_comp eq
  3231. d_or pop
  3232. jumpif_d eq -> String.charAt$IF_FALSE0
  3233. push_c 15
  3234. call "Sys.error" 1
  3235. -- (String.charAt$IF_FALSE0)
  3236. d_load arg 1
  3237. d_add this 1
  3238. copy_d ptr 1
  3239. d_load that 0
  3240. copy_d ret
  3241. return
  3242. function "String.appendChar" 0
  3243. d_load arg 0
  3244. copy_d ptr 0
  3245. d_load this 2
  3246. d_sub this 0
  3247. jumpif_d ne -> String.appendChar$IF_FALSE0
  3248. push_c 17
  3249. call "Sys.error" 1
  3250. -- (String.appendChar$IF_FALSE0)
  3251. d_load this 2
  3252. d_add this 1
  3253. push_d
  3254. d_load arg 1
  3255. copy_d tmp 0
  3256. d_pop
  3257. copy_d ptr 1
  3258. d_load tmp 0
  3259. copy_d that 0
  3260. m_op this 2 [+1]
  3261. d_load ptr 0
  3262. copy_d ret
  3263. return
  3264. function "String.setInt" 4
  3265. d_load arg 0
  3266. copy_d ptr 0
  3267. d_load this 0
  3268. jumpif_d ne -> String.setInt$IF_FALSE0
  3269. push_c 19
  3270. call "Sys.error" 1
  3271. -- (String.setInt$IF_FALSE0)
  3272. push_c 6
  3273. call "Array.new" 1
  3274. d_load ret
  3275. copy_d lcl 2
  3276. d_load arg 1
  3277. jumpif_d ge -> String.setInt$IF_FALSE1
  3278. copy_c 65535, lcl 3
  3279. m_op arg 1 [0-]
  3280. -- (String.setInt$IF_FALSE1)
  3281. d_load arg 1
  3282. copy_d lcl 1
  3283. -- (String.setInt$WHILE_EXP0)
  3284. d_load lcl 1
  3285. jumpif_d le -> String.setInt$WHILE_END0
  3286. d_load arg 1
  3287. push_d
  3288. push_c 10
  3289. call "Math.divide" 2
  3290. d_load ret
  3291. copy_d lcl 1
  3292. d_load lcl 0
  3293. d_add lcl 2
  3294. push_d
  3295. push_c 48
  3296. d_load arg 1
  3297. push_d
  3298. d_load lcl 1
  3299. push_d
  3300. push_c 10
  3301. call "Math.multiply" 2
  3302. d_load ret
  3303. d_sub pop
  3304. d_add pop
  3305. copy_d tmp 0
  3306. d_pop
  3307. copy_d ptr 1
  3308. d_load tmp 0
  3309. copy_d that 0
  3310. m_op lcl 0 [+1]
  3311. d_load lcl 1
  3312. copy_d arg 1
  3313. jump -> String.setInt$WHILE_EXP0
  3314. -- (String.setInt$WHILE_END0)
  3315. d_load lcl 3
  3316. jumpif_d eq -> String.setInt$IF_FALSE2
  3317. d_load lcl 0
  3318. d_add lcl 2
  3319. push_d
  3320. copy_c 45, tmp 0
  3321. d_pop
  3322. copy_d ptr 1
  3323. d_load tmp 0
  3324. copy_d that 0
  3325. m_op lcl 0 [+1]
  3326. -- (String.setInt$IF_FALSE2)
  3327. d_load this 0
  3328. d_sub lcl 0
  3329. jumpif_d ge -> String.setInt$IF_FALSE3
  3330. push_c 19
  3331. call "Sys.error" 1
  3332. -- (String.setInt$IF_FALSE3)
  3333. d_load lcl 0
  3334. jumpif_d ne -> String.setInt$IF_FALSE4
  3335. d_load this 1 [+0]
  3336. push_d
  3337. copy_c 48, tmp 0
  3338. d_pop
  3339. copy_d ptr 1
  3340. d_load tmp 0
  3341. copy_d that 0
  3342. copy_c 1, this 2
  3343. jump -> String.setInt$IF_END4
  3344. -- (String.setInt$IF_FALSE4)
  3345. copy_c 0, this 2
  3346. -- (String.setInt$WHILE_EXP1)
  3347. d_load this 2
  3348. d_sub lcl 0
  3349. jumpif_d ge -> String.setInt$WHILE_END1
  3350. d_load this 2
  3351. d_add this 1
  3352. push_d
  3353. d_load lcl 0
  3354. d_sub this 2 [+1]
  3355. d_add lcl 2
  3356. copy_d ptr 1
  3357. d_load that 0
  3358. copy_d tmp 0
  3359. d_pop
  3360. copy_d ptr 1
  3361. d_load tmp 0
  3362. copy_d that 0
  3363. m_op this 2 [+1]
  3364. jump -> String.setInt$WHILE_EXP1
  3365. -- (String.setInt$WHILE_END1)
  3366. -- (String.setInt$IF_END4)
  3367. d_load lcl 2
  3368. push_d
  3369. call "Array.dispose" 1
  3370. return
  3371. function "String.newLine" 0
  3372. copy_c 128, ret
  3373. return
  3374. function "String.backSpace" 0
  3375. copy_c 129, ret
  3376. return
  3377. module "Sys"
  3378. function "Sys.init" 0
  3379. call "Memory.init" 0
  3380. call "Math.init" 0
  3381. call "Screen.init" 0
  3382. call "Output.init" 0
  3383. call "Keyboard.init" 0
  3384. call "Main.main" 0
  3385. call "Sys.halt" 0
  3386. return
  3387. function "Sys.halt" 0
  3388. -- (Sys.halt$WHILE_EXP0)
  3389. jump -> Sys.halt$WHILE_EXP0
  3390. -- (Sys.halt$WHILE_END0)
  3391. return
  3392. function "Sys.wait" 1
  3393. d_load arg 0
  3394. jumpif_d ge -> Sys.wait$IF_FALSE0
  3395. push_c 1
  3396. call "Sys.error" 1
  3397. -- (Sys.wait$IF_FALSE0)
  3398. -- (Sys.wait$WHILE_EXP0)
  3399. d_load arg 0
  3400. jumpif_d le -> Sys.wait$WHILE_END0
  3401. copy_c 50, lcl 0
  3402. -- (Sys.wait$WHILE_EXP1)
  3403. d_load lcl 0
  3404. jumpif_d le -> Sys.wait$WHILE_END1
  3405. m_op lcl 0 [+65535]
  3406. jump -> Sys.wait$WHILE_EXP1
  3407. -- (Sys.wait$WHILE_END1)
  3408. m_op arg 0 [+65535]
  3409. jump -> Sys.wait$WHILE_EXP0
  3410. -- (Sys.wait$WHILE_END0)
  3411. return
  3412. function "Sys.error" 0
  3413. push_c 3
  3414. call "String.new" 1
  3415. d_load ret
  3416. push_d
  3417. push_c 69
  3418. call "String.appendChar" 2
  3419. d_load ret
  3420. push_d
  3421. push_c 82
  3422. call "String.appendChar" 2
  3423. d_load ret
  3424. push_d
  3425. push_c 82
  3426. call "String.appendChar" 2
  3427. d_load ret
  3428. push_d
  3429. call "Output.printString" 1
  3430. d_load arg 0
  3431. push_d
  3432. call "Output.printInt" 1
  3433. call "Sys.halt" 0
  3434. return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement