home *** CD-ROM | disk | FTP | other *** search
/ Almathera Ten Pack 4: Demo 1 / almathera_demo1.bin / sourcecode / dexion / rogers.s < prev    next >
Text File  |  1995-03-17  |  7KB  |  309 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. demo:
  42. move.l    #end,d3
  43. move.l    #text,d2
  44. sub.l    #1,d3
  45. move.l    d2,textpos
  46.  
  47. oloop:
  48. move.l    #6,d2
  49. move.l    #charset,a2
  50. move.l    textpos,a4
  51. clr.l    d0
  52. move.b    (a4),d0
  53. ;--SPECIAL FUNCTIONS--
  54. cmp.b    #'s',d0
  55. beq    changesize
  56. cmp.b    #'n',d0
  57. beq    newline
  58. cmp.b    #' ',d0
  59. beq    space
  60. cmp.b    #'l',d0
  61. beq    scroll
  62. cmp.b    #'c',d0
  63. beq    changec
  64. sub    #33,d0
  65. mulu    #28,d0
  66. add    d0,a2
  67. add.l    #1,textpos
  68. iloop:
  69. clr.l    d0
  70. clr.l    d1
  71. move.b    (a2)+,d0
  72. mulu    sz,d0
  73. add    x,d0
  74. move.b    (a2)+,d1
  75. mulu    sz,d1
  76. add    y,d1
  77. jsr    move(a6)
  78. move.b    (a2)+,d0
  79. mulu    sz,d0
  80. add    x,d0
  81. move.b    (a2)+,d1
  82. mulu    sz,d1
  83. add    y,d1
  84. jsr    draw(a6)
  85. dbra    d2,iloop
  86. canc:
  87. clr.l    d0
  88. move.w    sz,d0
  89. mulu    #4,d0
  90. add    d0,x
  91. cancel:
  92. cmp.l    textpos,d3
  93. bge        oloop
  94. rts
  95.  
  96. cls:
  97. move.l    #7999,d0
  98. move.l    #scr,a0
  99. cls1:
  100. move.b    #0,(a0)+
  101. dbra    d0,cls1
  102. rts
  103.  
  104. wait:
  105. move.l    #0,d1
  106. w0:
  107. move.l    #$ffff,d0
  108. w1:
  109. dbra    d0,w1
  110. dbra    d1,w0
  111. rts
  112. ;/////// my demo's over. //
  113.  
  114.  
  115. copper0:dc.w    $0100,$1200
  116.  
  117.     dc.w    $008e,$2c81
  118.     dc.w    $0090,$f4c1
  119.     dc.w     $0092,$38
  120.     dc.w    $0094,$d0
  121.  
  122.     dc.w    $0108,$0000
  123.     dc.w    $010a,$0000
  124.  
  125.     dc.w    $00e0,$0007
  126.     dc.w    $00e2,$a000
  127.  
  128.     dc.w    $0180,$00f
  129.     dc.w    $0182,$ff0
  130.  
  131. dc.w $ffff,$fffe
  132.  
  133. ;*** gfx ***
  134. gfxbase:    dc.l    0
  135. gfxname:    dc.b    'graphics.library',0,0
  136.  
  137. getgfx:
  138.     move.l    4    ,a6
  139.     move.l    #gfxname,a1
  140.     jsr    -408(a6)
  141.     move.l    d0    ,gfxbase
  142. rts
  143.  
  144. ;*** change copper list ***
  145.  
  146. newcop: dc.l 0
  147. ;***
  148. changecop:
  149.     move.l    gfxbase    ,a0
  150.     move.l    newcop    ,50(a0)
  151. rts
  152.  
  153. ;*********
  154.  
  155. forbid =-132
  156. oldcopper:    dc.l 0
  157.  
  158. cleanitdown:
  159. move.l 4,a6
  160. jsr    -132(a6)
  161. rts
  162.  
  163. charset:
  164. dc.b    1,0,1,2,1,3,1,3,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0;!
  165. dc.b    1,0,1,1,2,0,2,1,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0;"
  166. dc.b    1,0,1,3,2,0,2,3,0,1,3,1,0,2,3,2,1,0,1,0,1,0,1,0,1,0,1,0;#
  167. dc.b    0,0,3,0,0,0,0,2,1,0,1,3,0,2,3,2,3,2,3,3,0,3,3,3,2,0,2,3;$
  168. dc.b    0,3,3,0,0,0,0,0,3,3,3,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0;%
  169. dc.b    0,0,0,3,0,0,2,3,2,0,2,3,3,0,3,1,0,0,0,0,0,0,0,0,0,0,0,0;&
  170. dc.b    1,0,1,1,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0;'
  171. dc.b    1,0,0,1,0,1,0,2,0,2,1,3,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0;(
  172. dc.b    2,0,3,1,3,1,3,2,3,2,2,3,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0;)
  173. dc.b    1,0,3,0,0,2,1,0,1,0,1,3,0,2,3,2,0,2,0,3,1,0,1,0,1,0,1,0;AF
  174. dc.b    0,0,2,0,0,0,0,1,1,0,1,1,0,1,2,1,1,1,1,2,2,1,2,2,0,2,2,2;SS
  175. dc.b    1,3,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2;,
  176. dc.b    0,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2;-
  177. dc.b    1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3;.
  178. dc.b    0,3,3,0,3,0,3,0,3,0,3,0,3,0,3,0,3,0,3,0,3,0,3,0,3,0,3,0;/
  179. dc.b    0,0,3,0,3,0,3,3,0,3,3,3,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0;0
  180. dc.b    1,0,1,3,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0;1
  181. dc.b    0,0,3,0,3,0,3,2,0,2,3,2,0,2,0,3,0,3,3,3,0,0,0,0,0,0,0,0;2
  182. dc.b    0,0,3,0,3,0,3,3,0,3,3,3,1,2,3,2,0,0,0,0,0,0,0,0,0,0,0,0;3
  183. dc.b    0,0,0,2,0,2,3,2,3,0,3,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0;4
  184. dc.b    0,0,3,0,0,0,0,2,0,2,3,2,3,2,3,3,0,3,3,3,0,0,0,0,0,0,0,0;5
  185. dc.b    0,0,3,0,0,0,0,3,0,2,3,2,3,2,3,3,0,3,3,3,0,0,0,0,0,0,0,0;6
  186. dc.b    0,0,3,0,0,3,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0;7
  187. dc.b    0,0,3,0,3,0,3,3,0,0,0,3,0,2,3,2,0,3,3,3,0,0,0,0,0,0,0,0;8
  188. dc.b    0,0,3,0,0,0,0,2,0,2,3,2,3,0,3,3,0,0,0,0,0,0,0,0,0,0,0,0;9
  189. dc.b    1,0,1,0,1,3,1,3,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0;:
  190. dc.b    0,1,1,3,1,3,3,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1;Amiga
  191. dc.b    3,0,0,2,0,2,3,3,3,0,3,0,3,0,3,0,3,0,3,0,3,0,3,0,3,0,3,0;>
  192. dc.b    0,1,3,1,0,2,3,2,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1;=
  193. dc.b    0,0,3,2,0,3,3,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0;>
  194. dc.b    0,0,3,0,3,0,3,1,0,1,3,1,0,1,0,2,0,2,3,2,1,3,2,3,0,0,0,0;?
  195. dc.b    0,0,3,3,1,0,3,2,0,1,2,3,0,3,3,0,0,2,2,0,1,3,3,1,0,0,0,0;XX
  196. dc.b    0,0,3,0,0,0,0,3,3,0,3,3,0,2,3,2,0,0,0,0,0,0,0,0,0,0,0,0;A
  197. dc.b    0,0,0,3,0,0,3,0,3,0,3,1,3,1,2,1,2,1,3,2,3,2,3,3,0,3,3,3;B
  198. dc.b    0,0,3,0,0,0,0,3,0,3,3,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0;C
  199. dc.b    0,0,2,0,2,0,3,1,3,1,3,2,3,2,2,3,0,3,2,3,0,0,0,3,0,0,0,0;D
  200. dc.b    0,0,3,0,0,0,0,3,0,2,2,2,0,3,3,3,0,0,0,0,0,0,0,0,0,0,0,0;E
  201. dc.b    0,0,3,0,0,0,0,3,0,2,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0;F
  202. dc.b    0,0,3,0,0,0,0,3,0,3,3,3,3,2,1,2,3,2,3,3,0,0,0,0,0,0,0,0;G
  203. dc.b    0,0,0,3,0,2,3,2,3,0,3,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0;H
  204. dc.b    1,0,1,3,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0;I
  205. dc.b    3,0,3,3,3,3,0,3,0,3,0,2,3,0,3,0,3,0,3,0,3,0,3,0,3,0,3,0;J
  206. dc.b    0,0,0,3,0,2,3,0,0,2,3,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0;K
  207. dc.b    0,0,0,3,0,3,3,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0;L
  208. dc.b    0,0,0,3,0,0,1,1,1,1,3,0,3,0,3,3,0,0,0,0,0,0,0,0,0,0,0,0;M
  209. dc.b    0,0,0,3,0,0,3,3,3,0,3,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0;N
  210. dc.b    0,0,3,0,3,0,3,3,3,3,0,3,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0;O
  211. dc.b    0,0,3,0,3,0,3,2,0,0,0,3,0,2,3,2,0,0,0,0,0,0,0,0,0,0,0,0;P
  212. dc.b    0,0,3,0,3,0,3,3,0,0,0,3,0,3,3,3,2,2,3,3,0,0,0,0,0,0,0,0;Q
  213. dc.b    0,0,3,0,0,0,0,3,0,2,3,2,3,0,3,2,0,2,3,3,0,0,0,0,0,0,0,0;R
  214. dc.b    0,0,3,0,0,0,0,2,0,2,3,2,3,2,3,3,0,3,3,3,0,0,0,0,0,0,0,0;S
  215. dc.b    0,0,3,0,1,0,1,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0;T
  216. dc.b    0,0,0,3,0,3,3,3,3,0,3,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0;U
  217. dc.b    0,0,1,3,1,3,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0;V
  218. dc.b    0,0,0,3,0,3,1,2,1,2,3,3,3,0,3,3,0,0,0,0,0,0,0,0,0,0,0,0;W
  219. dc.b    0,0,3,3,3,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0;X
  220. dc.b    0,0,1,2,0,3,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0;Y
  221. dc.b    0,0,3,0,0,3,3,0,0,3,3,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0;Z
  222. dc.b    0,0,3,0,0,0,0,3,0,2,3,2,1,0,1,3,1,3,3,3,0,0,0,0,0,0,0,0;Æ
  223. dc.b    0,0,3,0,0,0,0,3,0,3,3,0,3,0,3,3,0,3,3,3,0,0,0,0,0,0,0,0;Ø
  224. dc.b    0,1,3,1,2,0,1,0,0,2,3,2,3,1,3,3,0,1,0,3,1,0,1,0,1,0,1,0;Å
  225.  
  226. sz:
  227. dc.w    2
  228.  
  229. x:
  230. dc.w    0
  231.  
  232. y:
  233. dc.w    0
  234.  
  235. textpos:    dc.l    0
  236.  
  237. changesize:
  238. clr.l    d0
  239. addi    #1,a4
  240. move.b    (a4),d0
  241. move.w    d0,sz
  242. addi.l    #2,textpos
  243. jmp    cancel
  244.  
  245. newline:
  246. clr.l    d4
  247. move.w    sz,d4
  248. mulu    #4,d4
  249. addi.w    d4,y
  250. move.w    #0,x
  251. addi.l    #1,textpos
  252. jmp    cancel
  253.  
  254. space:
  255. addi.l    #1,textpos
  256. jmp    canc
  257.  
  258. scroll:
  259. move.w    #0,x
  260. add.l    #1,textpos
  261. clr.l    d6
  262. move.w    sz,d6
  263. mulu    #2,d6
  264. sub    #1,d6
  265. move.l    #7921,d0
  266. oloopsc:
  267. move.l    #scr,a4
  268. move.l    a4,a5
  269. add.l    #80,a5
  270. sub.l    #2,d0
  271. move.l    d0,d5
  272. iloopsc:
  273. move.b    (a5)+,(a4)+
  274. dbra    d5,iloopsc
  275. move.l    #scr,a4
  276. add.l    #7920,a4
  277. move.l    #79,d1
  278. loopsc2:
  279. move.b    #0,(a4)+
  280. dbra    d1,loopsc2
  281. move.l    #$ff,d1
  282. wloopsc:
  283. dbra    d1,wloopsc
  284. dbra    d6,oloopsc
  285. jmp    cancel
  286.  
  287. changec:
  288. addi.l    #1,textpos
  289. move.l    textpos,a5
  290. clr.l    d0
  291. move.b    (a5),d0
  292. move.w    d0,x
  293. addi.l    #1,textpos
  294. move.l    textpos,a5
  295. clr.l    d0
  296. move.b    (a5),d0
  297. move.w    d0,y
  298. addi.l    #1,textpos
  299. jmp    cancel
  300.  
  301. text:
  302. dc.b    'c',0,100,'s',8,'ROGER!'
  303. dc.b    'c',1,101,'s',8,'ROGER!lllllllll'
  304. dc.b    'c',0,0,'s',2,'HERE IS YOUR DISK.nHERE IS YOUR DEMO.'
  305. dc.b    'c',0,8,'        ----'
  306. dc.b    'c',0,8,'        IIIIn'
  307. dc.b    '      !! MY !!'
  308. end:
  309.