home *** CD-ROM | disk | FTP | other *** search
/ The Fred Fish Collection 1.5 / ffcollection-1-5-1992-11.iso / ff_disks / 300-399 / ff384.lzh / NorthC / Example1.LZH / clibs / clibdefs.i < prev    next >
Text File  |  1990-08-30  |  1KB  |  76 lines

  1. ;  (c) 1990 S.Hawtin.
  2. ;  Permission is granted to copy this file provided
  3. ;   1) It is not used for commercial gain
  4. ;   2) This notice is included in all copies
  5. ;   3) Altered copies are marked as such
  6. ;
  7. ;  No liability is accepted for the contents of the file.
  8. ;
  9. ;  clibdefs.i    within        Public Domain c.lib
  10. ;
  11. ;
  12. ; Define some macros for low level interface to Exec
  13. ;
  14.  
  15.     INCLUDE    clibs:dos.i
  16.  
  17. ;
  18. execLib    equ      $4
  19.     xref    dosLib
  20.     xref    mathffpLib
  21.     xref    mathtransLib
  22.     xref    diskfontLib
  23.     xref    iconLib
  24.     xref    intuitionLib
  25.     xref    layersLib
  26.     xref    translatorLib
  27.     xref    graphicsLib
  28.     xref    expansionLib
  29.  
  30. call    MACRO
  31.     ; We must keep the a6 register as it is used as a frame pointer
  32.         ; as well as a link to the intuition library.
  33.     move.l    a6,-(sp)
  34.     move.l    \1Lib,a6
  35.     jsr    _LVO\2(a6)
  36.     move.l    (sp)+,a6
  37.     ENDM
  38.  
  39. calli    MACRO
  40.     ; We must keep the a6 register as it is used as a frame pointer
  41.         ; as well as a link to the intuition library.
  42.     move.l    a6,-(sp)
  43.     move.l    \1Lib,a6
  44.     jsr    \2(a6)
  45.     move.l    (sp)+,a6
  46.     ENDM
  47. ;
  48. ; Some constants for memory allocation
  49. ;
  50.  
  51. MEMF_CHIP    EQU   1<<1
  52. MEMF_FAST    EQU   1<<2
  53. MEMF_PUBLIC  EQU   1<<0
  54. MEMF_CLEAR   EQU   1<<16
  55. MEMF_LARGEST EQU   1<<17
  56.  
  57. ; And file handling
  58.  
  59. MODE_OLDFILE     equ      1005
  60. MODE_NEWFILE     equ      1006
  61.  
  62. ; Process structures
  63.  
  64. PROC.CLI    equ    $AC
  65. PROC.CONSOLE    equ    $A4
  66. PROC.MSGPORT    equ    $5C
  67. PROC.STACKBASE    equ    $90
  68. PROC.STACKSIZE    equ    $84
  69. PROC.TASK    equ    $00
  70. PROC.TASKNUM    equ    $8C
  71. PROC.WINDOWPTR    equ    $B8
  72.  
  73. ; File Handling structures
  74.  
  75. FH.TYPE        equ    $08
  76.