Conway's Game of Life - 3D 68000er Assembler-Code für 8x8x8 Game of Life.
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.

systm_02.s 2.7KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. .INCLUDE 'SYSTM_01.IS'
  2. find_screens:
  3. move.w #2,-(sp)
  4. trap #14
  5. addq.l #2,sp
  6. move.l d0,screen2
  7. subi.l #$8000,d0
  8. move.l d0,screen1
  9. rts
  10. draw1_disp2:
  11. move.w #-1,-(sp)
  12. move.l screen2,-(sp)
  13. move.l screen1,-(sp)
  14. move.w #5,-(sp)
  15. trap #14
  16. lea $c(sp),sp
  17. lea scrn1_tbl,a0
  18. move.l a0,screen
  19. move.w #$25,-(sp)
  20. trap #14
  21. addq.l #2,sp
  22. rts
  23. draw2_disp1:
  24. move.w #-1,-(sp)
  25. move.l screen1,-(sp)
  26. move.l screen2,-(sp)
  27. move.w #5,-(sp)
  28. trap #14
  29. lea $c(sp),sp
  30. lea scrn2_tbl,a0
  31. move.l a0,screen
  32. move.w #$25,-(sp)
  33. trap #14
  34. addq.l #2,sp
  35. rts
  36. clear1:
  37. movea.l screen1,a3
  38. adda.l #32000,a3
  39. move.w #799,d7
  40. moveq.l #0,d0
  41. move.l d0,d1
  42. move.l d1,d2
  43. move.l d2,d3
  44. move.l d3,d4
  45. move.l d4,d5
  46. move.l d5,d6
  47. movea.l d6,a0
  48. movea.l a0,a1
  49. movea.l a1,a2
  50. clr1_1:
  51. movem.l d0-d6/a0-a2,-(a3)
  52. dbf d7,clr1_1
  53. rts
  54. clear2:
  55. movea.l screen2,a3
  56. adda.l #32000,a3
  57. move.w #799,d7
  58. moveq.l #0,d0
  59. move.l d0,d1
  60. move.l d1,d2
  61. move.l d2,d3
  62. move.l d3,d4
  63. move.l d4,d5
  64. move.l d5,d6
  65. movea.l d6,a0
  66. movea.l a0,a1
  67. movea.l a1,a2
  68. clr2_1:
  69. movem.l d0-d6/a0-a2,-(a3)
  70. dbf d7,clr2_1
  71. rts
  72. wrt_scrn1_tbl:
  73. move.l screen1,d0
  74. move.w #200-1,d1
  75. lea scrn1_tbl,a0
  76. lu1loop:
  77. move.l d0,(a0)+
  78. addi.w #160,d0
  79. dbra d1,lu1loop
  80. rts
  81. wrt_scrn2_tbl:
  82. move.l screen2,d0
  83. move.w #200-1,d1
  84. lea scrn2_tbl,a0
  85. lu2loop:
  86. move.l d0,(a0)+
  87. addi.w #160,d0
  88. dbra d1,lu2loop
  89. rts