home *** CD-ROM | disk | FTP | other *** search
/ Almathera Ten Pack 4: Demo 1 / almathera_demo1.bin / sourcecode / dexion / frekvensteller.s < prev    next >
Text File  |  1995-03-17  |  1KB  |  125 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. reset:
  42. clr.l    d2
  43. off:
  44. cmpi.b    #255,$dff006
  45. beq    graph
  46. btst    #7,$bfe001
  47. bne    off
  48. on:
  49. cmpi.b    #255,$dff006
  50. beq    graph
  51. btst    #7,$bfe001
  52. beq    on
  53. addi    #1,d2
  54. jmp    off
  55.  
  56. graph:
  57. btst    #6,$bfe001
  58. beq    quit
  59. clr.l    d0
  60. clr.l    d1
  61. jsr    setapen(A6)
  62. jsr    move(a6)
  63. move    #319,d0
  64. jsr    draw(a6)
  65. move    #1,d0
  66. jsr    setapen(a6)
  67. clr    d0
  68. jsr    move(a6)
  69. move    d2,d0
  70. jsr    draw(a6)
  71. jmp    reset
  72.  
  73. quit:
  74. rts
  75.  
  76. ;/////// my demo's over. //
  77.  
  78. copper0:dc.w    $0100,$1200
  79.  
  80.     dc.w    $008e,$2c81
  81.     dc.w    $0090,$f4c1
  82.     dc.w     $0092,$38
  83.     dc.w    $0094,$d0
  84.  
  85.     dc.w    $0108,$0000
  86.     dc.w    $010a,$0000
  87.  
  88.     dc.w    $00e0,$0007
  89.     dc.w    $00e2,$a000
  90.  
  91.     dc.w    $0180,$000
  92.     dc.w    $0182,$fff
  93.  
  94. dc.w $ffff,$fffe
  95.  
  96. ;*** gfx ***
  97. gfxbase:    dc.l    0
  98. gfxname:    dc.b    'graphics.library',0,0
  99.  
  100. getgfx:
  101.     move.l    4    ,a6
  102.     move.l    #gfxname,a1
  103.     jsr    -408(a6)
  104.     move.l    d0    ,gfxbase
  105. rts
  106.  
  107. ;*** change copper list ***
  108.  
  109. newcop: dc.l 0
  110. ;***
  111. changecop:
  112.     move.l    gfxbase    ,a0
  113.     move.l    newcop    ,50(a0)
  114. rts
  115.  
  116. ;*********
  117.  
  118. forbid =-132
  119. oldcopper:    dc.l 0
  120.  
  121. cleanitdown:
  122. move.l 4,a6
  123. jsr    -132(a6)
  124. rts
  125.