home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 423.lha / FurLess / FurLess.i < prev    next >
Encoding:
Text File  |  1990-09-03  |  9.2 KB  |  365 lines

  1. *********************************************************
  2. *                            *
  3. * FurLess.a - Produced for an entry to the 'neatest    *
  4. *    program under 2K' contest at the ASDF 010th    *
  5. *    annual GURU meditation by:            *
  6. *                            *
  7. *        Wesley Howe                *
  8. *        10-Jun-90                *
  9. *                            *
  10. * Assembled with CAPE (of course.)            *
  11. *                            *
  12. *********************************************************
  13. *
  14. *--------------------------------------------------------------------------
  15. * hardware addresses: see the hardware RKM
  16. *--------------------------------------------------------------------------
  17. *
  18. CUSTOM    EQU    $DFF000    ;base address of the custom chips
  19. AUD0LC    EQU    $A0    ;Start of data table for DMA
  20. AUD0LEN    EQU    $A4    ;Length of data table in Words
  21. AUD0PER    EQU    $A6    ;Time per word of data in ticks
  22. AUD0VOL    EQU    $A8    ;Volume (0 to 64)
  23. AUD0DAT    EQU    $AA
  24. AUD1LC    EQU    $B0
  25. AUD1LEN    EQU    $B4
  26. AUD1PER    EQU    $B6
  27. AUD1VOL    EQU    $B8
  28. AUD1DAT    EQU    $BA
  29. AUD2LC    EQU    $C0
  30. AUD2LEN    EQU    $C4
  31. AUD2PER    EQU    $C6
  32. AUD2VOL    EQU    $C8
  33. AUD2DAT    EQU    $CA
  34. AUD3LC    EQU    $D0
  35. AUD3LEN    EQU    $D4
  36. AUD3PER    EQU    $D6
  37. AUD3VOL    EQU    $D8
  38. AUD3DAT    EQU    $DA
  39. DMACONW    EQU    $96    ;DMA control write (clear or set)
  40. ADKCONW    EQU    $9E
  41. *
  42. *-------------------------------------------------------------------------
  43. * hardware bit definitions: see the hardware RKM
  44. *-------------------------------------------------------------------------
  45. *
  46. ATVOL0    EQU    $01    ;attach channel 0
  47. ATVOL1    EQU    $02
  48. ATVOL2    EQU    $04
  49. ATVOL3    EQU    $08
  50. ATPER0    EQU    $10
  51. ATPER1    EQU    $20
  52. ATPER2    EQU    $40
  53. ATPER3    EQU    $80
  54. AUD0EN    EQU    $01    ;enable channel 0
  55. AUD1EN    EQU    $02
  56. AUD2EN    EQU    $04
  57. AUD3EN    EQU    $08
  58. MSET    EQU    $8000    ;set bits that are ones
  59. CLEAR    EQU    $00    ;clear bits that are ones
  60. DMAEN    EQU    $0200    ;enable hardware DMA
  61. *
  62. *-------------------------------------------------------------------------
  63. * some general equates we need, gleaned from the RKM's
  64. *-------------------------------------------------------------------------
  65. *
  66. MEMF_CHIP    EQU    2
  67. MEMF_CLEAR    EQU    $10000
  68. NT_MSGPORT    EQU    4
  69. HIRES        EQU    $8000
  70. LACE        EQU    4
  71. CUSTOMSCREEN    EQU    $0f
  72. RAWKEY        EQU    $400
  73. BORDERLESS    EQU    $800
  74. BACKDROP    EQU    $100
  75. ACTIVATE    EQU    $1000
  76. SMART_REFRESH    EQU    0
  77. NOCAREREFRESH    EQU    $20000
  78. ADCMD_ALLOCATE    EQU    $20    ;1<<5
  79. ADIOF_NOWAIT    EQU    $40    ;1<<6
  80. *
  81. *-------------------------------------------------------------------------
  82. * Library offsets we used. This allows us to call the libraries without
  83. * needing to link with amiga.lib
  84. *-------------------------------------------------------------------------
  85. *
  86. * Exec library offsets
  87. *
  88. Disable        EQU    -$78
  89. Enable        EQU    -$7e
  90. Forbid        EQU    -$84
  91. AllocMem    EQU    -$c6
  92. FreeMem        EQU    -$d2
  93. Wait        EQU    -$13e
  94. AllocSignal    EQU    -$14a
  95. FreeSignal    EQU    -$150
  96. AddPort        EQU    -$162
  97. RemPort        EQU    -$168
  98. GetMsg        EQU    -$174
  99. ReplyMsg    EQU    -$17a
  100. WaitPort    EQU    -$180
  101. CloseLibrary    EQU    -$19e
  102. OpenDevice    EQU    -$1bc
  103. CloseDevice    EQU    -$1c2
  104. OpenLibrary    EQU    -$228
  105. *
  106. * Intuition library offsets
  107. *
  108. CloseScreen    EQU    -$42
  109. CloseWindow    EQU    -$48
  110. OpenScreen    EQU    -$c6
  111. OpenWindow    EQU    -$cc
  112. SetPointer    EQU    -$10e
  113. ViewPortAddress    EQU    -$12c
  114. AutoRequest    EQU    -$15c
  115. *
  116. * Graphics library offsets
  117. *
  118. LoadRGB4    EQU    -$c0
  119. WaitTOF        EQU    -$10e
  120. RectFill    EQU    -$132
  121. SetAPen        EQU    -$156
  122. SetBPen        EQU    -$15c
  123. *
  124. *---------------------------------------------------------------------------
  125. * What follows are various structure definitions, assembly style.
  126. * I made these from data in the RKM's. I prefer this style myself.
  127. *---------------------------------------------------------------------------
  128. *
  129. ExecBase.ThisTask        EQU    $0114    ;only part, I was lazy!
  130. *
  131. Node.ln_Succ            EQU    0    ;nested structure defs
  132. Node.ln_Pred            EQU    4
  133. Node.ln_Type            EQU    8
  134. Node.ln_Pri            EQU    9
  135. Node.ln_Name            EQU    10
  136. Node.SIZE            EQU    14
  137. Message.mn_ReplyPort        EQU    14
  138. Message.mn_Length        EQU    18
  139. Message.SIZE            EQU    20
  140. IORequest.io_Device        EQU    20
  141. IORequest.io_Unit        EQU    24
  142. IORequest.io_Command        EQU    28
  143. IORequest.io_Flags        EQU    30
  144. IORequest.io_Error        EQU    31
  145. IORequest.SIZE            EQU    32
  146. IOAudio.ioa_AllocKey        EQU    32
  147. IOAudio.ioa_Data        EQU    34
  148. IOAudio.ioa_Length        EQU    38
  149. IOAudio.ioa_Period        EQU    42
  150. IOAudio.ioa_Volume        EQU    44
  151. IOAudio.ioa_Cycles        EQU    46
  152. IOAudio.ioa_WriteMsg        EQU    48
  153. IOAudio.ioa_WriteMsg.ln_Succ    EQU    48    ;nested structure defs
  154. IOAudio.ioa_WriteMsg.ln_Pred    EQU    48+4
  155. IOAudio.ioa_WriteMsg.ln_Type    EQU    48+8
  156. IOAudio.ioa_WriteMsg.ln_Pri    EQU    48+9
  157. IOAudio.ioa_WriteMsg.ln_Name    EQU    48+10
  158. IOAudio.ioa_WriteMsg.mn_ReplyPort EQU    48+14
  159. IOAudio.ioa_WriteMsg.mn_Length    EQU    48+18
  160. IOAudio.SIZE            EQU    68
  161. *
  162. IntuiMessage.ExecMessage    EQU    0
  163. IntuiMessage.Class        EQU    20
  164. IntuiMessage.Code        EQU    24
  165. IntuiMessage.Qualifier        EQU    26
  166. IntuiMessage.IAddress        EQU    28
  167. IntuiMessage.MouseX        EQU    32
  168. IntuiMessage.MouseY        EQU    34
  169. IntuiMessage.Seconds        EQU    36
  170. IntuiMessage.Micros        EQU    40
  171. IntuiMessage.IDCMPWindow    EQU    44
  172. IntuiMessage.SpecialLink    EQU    48
  173. IntuiMessage.SIZE        EQU    52
  174. *
  175. IntuiText.FrontPen        EQU    0
  176. IntuiText.BackPen        EQU    1
  177. IntuiText.DrawMode        EQU    2
  178. IntuiText.LeftEdge        EQU    4
  179. IntuiText.TopEdge        EQU    6
  180. IntuiText.ITextFont        EQU    8
  181. IntuiText.IText            EQU    12
  182. IntuiText.NextText        EQU    16
  183. IntuiText.SIZE            EQU    20
  184. *
  185. MsgPort.mp_Node            EQU    0
  186. MsgPort.mp_Flags        EQU    14
  187. MsgPort.mp_SigBit        EQU    15
  188. MsgPort.mp_SigTask        EQU    16
  189. MsgPort.mp_MsgList        EQU    $14
  190. MsgPort.SIZE            EQU    $22
  191. *
  192. NewScreen.LeftEdge        EQU    0
  193. NewScreen.TopEdge        EQU    2
  194. NewScreen.Width            EQU    4
  195. NewScreen.Height        EQU    6
  196. NewScreen.Depth            EQU    8
  197. NewScreen.DetailPen        EQU    10
  198. NewScreen.BlockPen        EQU    11
  199. NewScreen.ViewModes        EQU    12
  200. NewScreen.Type            EQU    14
  201. NewScreen.Font            EQU    16
  202. NewScreen.DefaultTitle        EQU    20
  203. NewScreen.Gadgets        EQU    24
  204. NewScreen.CustomBitMap        EQU    28
  205. NewScreen.SIZE            EQU    32
  206. *
  207. NewWindow.LeftEdge        EQU    0
  208. NewWindow.TopEdge        EQU    2
  209. NewWindow.Width            EQU    4
  210. NewWindow.Height        EQU    6
  211. NewWindow.DetailPen        EQU    8
  212. NewWindow.BlockPen        EQU    9
  213. NewWindow.IDCMPFlags        EQU    10
  214. NewWindow.Flags            EQU    14
  215. NewWindow.FirstGadget        EQU    $12
  216. NewWindow.CheckMark        EQU    $16
  217. NewWindow.Title            EQU    $1a
  218. NewWindow.Screen        EQU    $1e
  219. NewWindow.BitMap        EQU    $22
  220. NewWindow.MinWidth        EQU    $26
  221. NewWindow.MinHeight        EQU    $28
  222. NewWindow.MaxWidth        EQU    $2a
  223. NewWindow.MaxHeight        EQU    $2c
  224. NewWindow.Type            EQU    $2e
  225. NewWindow.SIZE            EQU    $30
  226. *
  227. Process.pr_Task            EQU    $00
  228. Process.pr_MsgPort        EQU    $5c
  229. Process.pr_Pad            EQU    $7e
  230. Process.pr_SegList        EQU    $80
  231. Process.pr_StackSize        EQU    $84
  232. Process.pr_GlobVec        EQU    $88
  233. Process.pr_TaskNum        EQU    $8c
  234. Process.pr_StackBase        EQU    $90
  235. Process.pr_Result2        EQU    $94
  236. Process.pr_CurrentDir        EQU    $98
  237. Process.pr_CIS            EQU    $9c
  238. Process.pr_COS            EQU    $a0
  239. Process.pr_ConsoleTask        EQU    $a4
  240. Process.pr_FileSystemTask    EQU    $a8
  241. Process.pr_CLI            EQU    $ac
  242. Process.pr_ReturnAddr        EQU    $b0
  243. Process.pr_PktWait        EQU    $b4
  244. Process.pr_WindowPtr        EQU    $b8
  245. Process.SIZE            EQU    $bc
  246. *
  247. RastPort.Layer            EQU    0
  248. RastPort.BitMap            EQU    4
  249. RastPort.AreaPtrn        EQU    8
  250. RastPort.TmpRas            EQU    12
  251. RastPort.AreaInfo        EQU    16
  252. RastPort.GelsInfo        EQU    $14
  253. RastPort.Mask            EQU    $18
  254. RastPort.FgPen            EQU    $19
  255. RastPort.BgPen            EQU    $1a
  256. RastPort.AOlPen            EQU    $1b
  257. RastPort.DrawMode        EQU    $1c
  258. RastPort.AreaPtSz        EQU    $1d
  259. RastPort.linpatcnt        EQU    $1e
  260. RastPort.dummy            EQU    $1f
  261. RastPort.Flags            EQU    $20
  262. RastPort.LinePtrn        EQU    $22
  263. RastPort.cp_x            EQU    $24
  264. RastPort.cp_y            EQU    $26
  265. RastPort.minterms        EQU    $28    ;[0]
  266. RastPort.PenWidth        EQU    $30
  267. RastPort.PenHeight        EQU    $32
  268. RastPort.Font            EQU    $34
  269. RastPort.AlgoStyle        EQU    $38
  270. RastPort.TxFlags        EQU    $39
  271. RastPort.TxHeight        EQU    $3a
  272. RastPort.TxWidth        EQU    $3c
  273. RastPort.TxBaseline        EQU    $3e
  274. RastPort.TxSpacing        EQU    $40
  275. RastPort.RP_User        EQU    $42
  276. RastPort.longreserved        EQU    $46    ;[0]
  277. RastPort.wordreserved        EQU    $4e    ;[0]
  278. RastPort.reserved        EQU    $5c    ;[0]
  279. RastPort.SIZE            EQU    $64
  280. *
  281. Screen.NextScreen        EQU    $00
  282. Screen.FirstWindow        EQU    $04
  283. Screen.LeftEdge            EQU    $08
  284. Screen.TopEdge            EQU    $0a
  285. Screen.Width            EQU    $0c
  286. Screen.Height            EQU    $0e
  287. Screen.MouseY            EQU    $10
  288. Screen.MouseX            EQU    $12
  289. Screen.Flags            EQU    $14
  290. Screen.Title            EQU    $16
  291. Screen.DefaultTitle        EQU    $1a
  292. Screen.BarHeight        EQU    $1e
  293. Screen.BarVBorder        EQU    $1f
  294. Screen.BarHBorder        EQU    $20
  295. Screen.MenuVBorder        EQU    $21
  296. Screen.MenuHBorder        EQU    $22
  297. Screen.WBorTop            EQU    $23
  298. Screen.WBorLeft            EQU    $24
  299. Screen.WBorRight        EQU    $25
  300. Screen.WBorBottom        EQU    $26
  301. Screen.Font            EQU    $28
  302. Screen.ViewPort            EQU    $2c
  303. Screen.RastPort            EQU    $54
  304. Screen.BitMap            EQU    $b8
  305. Screen.LayerInfo        EQU    $e0
  306. Screen.FirstGadget        EQU    $0146
  307. Screen.DetailPen        EQU    $014a
  308. Screen.BlockPen            EQU    $014b
  309. Screen.SaveColor0        EQU    $014c
  310. Screen.BarLayer            EQU    $014e
  311. Screen.ExtData            EQU    $0152
  312. Screen.UserData            EQU    $0156
  313. Screen.SIZE            EQU    $015a
  314. *
  315. Window.NextWindow        EQU    0
  316. Window.LeftEdge            EQU    4
  317. Window.TopEdge            EQU    6
  318. Window.Width            EQU    8
  319. Window.Height            EQU    10
  320. Window.MouseY            EQU    12
  321. Window.MouseX            EQU    14
  322. Window.MinWidth            EQU    16
  323. Window.MinHeight        EQU    $12
  324. Window.MaxWidth            EQU    $14
  325. Window.MaxHeight        EQU    $16
  326. Window.Flags            EQU    $18
  327. Window.MenuStrip        EQU    $1c
  328. Window.Title            EQU    $20
  329. Window.FirstRequest        EQU    $24
  330. Window.DMRequest        EQU    $28
  331. Window.ReqCount            EQU    $2c
  332. Window.WScreen            EQU    $2e
  333. Window.RPort            EQU    $32
  334. Window.BorderLeft        EQU    $36
  335. Window.BorderTop        EQU    $37
  336. Window.BorderRight        EQU    $38
  337. Window.BorderBottom        EQU    $39
  338. Window.BorderRPort        EQU    $3a
  339. Window.FirstGadget        EQU    $3e
  340. Window.Parent            EQU    $42
  341. Window.Descendant        EQU    $46
  342. Window.Pointer            EQU    $4a
  343. Window.PtrHeight        EQU    $4e
  344. Window.PtrWidth            EQU    $4f
  345. Window.XOffset            EQU    $50
  346. Window.YOffset            EQU    $51
  347. Window.IDCMPFlags        EQU    $52
  348. Window.UserPort            EQU    $56
  349. Window.WindowPort        EQU    $5a
  350. Window.MessageKey        EQU    $5e
  351. Window.DetailPen        EQU    $62
  352. Window.BlockPen            EQU    $63
  353. Window.CheckMark        EQU    $64
  354. Window.ScreenTitle        EQU    $68
  355. Window.GZZMouseX        EQU    $6c
  356. Window.GZZMouseY        EQU    $6e
  357. Window.GZZWidth            EQU    $70
  358. Window.GZZHeight        EQU    $72
  359. Window.ExtData            EQU    $74
  360. Window.UserData            EQU    $78
  361. Window.WLayer            EQU    $7c
  362. Window.IFont            EQU    $80
  363. Window.SIZE            EQU    $84
  364. *
  365.