This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
qdosmsq:traps:trap_1:rehp [2009/02/12 09:51] george.gwilt LINKFR corrected to LNKFR |
qdosmsq:traps:trap_1:rehp [2021/12/20 17:11] (current) norman [Notes] Updated notes on standard process. |
||
---|---|---|---|
Line 16: | Line 16: | ||
===== Notes ===== | ===== Notes ===== | ||
- | * All registers not shown above are not used on entry and are preserved | + | * All registers not shown above are not used on entry and are preserved on exit. |
- | on exit. | + | |
- | * A user heap is an area of memory, maybe in the common heap, set aside for use | + | * A user heap is an area of memory, maybe in the common heap, set aside for use by a single job. The job can allocate areas of this user heap for its own needs, and deallocate them as required. This stops, or reduces fragmentation of the common heap which is used by every task in the system. [[qdosmsq: |
- | by a single job. The job can allocate areas of this user heap for its own needs, and | + | |
- | deallocate them as required. This stops, or reduces fragmentation of the common heap which | + | |
- | is used by every task in the system. [[qdosmsq: | + | |
- | * If the long word at (A1,A6) is zero, then this trap will create a new user heap at the address in A1. | + | * If the long word at (A1,A6) is zero, then this trap will create a new user heap at the address in A0. |
- | * If (A1,A6) is not zero, then you are assumed to be releasing a previously allocated | + | * If (A1,A6) is not zero, then you are assumed to be releasing a previously allocated chunk of user heap back into the user heap's free space. |
- | chunk of user heap back into the user heap's free space. | + | |
+ | * Normally, the sequence of events would be: | ||
+ | * Allocate some space in the common heap, address in A0; | ||
+ | * Call MT_LNKFR/ | ||
+ | * Repeat as necessary: | ||
+ | * Allocate space from the heap; | ||
+ | * Use the space allocated; | ||
+ | * Return allocations to the heap; | ||
+ | * End Repeat | ||
+ | * Return the allocated space back to the common heap. | ||
===== Example ===== | ===== Example ===== | ||
[[qdosmsq: | [[qdosmsq: | ||
manipulation traps. | manipulation traps. |