home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Programming / C / BK-SC1_1.DMS / in.adf / Source.Lha / Startup-Code / libstartup.asm < prev    next >
Encoding:
Assembly Source File  |  1996-02-23  |  1.4 KB  |  88 lines

  1.  
  2. ; Storm C Shared Library Startupcode
  3.  
  4. ; Copyright 1996 HAAGE & PARTNER Computer GmbH
  5.  
  6. ; This file contains only the tables for InitResident() and a definition of
  7. ; _SysBase (initialization is usually done by LibInit())
  8.  
  9. ; The main work is done in storm.lib, there you find LibInit(),
  10. ; LibOpen(), LibClose(), LibExpunge() and LibNull() and you can simply
  11. ; override these (to support AREXX in LibNull for example).
  12.  
  13. LINKSYS    MACRO
  14.     move.l a6,-(sp)
  15.     move.l \2,a6
  16.     jsr _LVO\1(a6)
  17.     move.l (sp)+,a6
  18.     ENDM
  19.  
  20. CALLSYS    MACRO
  21.     JSR _LVO\1(a6)
  22.     ENDM
  23.  
  24.  
  25.     INCDIR WORK:ASM_Includes
  26.  
  27.     INCLUDE exec/initializers.i
  28.     INCLUDE exec/libraries.i
  29.     INCLUDE exec/resident.i
  30.  
  31.     XDEF _SysBase
  32.  
  33.     XREF _ThisLibraryName
  34.     XREF __LIBRARYJUMPTABLE
  35.     XREF _LibNameString
  36.     XREF _LibVersionString
  37.     XREF __VERSION
  38.     XREF __REVISION
  39.     XREF _LibInit
  40.  
  41.     XREF __THISSHAREDLIBRARYBASESIZE
  42.  
  43.     TTL "COMMON"
  44.  
  45. ; Header
  46.  
  47. Start
  48.     moveq #-1,d0
  49.     rts
  50.  
  51. RomTag
  52.     DC.W RTC_MATCHWORD
  53.     DC.L RomTag
  54.     DC.L EndCode
  55.     DC.B RTF_AUTOINIT
  56.     DC.B __VERSION
  57.     DC.B NT_LIBRARY
  58.     DC.B 0
  59.     DC.L _LibNameString
  60.     DC.L _LibVersionString
  61.     DC.L InitTable
  62.  
  63.     CNOP 0,2
  64.  
  65. InitTable
  66.     DC.L __THISSHAREDLIBRARYBASESIZE
  67.     DC.L __LIBRARYJUMPTABLE
  68.     DC.L DataTable
  69.     DC.L _LibInit
  70.  
  71. DataTable
  72.     INITBYTE LN_TYPE,NT_LIBRARY
  73.     INITLONG LN_NAME,_LibNameString
  74.     INITBYTE LIB_FLAGS,LIBF_SUMUSED|LIBF_CHANGED
  75.     INITWORD LIB_VERSION,__VERSION
  76.     INITWORD LIB_REVISION,__REVISION
  77.     INITLONG LIB_IDSTRING,_LibVersionString
  78.     DC.L 0
  79.  
  80. EndCode
  81.  
  82.     SECTION "libstartupd",DATA
  83.  
  84. _SysBase
  85.     dc.l 0
  86.  
  87.     END
  88.