home *** CD-ROM | disk | FTP | other *** search
/ back2roots/padua / padua.7z / padua / uucp / auucp+-1.02 / fuucp_plus_src.lzh / uucplib / libent.a < prev    next >
Encoding:
Text File  |  1991-04-10  |  3.5 KB  |  203 lines

  1. ;
  2. ;  libent.a
  3. ;
  4. ;  ROMTag Teil der amigauucpplus.library.
  5. ;  EnthΣlt die Sprungtabellen und andere Library - spezifische Dinge.
  6. ;
  7. ;  Copyright (C) 1991 Ingo Feulner. Alle Rechte vorbehalten.
  8. ;
  9.  
  10.  
  11.     include 'exec/types.i'
  12.     include 'exec/initializers.i'
  13.     include 'exec/lists.i'
  14.     include    'exec/resident.i'
  15.     include 'exec/nodes.i'
  16.     include    'exec/libraries.i'
  17.  
  18. VERSION        equ    0 ; main version
  19. REVISION    equ    2 ; revision
  20. PRI        equ    0 ; priority
  21. BaseSize    equ    $00000074
  22.  
  23.     csect    romtag,0,2,0,4
  24.  
  25. ;--- standard library vectors
  26.     xref    _LibInit
  27.     xref    _LibOpen
  28.     xref    _LibClose
  29.     xref    _LibExpunge
  30.     xref    _LibNull
  31.  
  32. ;--- custom function vectors
  33. ; aus ufuncs.c
  34.     xref    __FindConfig
  35.     xref    __GetConfig
  36.     xref    __GetConfigDir
  37.     xref    __MakeConfigPath
  38. ; aus compress.c
  39.     xref    __CompressFile
  40.     xref    __DeCompressFile
  41. ; aus support.c
  42.     xref    __TempFileName
  43.     xref    __UUAllocMem
  44.     xref    __UUFreeMem
  45.     xref    __UUFreeAllMem
  46.     xref    __CreatePort
  47.     xref    __DeletePort
  48.     xref    __GetTime
  49.     xref    __SPrintfA
  50.  
  51. ;--- debugging
  52.     IFD    DEBUG
  53.     xref    _dprintf
  54.     ENDC
  55.  
  56.  
  57. ;--- beginning of the code
  58. entry:
  59.     moveq.l    #-1,d0
  60.     rts
  61.  
  62. ;--- romtag and other resident stuff
  63. romtag:
  64.     dc.w    RTC_MATCHWORD    ; Romtag identifiers
  65.     dc.l    romtag        ;
  66.     dc.l    endskip        ;
  67.     dc.b    RTF_AUTOINIT    ; let exec create our library base
  68.     dc.b    VERSION        ; library version
  69.     dc.b    NT_LIBRARY    ; Library identifier
  70.     dc.b    PRI        ; Priority
  71.     dc.l    libname        ; Library name
  72.     dc.l    libid        ; Library ID
  73.     dc.l    init        ; RT_INIT pointer
  74. init:
  75.     dc.l    BaseSize    ; Positive size of Library base. Be careful!
  76.     dc.l    LibFuncTab    ; pointer to an array of function entry points
  77.     dc.l    LibDataTab    ; pointer to Initstruct data array
  78.     dc.l    LibInit        ; Pointer to the init function to call
  79.  
  80. ;--- function table
  81. LibFuncTab:
  82. ;--- standard functions
  83. ;--- debug trap versions
  84.     IFD    DEBUG
  85.     dc.l    LibOpen
  86.     dc.l    LibClose
  87.     dc.l    LibExpunge
  88.     dc.l    LibNull
  89.     ENDC
  90. ;--- non-debug trap versions
  91.     IFND    DEBUG
  92.     dc.l    _LibOpen
  93.     dc.l    _LibClose
  94.     dc.l    LibExpunge
  95.     dc.l    _LibNull
  96.     ENDC
  97.  
  98. ;--- custom functions
  99. ; ufuncs.c
  100.     dc.l    __FindConfig
  101.     dc.l    __GetConfig
  102.     dc.l    __GetConfigDir
  103.     dc.l    __MakeConfigPath
  104. ; compress.c
  105.     dc.l    __CompressFile
  106.     dc.l    __DeCompressFile
  107. ; support.c
  108.     dc.l    __TempFileName
  109.     dc.l    __UUAllocMem
  110.     dc.l    __UUFreeMem
  111.     dc.l    __UUFreeAllMem
  112.     dc.l    __CreatePort
  113.     dc.l    __DeletePort
  114.     dc.l    __GetTime
  115.     dc.l    __SPrintfA
  116.     dc.l    -1
  117.  
  118. ;--- data to initialize the Library base with
  119. LibDataTab:
  120.     INITBYTE    LH_TYPE,NT_LIBRARY
  121.     INITLONG    LN_NAME,libname
  122.     INITBYTE    LIB_FLAGS,LIBF_SUMUSED!LIBF_CHANGED
  123.     INITWORD    LIB_VERSION,VERSION
  124.     INITWORD    LIB_REVISION,REVISION
  125.     INITLONG    LIB_IDSTRING,libid
  126.     dc.l    0
  127.  
  128. ;--- the name and ID strings
  129. libname:
  130.     dc.b    'amigauucpplus.library',0
  131. libid:
  132.     dc.b    'amigauucpplus.library 0.2 (8 Apr 91)',13,10,0
  133.  
  134. ;--- word align for code
  135.     ds.l    0
  136.  
  137. ;--- some code to preserve registers
  138. LibInit:
  139.     movem.l    d1-d7/a0-a6,-(sp)
  140.     jsr    _LibInit
  141.     movem.l    (sp)+,d1-d7/a0-a6
  142.     rts
  143.  
  144.     IFND    DEBUG
  145. LibExpunge:
  146.     movem.l    d1-d7/a0-a6,-(sp)
  147.     jsr    _LibExpunge
  148.     movem.l    (sp)+,d1-d7/a0-a6
  149.     rts
  150.     ENDC
  151.  
  152. ;--- debugging traps
  153.     IFD    DEBUG
  154. LibOpen:
  155.     jsr    _LibOpen
  156.     rts
  157.  
  158. LibClose:
  159.     jmp    _LibClose
  160.  
  161. LibExpunge:
  162.     bsr    regdump
  163.     movem.l    a0-a6/d1-d7,-(sp)
  164.     jsr    _LibExpunge
  165.     movem.l    (sp)+,a0-a6/d1-d7
  166.     bsr    regdump
  167.     rts
  168.  
  169. LibNull:
  170.     jmp    _LibNull
  171.  
  172. regdump:
  173.     bchg    #1,$bfe001
  174.  
  175.     movem.l    d0-d7/a0-a7,-(sp)
  176.     pea    fmtstr
  177.     jsr    _dprintf
  178.     move.l    #14965,d0
  179. 1$    dbra    d0,1$
  180.  
  181.     addq.l    #4,sp
  182.     movem.l    (sp)+,d0-d7/a0-a7
  183.  
  184.     bchg    #1,$bfe001
  185.  
  186.     rts
  187.  
  188. fmtstr:
  189.     dc.b    'd0:$%08lx d1:$%08lx d2:$%08lx d3:$%08lx',13,10
  190.     dc.b    'd4:$%08lx d5:$%08lx d6:$%08lx d7:$%08lx',13,10
  191.     dc.b    'a0:$%08lx a1:$%08lx a2:$%08lx a3:$%08lx',13,10
  192.     dc.b    'a4:$%08lx a5:$%08lx a6:$%08lx a7:$%08lx',13,10
  193.     dc.b    13,10,0
  194.  
  195.     ENDC
  196.  
  197. ;--- align the endskip
  198.     ds.l    0
  199.  
  200. ;--- end of this segment
  201. endskip:
  202.     end
  203.