home *** CD-ROM | disk | FTP | other *** search
/ Dave Lowe: AssemPro For Development Amiga Driver / Lowe_AssemProForDevelopmentAmigaDriver.adf / Includes / exec / memory.i < prev    next >
Encoding:
Text File  |  1978-06-06  |  2.8 KB  |  106 lines

  1.     IFND EXEC_MEMORY_I@
  2. EXEC_MEMORY_I@ = 1
  3. ;*********************************************************************
  4. ;
  5. ;   Commodore Amiga -- ROM Operating System Executive Include File
  6. ;
  7. ;*********************************************************************
  8. ;
  9. ;   Source Control:
  10. ;
  11. ;       $Header: memory.i,v 1.0 85/08/28 15:12:02 carl Exp $
  12. ;
  13. ;       $Locker:  $
  14. ;
  15. ;*********************************************************************
  16.  
  17.     IFND EXEC_NODES_I@
  18.     INCLUDE "exec/nodes.i"
  19.     ENDIF
  20.  
  21.  
  22. ;---------------------------------------------------------------------
  23. ;
  24. ;   Memory List Structures
  25. ;
  26. ;---------------------------------------------------------------------
  27. ;
  28. ;   A memory list appears in two forms:  One is a requirements list*
  29. ;   the other is a list of already allocated memory.  The format is
  30. ;   the same, with the reqirements/address field occupying the same
  31. ;   position.
  32. ;
  33. ;   The format is a linked list of ML structures each of which has
  34. ;   an array of ME entries.
  35. ;
  36. ;---------------------------------------------------------------------
  37.  
  38.  STRUCTURE ML,LN_SIZE
  39.     UWORD   ML_NUMENTRIES           ; The number of ME structures that follow
  40.     LABEL   ML_ME                   ; where the ME structures begin
  41.     LABEL   ML_SIZE
  42.  
  43.  
  44.  STRUCTURE ME,0
  45.     LABEL   ME_REQS                 ; the AllocMem requirements
  46.     APTR    ME_ADDR                 ; the address of this block (an alias
  47. ;                                   ;   for the same location as ME_REQS)
  48.     ULONG   ME_LENGTH               ; the length of this region
  49.     LABEL   ME_SIZE
  50.  
  51.  
  52. ;------ memory options:
  53.  
  54. ;    BITDEF  MEM,PUBLIC,0
  55. MEMB_PUBLIC = 0
  56. MEMF_PUBLIC = 1<<0
  57. ;    BITDEF  MEM,CHIP,1
  58. MEMB_CHIP = 1
  59. MEMF_CHIP = 1<<1
  60. ;    BITDEF  MEM,FAST,2
  61. MEMB_FAST = 2
  62. MEMF_FAST = 1<<2
  63. ;    BITDEF  MEM,CLEAR,16
  64. MEMB_CLEAR = 16
  65. MEMF_CLEAR = 1<<16
  66. ;    BITDEF  MEM,LARGEST,17
  67. MEMB_LARGEST = 17
  68. MEMF_LARGEST = 1<<17
  69.  
  70.  
  71. ;------ alignment rules for a memory block:
  72.  
  73. MEM_BLOCKSIZE   EQU 8
  74. MEM_BLOCKMASK   EQU (MEM_BLOCKSIZE-1)
  75.  
  76.  
  77. ;---------------------------------------------------------------------
  78. ;
  79. ;   Memory Region Header
  80. ;
  81. ;---------------------------------------------------------------------
  82.  
  83.  STRUCTURE  MH,LN_SIZE
  84.     UWORD   MH_ATTRIBUTES           ; characteristics of this region
  85.     APTR    MH_FIRST                ; first free region
  86.     APTR    MH_LOWER                ; lower memory bound
  87.     APTR    MH_UPPER                ; upper memory bound+1
  88.     ULONG   MH_FREE                 ; number of free bytes
  89.     LABEL   MH_SIZE
  90.  
  91.  
  92. ;---------------------------------------------------------------------
  93. ;
  94. ;   Memory Chunk
  95. ;
  96. ;---------------------------------------------------------------------
  97.  
  98.  STRUCTURE  MC,0
  99.     APTR    MC_NEXT                 ; ptr to next chunk
  100.     ULONG   MC_BYTES                ; chunk byte size
  101.     APTR    MC_SIZE
  102.  
  103.     ENDIF
  104.     END
  105.