home *** CD-ROM | disk | FTP | other *** search
/ Frozen Fish 1: Amiga / FrozenFish-Apr94.iso / bbs / alib / d3xx / d359 / dice.lha / DICE / DICE.lzh / doc / extensions.doc < prev    next >
Text File  |  1990-05-19  |  2KB  |  54 lines

  1.  
  2.                    COMPILER EXTENSIONS
  3.  
  4.                  AUTO LIBRARY OPENNING
  5.  
  6.     Certain Amiga libraries are supported on an autoinit basis.  Normally
  7.     you declare the library base variable then OpenLibrary() it in your
  8.     main.
  9.  
  10.     If you EXTERN the library base variable instead then it will be brought
  11.     in from auto.lib along with autoinit code to automatically
  12.     OpenLibrary() it on startup and CloseLibrary() it on shutdown.
  13.  
  14.     You can tell when the autoinit feature is not supported for a given
  15.     library base variable when the linker comes up with an 'undefined symbol'
  16.     error for base variable name.
  17.  
  18.                 AUTOINIT CODE
  19.  
  20.     The _autoinit keyword may be used to qualify a subroutine and make it
  21.     autoinitialied.... that is, called automatically by the startup code to
  22.     initialize various items.
  23.  
  24.     An _autoinit subroutine may not call any fd or stdio functions, but may
  25.     call memory allocation functions.
  26.  
  27.     Ordering of _autoinit calls on startup depends on the ordering of
  28.     object modules in your link line.
  29.  
  30.                  INTERRUPT QUALIFIER
  31.                 (not amiga compatible)
  32.  
  33.     You may qualify any subroutine with the interrupt qualifier which will
  34.     cause said routine to save all registers it uses and terminate with an
  35.     RTE instead of an RTS.  Normally a subroutine only keeps A2-A7/D2-D7
  36.     intact.  An interrupt service routine returns no value.
  37.  
  38.     THIS WILL NOT WORK ON THE AMIGA.  Amiga interrupt routines have other
  39.     requirements not the least of which being that they return with RTS.
  40.  
  41.     Note that this general feature is meant for use with custom 68000 based
  42.     systems (i.e. within a kernel) and does not usually work with operating
  43.     systems.  For example, the Amiga expects interrupt routines to return
  44.     with RTS and the Z condition code to reflect a certain status.
  45.  
  46.     NOTE, ANY C MODULE CONTAINING an interrupt qualified routine should be
  47.     compiled with the LARGE DATA MODEL because the small-data model base
  48.     register (A4) is not available from within interrupt service routines.
  49.     Normally is suffices to compile the module containing the interrupt
  50.     service routine with the large data model.    Such programs may not be
  51.     made resident.
  52.  
  53.  
  54.