Conway's Game of Life - 3D 68000er Assembler-Code für 8x8x8 Game of Life.
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. mse_off:
  2. pea mseoff_str
  3. move.w #0,-(sp)
  4. move.w #25,-(sp)
  5. trap #14
  6. addq.l #8,sp
  7. rts
  8. mse_rel:
  9. pea relmse_str
  10. move.w #0,-(sp)
  11. move.w #25,-(sp)
  12. trap #14
  13. addq.l #8,sp
  14. rts
  15. init_mse:
  16. move.w #34,-(sp)
  17. trap #14
  18. addq.l #2,sp
  19. movea.l d0,a0
  20. move.l 16(a0),gem_mse
  21. lea mse_handle,a1
  22. move.l a1,16(a0)
  23. rts
  24. mse_handle:
  25. clr.w d0
  26. move.b (a0)+,d0
  27. andi.w #3,d0
  28. move.w d0,mse_click
  29. move.b (a0)+,d0
  30. move.w d0,mouse_dx
  31. move.b (a0)+,d0
  32. move.w d0,mouse_dy
  33. rts
  34. mse_term:
  35. move.w #34,-(sp)
  36. trap #14
  37. addq.l #2,sp
  38. movea.l d0,a0
  39. movea.l gem_mse,a1
  40. move.l a1,16(a0)
  41. rts
  42. .DATA
  43. mseoff_str: .DC.b $12
  44. relmse_str: .DC.b $08
  45. .BSS
  46. gem_mse: .DS.l 1
  47. mse_click: .DS.w 1
  48. mouse_dx: .DS.w 1
  49. mouse_dy: .DS.w 1