home *** CD-ROM | disk | FTP | other *** search
/ Almathera Ten Pack 4: Demo 1 / almathera_demo1.bin / sourcecode / dexion / pointer.s < prev    next >
Text File  |  1995-03-17  |  1KB  |  121 lines

  1. scr=$7a000
  2. struc=$7d000
  3. rastport=struc+100
  4.  
  5. setupsystem:
  6.  
  7. bsr getgfx
  8. bsr cleanitdown
  9.  
  10.  
  11. move.w #8000-1 ,d0
  12. move.l #scr ,a0
  13. slet: move.b #0 ,(a0)+
  14. dbra d0 ,slet
  15.  
  16. move.l #scr ,a0
  17. move.l a0 ,struc+8
  18. move.l #struc ,a0
  19. moveq #1 ,d0
  20. move.l #320 ,d1
  21. move.l #200 ,d2
  22. move.l gfxbase ,a6
  23. jsr -390(a6)
  24. move.l #rastport ,a1
  25. jsr -198(a6)
  26. move.l #struc,rastport+4
  27.  
  28. move.l #copper0,newcop
  29. bsr changecop
  30.  
  31. ;--DEMO
  32.  
  33. move=-240
  34. draw=-246
  35. setapen=-342
  36.  
  37. move.l #rastport,a1
  38.  
  39. ;/////// my demo!!! ///////
  40. loop:
  41. clr.l    d0
  42. clr.l    d1
  43. move.b    $dff00a,d1
  44. move.b    $dff00b,d0
  45. jsr    putpoint
  46. btst    #6,$bfe001
  47. bne    loop
  48. rts
  49.  
  50. putpoint:
  51. mulu    #40,d1
  52. divu    #8,d0
  53. add.w    d0,d1
  54.  
  55. clr.w    d0
  56. divu    #$1000,d0
  57. divu    #$10,d0
  58.  
  59. move.l    d1,a0
  60. add.l    #scr,a0
  61.  
  62. move.l    #7,d1
  63. sub    d0,d1
  64. bset    d1,(a0)
  65. rts
  66.         
  67. ;/////// my demo's over. //
  68.  
  69. copper0:dc.w    $0100,$1200
  70.  
  71.     dc.w    $008e,$2c81
  72.     dc.w    $0090,$f4c1
  73.     dc.w     $0092,$38
  74.     dc.w    $0094,$d0
  75.  
  76.     dc.w    $0108,$0000
  77.     dc.w    $010a,$0000
  78.  
  79.     dc.w    $00e0,$0007
  80.     dc.w    $00e2,$a000
  81.  
  82.     dc.w    $0180,$000
  83.     dc.w    $0182,$fff
  84.  
  85. dc.w $ffff,$fffe
  86.  
  87. ;*** gfx ***
  88. gfxbase:    dc.l    0
  89. gfxname:    dc.b    'graphics.library',0,0
  90.  
  91. getgfx:
  92.     move.l    4    ,a6
  93.     move.l    #gfxname,a1
  94.     jsr    -408(a6)
  95.     move.l    d0    ,gfxbase
  96. rts
  97.  
  98. ;*** change copper list ***
  99.  
  100. newcop: dc.l 0
  101. ;***
  102. changecop:
  103.     move.l    gfxbase    ,a0
  104.     move.l    newcop    ,50(a0)
  105. rts
  106.  
  107. ;*********
  108.  
  109. forbid =-132
  110. oldcopper:    dc.l 0
  111.  
  112. cleanitdown:
  113. move.l 4,a6
  114. jsr    -132(a6)
  115. rts
  116.  
  117. even
  118.  
  119. accx:    dc.l    0
  120. accy:    dc.l    -1
  121.