home *** CD-ROM | disk | FTP | other *** search
- ;
- ; libent.a
- ;
- ; ROMTag Teil der amigauucpplus.library.
- ; EnthΣlt die Sprungtabellen und andere Library - spezifische Dinge.
- ;
- ; Copyright (C) 1991 Ingo Feulner. Alle Rechte vorbehalten.
- ;
-
-
- include 'exec/types.i'
- include 'exec/initializers.i'
- include 'exec/lists.i'
- include 'exec/resident.i'
- include 'exec/nodes.i'
- include 'exec/libraries.i'
-
- VERSION equ 0 ; main version
- REVISION equ 2 ; revision
- PRI equ 0 ; priority
- BaseSize equ $00000074
-
- csect romtag,0,2,0,4
-
- ;--- standard library vectors
- xref _LibInit
- xref _LibOpen
- xref _LibClose
- xref _LibExpunge
- xref _LibNull
-
- ;--- custom function vectors
- ; aus ufuncs.c
- xref __FindConfig
- xref __GetConfig
- xref __GetConfigDir
- xref __MakeConfigPath
- ; aus compress.c
- xref __CompressFile
- xref __DeCompressFile
- ; aus support.c
- xref __TempFileName
- xref __UUAllocMem
- xref __UUFreeMem
- xref __UUFreeAllMem
- xref __CreatePort
- xref __DeletePort
- xref __GetTime
- xref __SPrintfA
-
- ;--- debugging
- IFD DEBUG
- xref _dprintf
- ENDC
-
-
- ;--- beginning of the code
- entry:
- moveq.l #-1,d0
- rts
-
- ;--- romtag and other resident stuff
- romtag:
- dc.w RTC_MATCHWORD ; Romtag identifiers
- dc.l romtag ;
- dc.l endskip ;
- dc.b RTF_AUTOINIT ; let exec create our library base
- dc.b VERSION ; library version
- dc.b NT_LIBRARY ; Library identifier
- dc.b PRI ; Priority
- dc.l libname ; Library name
- dc.l libid ; Library ID
- dc.l init ; RT_INIT pointer
- init:
- dc.l BaseSize ; Positive size of Library base. Be careful!
- dc.l LibFuncTab ; pointer to an array of function entry points
- dc.l LibDataTab ; pointer to Initstruct data array
- dc.l LibInit ; Pointer to the init function to call
-
- ;--- function table
- LibFuncTab:
- ;--- standard functions
- ;--- debug trap versions
- IFD DEBUG
- dc.l LibOpen
- dc.l LibClose
- dc.l LibExpunge
- dc.l LibNull
- ENDC
- ;--- non-debug trap versions
- IFND DEBUG
- dc.l _LibOpen
- dc.l _LibClose
- dc.l LibExpunge
- dc.l _LibNull
- ENDC
-
- ;--- custom functions
- ; ufuncs.c
- dc.l __FindConfig
- dc.l __GetConfig
- dc.l __GetConfigDir
- dc.l __MakeConfigPath
- ; compress.c
- dc.l __CompressFile
- dc.l __DeCompressFile
- ; support.c
- dc.l __TempFileName
- dc.l __UUAllocMem
- dc.l __UUFreeMem
- dc.l __UUFreeAllMem
- dc.l __CreatePort
- dc.l __DeletePort
- dc.l __GetTime
- dc.l __SPrintfA
- dc.l -1
-
- ;--- data to initialize the Library base with
- LibDataTab:
- INITBYTE LH_TYPE,NT_LIBRARY
- INITLONG LN_NAME,libname
- INITBYTE LIB_FLAGS,LIBF_SUMUSED!LIBF_CHANGED
- INITWORD LIB_VERSION,VERSION
- INITWORD LIB_REVISION,REVISION
- INITLONG LIB_IDSTRING,libid
- dc.l 0
-
- ;--- the name and ID strings
- libname:
- dc.b 'amigauucpplus.library',0
- libid:
- dc.b 'amigauucpplus.library 0.2 (8 Apr 91)',13,10,0
-
- ;--- word align for code
- ds.l 0
-
- ;--- some code to preserve registers
- LibInit:
- movem.l d1-d7/a0-a6,-(sp)
- jsr _LibInit
- movem.l (sp)+,d1-d7/a0-a6
- rts
-
- IFND DEBUG
- LibExpunge:
- movem.l d1-d7/a0-a6,-(sp)
- jsr _LibExpunge
- movem.l (sp)+,d1-d7/a0-a6
- rts
- ENDC
-
- ;--- debugging traps
- IFD DEBUG
- LibOpen:
- jsr _LibOpen
- rts
-
- LibClose:
- jmp _LibClose
-
- LibExpunge:
- bsr regdump
- movem.l a0-a6/d1-d7,-(sp)
- jsr _LibExpunge
- movem.l (sp)+,a0-a6/d1-d7
- bsr regdump
- rts
-
- LibNull:
- jmp _LibNull
-
- regdump:
- bchg #1,$bfe001
-
- movem.l d0-d7/a0-a7,-(sp)
- pea fmtstr
- jsr _dprintf
- move.l #14965,d0
- 1$ dbra d0,1$
-
- addq.l #4,sp
- movem.l (sp)+,d0-d7/a0-a7
-
- bchg #1,$bfe001
-
- rts
-
- fmtstr:
- dc.b 'd0:$%08lx d1:$%08lx d2:$%08lx d3:$%08lx',13,10
- dc.b 'd4:$%08lx d5:$%08lx d6:$%08lx d7:$%08lx',13,10
- dc.b 'a0:$%08lx a1:$%08lx a2:$%08lx a3:$%08lx',13,10
- dc.b 'a4:$%08lx a5:$%08lx a6:$%08lx a7:$%08lx',13,10
- dc.b 13,10,0
-
- ENDC
-
- ;--- align the endskip
- ds.l 0
-
- ;--- end of this segment
- endskip:
- end
-