home *** CD-ROM | disk | FTP | other *** search
/ Frozen Fish 2: PC / frozenfish_august_1995.bin / bbs / d03xx / d0340.lha / NorthC / NorthC.lzh / libs / clibdefs.i < prev    next >
Text File  |  1990-02-27  |  1KB  |  63 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. ; Define some macros for low level interface to exec and dos
  12. ;
  13.  
  14.     INCLUDE    clibs:dos.i
  15.  
  16. lref    MACRO
  17.     xref    _LVO\1
  18.     ENDM
  19. ;
  20. ;
  21. ;
  22. execLib    equ      $4
  23.     xref    dosLib
  24.     xref    mathffpLib
  25.     xref    mathtransLib
  26.  
  27. call    MACRO
  28.     ; We must keep the a6 register as it is used as a frame pointer
  29.         ; as well as a link to the library.
  30.     move.l    a6,-(sp)
  31.     move.l    \1Lib,a6
  32.     jsr    _LVO\2(a6)
  33.     move.l    (sp)+,a6
  34.     ENDM
  35.  
  36. ; Some constants for memory allocation
  37.  
  38. MEMF_CHIP    EQU   1<<1
  39. MEMF_FAST    EQU   1<<2
  40. MEMF_PUBLIC  EQU   1<<0
  41. MEMF_CLEAR   EQU   1<<16
  42. MEMF_LARGEST EQU   1<<17
  43.  
  44. ; And file handling
  45.  
  46. MODE_OLDFILE     equ      1005
  47. MODE_NEWFILE     equ      1006
  48.  
  49. ; Process structures
  50.  
  51. PROC.CLI    equ    $AC
  52. PROC.CONSOLE    equ    $A4
  53. PROC.MSGPORT    equ    $5C
  54. PROC.STACKBASE    equ    $90
  55. PROC.STACKSIZE    equ    $84
  56. PROC.TASK    equ    $00
  57. PROC.TASKNUM    equ    $8C
  58. PROC.WINDOWPTR    equ    $B8
  59.  
  60. ; File Handling structures
  61.  
  62. FH.TYPE        equ    8
  63.