Advertisement
ahmad_zizo

diamond assembly

Dec 19th, 2014
199
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.89 KB | None | 0 0
  1. test start 1000
  2. clear a
  3. clear b
  4. clear s
  5. clear t
  6. clear x
  7. lds #4
  8. ldb #1
  9. .
  10. .
  11. .
  12. loop1 j pspace0
  13. loop11 rmo s,a
  14. sub #1
  15. comp #0
  16. jlt loop21
  17. rmo a,s
  18. rmo b,a
  19. add #2
  20. rmo a,b
  21. j loop1
  22. .
  23. .
  24. .
  25. loop2 j pspace2
  26. loop21 rmo s,a
  27. add #1
  28. comp #4
  29. jgt exit
  30. rmo a,s
  31. rmo b,a
  32. sub #2
  33. rmo a,b
  34. j loop2
  35. .
  36. .
  37. .
  38. pspace0 rmo s,t
  39. pspace1 td outdev
  40. jeq pspace1
  41. ldch space
  42. wd outdev
  43. rmo t,a
  44. sub #1
  45. rmo a,t
  46. comp #0
  47. jeq pstar0
  48. jgt pspace1
  49. .
  50. .
  51. .
  52. pstar0 ldx #1
  53. pstar1 td outdev
  54. jeq pstar1
  55. ldch star
  56. wd outdev
  57. tixr b
  58. jgt prntln1
  59. j pstar1
  60. .
  61. .
  62. .
  63. prntln1 td outdev
  64. jeq prntln1
  65. lda #10
  66. wd outdev
  67. j loop11
  68. .
  69. .
  70. .
  71.  
  72. pspace2 rmo s,t
  73. pspace3 td outdev
  74. jeq pspace3
  75. ldch space
  76. wd outdev
  77. rmo t,a
  78. sub #1
  79. rmo a,t
  80. comp #0
  81. jeq pstar2
  82. jgt pspace1
  83. .
  84. .
  85. .
  86. pstar2 ldx #1
  87. pstar3 td outdev
  88. jeq pstar3
  89. ldch star
  90. wd outdev
  91. tixr b
  92. jgt prntln2
  93. j pstar3
  94. .
  95. .
  96. .
  97. prntln2 td outdev
  98. jeq prntln2
  99. lda #10
  100. wd outdev
  101. j loop21
  102. .
  103. .
  104. .
  105. star byte c'*'
  106. outdev byte x'06'
  107. space byte c' '
  108. exit end test
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement