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

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