home *** CD-ROM | disk | FTP | other *** search
- *********************************************************
- * *
- * FurLess.a - Produced for an entry to the 'neatest *
- * program under 2K' contest at the ASDF 010th *
- * annual GURU meditation by: *
- * *
- * Wesley Howe *
- * 10-Jun-90 *
- * *
- * Assembled with CAPE (of course.) *
- * *
- *********************************************************
- *
- *--------------------------------------------------------------------------
- * hardware addresses: see the hardware RKM
- *--------------------------------------------------------------------------
- *
- CUSTOM EQU $DFF000 ;base address of the custom chips
- AUD0LC EQU $A0 ;Start of data table for DMA
- AUD0LEN EQU $A4 ;Length of data table in Words
- AUD0PER EQU $A6 ;Time per word of data in ticks
- AUD0VOL EQU $A8 ;Volume (0 to 64)
- AUD0DAT EQU $AA
- AUD1LC EQU $B0
- AUD1LEN EQU $B4
- AUD1PER EQU $B6
- AUD1VOL EQU $B8
- AUD1DAT EQU $BA
- AUD2LC EQU $C0
- AUD2LEN EQU $C4
- AUD2PER EQU $C6
- AUD2VOL EQU $C8
- AUD2DAT EQU $CA
- AUD3LC EQU $D0
- AUD3LEN EQU $D4
- AUD3PER EQU $D6
- AUD3VOL EQU $D8
- AUD3DAT EQU $DA
- DMACONW EQU $96 ;DMA control write (clear or set)
- ADKCONW EQU $9E
- *
- *-------------------------------------------------------------------------
- * hardware bit definitions: see the hardware RKM
- *-------------------------------------------------------------------------
- *
- ATVOL0 EQU $01 ;attach channel 0
- ATVOL1 EQU $02
- ATVOL2 EQU $04
- ATVOL3 EQU $08
- ATPER0 EQU $10
- ATPER1 EQU $20
- ATPER2 EQU $40
- ATPER3 EQU $80
- AUD0EN EQU $01 ;enable channel 0
- AUD1EN EQU $02
- AUD2EN EQU $04
- AUD3EN EQU $08
- MSET EQU $8000 ;set bits that are ones
- CLEAR EQU $00 ;clear bits that are ones
- DMAEN EQU $0200 ;enable hardware DMA
- *
- *-------------------------------------------------------------------------
- * some general equates we need, gleaned from the RKM's
- *-------------------------------------------------------------------------
- *
- MEMF_CHIP EQU 2
- MEMF_CLEAR EQU $10000
- NT_MSGPORT EQU 4
- HIRES EQU $8000
- LACE EQU 4
- CUSTOMSCREEN EQU $0f
- RAWKEY EQU $400
- BORDERLESS EQU $800
- BACKDROP EQU $100
- ACTIVATE EQU $1000
- SMART_REFRESH EQU 0
- NOCAREREFRESH EQU $20000
- ADCMD_ALLOCATE EQU $20 ;1<<5
- ADIOF_NOWAIT EQU $40 ;1<<6
- *
- *-------------------------------------------------------------------------
- * Library offsets we used. This allows us to call the libraries without
- * needing to link with amiga.lib
- *-------------------------------------------------------------------------
- *
- * Exec library offsets
- *
- Disable EQU -$78
- Enable EQU -$7e
- Forbid EQU -$84
- AllocMem EQU -$c6
- FreeMem EQU -$d2
- Wait EQU -$13e
- AllocSignal EQU -$14a
- FreeSignal EQU -$150
- AddPort EQU -$162
- RemPort EQU -$168
- GetMsg EQU -$174
- ReplyMsg EQU -$17a
- WaitPort EQU -$180
- CloseLibrary EQU -$19e
- OpenDevice EQU -$1bc
- CloseDevice EQU -$1c2
- OpenLibrary EQU -$228
- *
- * Intuition library offsets
- *
- CloseScreen EQU -$42
- CloseWindow EQU -$48
- OpenScreen EQU -$c6
- OpenWindow EQU -$cc
- SetPointer EQU -$10e
- ViewPortAddress EQU -$12c
- AutoRequest EQU -$15c
- *
- * Graphics library offsets
- *
- LoadRGB4 EQU -$c0
- WaitTOF EQU -$10e
- RectFill EQU -$132
- SetAPen EQU -$156
- SetBPen EQU -$15c
- *
- *---------------------------------------------------------------------------
- * What follows are various structure definitions, assembly style.
- * I made these from data in the RKM's. I prefer this style myself.
- *---------------------------------------------------------------------------
- *
- ExecBase.ThisTask EQU $0114 ;only part, I was lazy!
- *
- Node.ln_Succ EQU 0 ;nested structure defs
- Node.ln_Pred EQU 4
- Node.ln_Type EQU 8
- Node.ln_Pri EQU 9
- Node.ln_Name EQU 10
- Node.SIZE EQU 14
- Message.mn_ReplyPort EQU 14
- Message.mn_Length EQU 18
- Message.SIZE EQU 20
- IORequest.io_Device EQU 20
- IORequest.io_Unit EQU 24
- IORequest.io_Command EQU 28
- IORequest.io_Flags EQU 30
- IORequest.io_Error EQU 31
- IORequest.SIZE EQU 32
- IOAudio.ioa_AllocKey EQU 32
- IOAudio.ioa_Data EQU 34
- IOAudio.ioa_Length EQU 38
- IOAudio.ioa_Period EQU 42
- IOAudio.ioa_Volume EQU 44
- IOAudio.ioa_Cycles EQU 46
- IOAudio.ioa_WriteMsg EQU 48
- IOAudio.ioa_WriteMsg.ln_Succ EQU 48 ;nested structure defs
- IOAudio.ioa_WriteMsg.ln_Pred EQU 48+4
- IOAudio.ioa_WriteMsg.ln_Type EQU 48+8
- IOAudio.ioa_WriteMsg.ln_Pri EQU 48+9
- IOAudio.ioa_WriteMsg.ln_Name EQU 48+10
- IOAudio.ioa_WriteMsg.mn_ReplyPort EQU 48+14
- IOAudio.ioa_WriteMsg.mn_Length EQU 48+18
- IOAudio.SIZE EQU 68
- *
- IntuiMessage.ExecMessage EQU 0
- IntuiMessage.Class EQU 20
- IntuiMessage.Code EQU 24
- IntuiMessage.Qualifier EQU 26
- IntuiMessage.IAddress EQU 28
- IntuiMessage.MouseX EQU 32
- IntuiMessage.MouseY EQU 34
- IntuiMessage.Seconds EQU 36
- IntuiMessage.Micros EQU 40
- IntuiMessage.IDCMPWindow EQU 44
- IntuiMessage.SpecialLink EQU 48
- IntuiMessage.SIZE EQU 52
- *
- IntuiText.FrontPen EQU 0
- IntuiText.BackPen EQU 1
- IntuiText.DrawMode EQU 2
- IntuiText.LeftEdge EQU 4
- IntuiText.TopEdge EQU 6
- IntuiText.ITextFont EQU 8
- IntuiText.IText EQU 12
- IntuiText.NextText EQU 16
- IntuiText.SIZE EQU 20
- *
- MsgPort.mp_Node EQU 0
- MsgPort.mp_Flags EQU 14
- MsgPort.mp_SigBit EQU 15
- MsgPort.mp_SigTask EQU 16
- MsgPort.mp_MsgList EQU $14
- MsgPort.SIZE EQU $22
- *
- NewScreen.LeftEdge EQU 0
- NewScreen.TopEdge EQU 2
- NewScreen.Width EQU 4
- NewScreen.Height EQU 6
- NewScreen.Depth EQU 8
- NewScreen.DetailPen EQU 10
- NewScreen.BlockPen EQU 11
- NewScreen.ViewModes EQU 12
- NewScreen.Type EQU 14
- NewScreen.Font EQU 16
- NewScreen.DefaultTitle EQU 20
- NewScreen.Gadgets EQU 24
- NewScreen.CustomBitMap EQU 28
- NewScreen.SIZE EQU 32
- *
- NewWindow.LeftEdge EQU 0
- NewWindow.TopEdge EQU 2
- NewWindow.Width EQU 4
- NewWindow.Height EQU 6
- NewWindow.DetailPen EQU 8
- NewWindow.BlockPen EQU 9
- NewWindow.IDCMPFlags EQU 10
- NewWindow.Flags EQU 14
- NewWindow.FirstGadget EQU $12
- NewWindow.CheckMark EQU $16
- NewWindow.Title EQU $1a
- NewWindow.Screen EQU $1e
- NewWindow.BitMap EQU $22
- NewWindow.MinWidth EQU $26
- NewWindow.MinHeight EQU $28
- NewWindow.MaxWidth EQU $2a
- NewWindow.MaxHeight EQU $2c
- NewWindow.Type EQU $2e
- NewWindow.SIZE EQU $30
- *
- Process.pr_Task EQU $00
- Process.pr_MsgPort EQU $5c
- Process.pr_Pad EQU $7e
- Process.pr_SegList EQU $80
- Process.pr_StackSize EQU $84
- Process.pr_GlobVec EQU $88
- Process.pr_TaskNum EQU $8c
- Process.pr_StackBase EQU $90
- Process.pr_Result2 EQU $94
- Process.pr_CurrentDir EQU $98
- Process.pr_CIS EQU $9c
- Process.pr_COS EQU $a0
- Process.pr_ConsoleTask EQU $a4
- Process.pr_FileSystemTask EQU $a8
- Process.pr_CLI EQU $ac
- Process.pr_ReturnAddr EQU $b0
- Process.pr_PktWait EQU $b4
- Process.pr_WindowPtr EQU $b8
- Process.SIZE EQU $bc
- *
- RastPort.Layer EQU 0
- RastPort.BitMap EQU 4
- RastPort.AreaPtrn EQU 8
- RastPort.TmpRas EQU 12
- RastPort.AreaInfo EQU 16
- RastPort.GelsInfo EQU $14
- RastPort.Mask EQU $18
- RastPort.FgPen EQU $19
- RastPort.BgPen EQU $1a
- RastPort.AOlPen EQU $1b
- RastPort.DrawMode EQU $1c
- RastPort.AreaPtSz EQU $1d
- RastPort.linpatcnt EQU $1e
- RastPort.dummy EQU $1f
- RastPort.Flags EQU $20
- RastPort.LinePtrn EQU $22
- RastPort.cp_x EQU $24
- RastPort.cp_y EQU $26
- RastPort.minterms EQU $28 ;[0]
- RastPort.PenWidth EQU $30
- RastPort.PenHeight EQU $32
- RastPort.Font EQU $34
- RastPort.AlgoStyle EQU $38
- RastPort.TxFlags EQU $39
- RastPort.TxHeight EQU $3a
- RastPort.TxWidth EQU $3c
- RastPort.TxBaseline EQU $3e
- RastPort.TxSpacing EQU $40
- RastPort.RP_User EQU $42
- RastPort.longreserved EQU $46 ;[0]
- RastPort.wordreserved EQU $4e ;[0]
- RastPort.reserved EQU $5c ;[0]
- RastPort.SIZE EQU $64
- *
- Screen.NextScreen EQU $00
- Screen.FirstWindow EQU $04
- Screen.LeftEdge EQU $08
- Screen.TopEdge EQU $0a
- Screen.Width EQU $0c
- Screen.Height EQU $0e
- Screen.MouseY EQU $10
- Screen.MouseX EQU $12
- Screen.Flags EQU $14
- Screen.Title EQU $16
- Screen.DefaultTitle EQU $1a
- Screen.BarHeight EQU $1e
- Screen.BarVBorder EQU $1f
- Screen.BarHBorder EQU $20
- Screen.MenuVBorder EQU $21
- Screen.MenuHBorder EQU $22
- Screen.WBorTop EQU $23
- Screen.WBorLeft EQU $24
- Screen.WBorRight EQU $25
- Screen.WBorBottom EQU $26
- Screen.Font EQU $28
- Screen.ViewPort EQU $2c
- Screen.RastPort EQU $54
- Screen.BitMap EQU $b8
- Screen.LayerInfo EQU $e0
- Screen.FirstGadget EQU $0146
- Screen.DetailPen EQU $014a
- Screen.BlockPen EQU $014b
- Screen.SaveColor0 EQU $014c
- Screen.BarLayer EQU $014e
- Screen.ExtData EQU $0152
- Screen.UserData EQU $0156
- Screen.SIZE EQU $015a
- *
- Window.NextWindow EQU 0
- Window.LeftEdge EQU 4
- Window.TopEdge EQU 6
- Window.Width EQU 8
- Window.Height EQU 10
- Window.MouseY EQU 12
- Window.MouseX EQU 14
- Window.MinWidth EQU 16
- Window.MinHeight EQU $12
- Window.MaxWidth EQU $14
- Window.MaxHeight EQU $16
- Window.Flags EQU $18
- Window.MenuStrip EQU $1c
- Window.Title EQU $20
- Window.FirstRequest EQU $24
- Window.DMRequest EQU $28
- Window.ReqCount EQU $2c
- Window.WScreen EQU $2e
- Window.RPort EQU $32
- Window.BorderLeft EQU $36
- Window.BorderTop EQU $37
- Window.BorderRight EQU $38
- Window.BorderBottom EQU $39
- Window.BorderRPort EQU $3a
- Window.FirstGadget EQU $3e
- Window.Parent EQU $42
- Window.Descendant EQU $46
- Window.Pointer EQU $4a
- Window.PtrHeight EQU $4e
- Window.PtrWidth EQU $4f
- Window.XOffset EQU $50
- Window.YOffset EQU $51
- Window.IDCMPFlags EQU $52
- Window.UserPort EQU $56
- Window.WindowPort EQU $5a
- Window.MessageKey EQU $5e
- Window.DetailPen EQU $62
- Window.BlockPen EQU $63
- Window.CheckMark EQU $64
- Window.ScreenTitle EQU $68
- Window.GZZMouseX EQU $6c
- Window.GZZMouseY EQU $6e
- Window.GZZWidth EQU $70
- Window.GZZHeight EQU $72
- Window.ExtData EQU $74
- Window.UserData EQU $78
- Window.WLayer EQU $7c
- Window.IFont EQU $80
- Window.SIZE EQU $84
- *
-