QDOS Internals

Anything you never knew you wanted to know about the Sinclair QL.

User Tools

Site Tools



This vector sets up a user heap or links space back into an existing user heap. Space is allocated from the user heap by MM_ALLOC/MEM_ALHP.

Call ParametersReturn Parameters
D1.LNumber of bytes required. D1.LNumber of bytes allocated.
D2.LUnused D2.LCorrupted.
D3.LUnused D3.LCorrupted.
A0.L Base of space A0.LCorrupted.
A1.L Pointer to pointer to free space A1.LCorrupted.
A2.LUnused A2.LCorrupted.
A3.LUnused A3.LCorrupted.


No errors are returned by this vector call.


  • All registers except possibly D0 not shown above are not used on entry and are preserved on exit.
  • When the vector is used to set up a user heap, the pointer to free space must be made zero. Thereafter its value is maintained by MM_ALLOC/MEM_ALHP and MM_LNKFR/MEM_REHP and should not be altered, and need not be used, by the programmer.


The examples here show the use of this vector to set up a user heap and to return space to the user heap.

qdosmsq/vectors/rehp.txt · Last modified: 2009/02/12 16:04 by george.gwilt