Memory Services


 
Contents: 0x10    Allocate data page

Allocates 1 data page for an application. If an error is returned nothing was allocated.

Input
  None

Output
  EBX    Address of page
  AL     Status
 

0x18    De-allocate data pages 


De-allocates data pages for an application. If an error is returned nothing was de-allocated.

Input
  EBX   Number of pages

Output
  AL     Status
 

0x80    Allocate common memory pages 


Allocates pages of common memory.

Input
  BX    CodeID
  ECX   Number of pages

Output
  EBX    Address of lowest page
  AL     Status
 

0x81    Allocate DMA pages 


Allocates pages of memory below 16Mb.

Input
  BX    CodeID
  ECX   Number of pages

Output
  EBX    Address of lowest page
  AL     Status
 

0x84    Allocate and clear common memory pages 


Allocates pages of common memory and fills them with 0.

Input
  BX    CodeID
  ECX   Number of pages

Output
  EBX    Address of lowest page
  AL     Status
 

0x85    Allocate and clear DMA Pages 


Allocates pages of memory below 16Mb and fills them with 0.

Input
  BX    CodeID
  ECX   Number of pages

Output
  EBX    Address of lowest page
  AL     Status
 
 

0x88    Allocate a page at a specific address 


This only allocates a single page at a time.

Input
  BX    CodeID
  ECX   Address within page

Output
  AL     Status
 

0x89    Resize common memory block 


This increases or decreases the size of a run pages. Regardless of the returned status this routine will give reliable output values.

Input
  BX     CodeID
  ECX    Current number of pages in run
  EDX    Desired number of pages in run
  ESI    Address of first page in run

Output
  BX     CodeID
  ECX    Current number of pages in run
  EDX    Desired number of pages in run
  ESI    Address of first page in run
  AL     Status
 

0x8A    Take common memory block 


This changes the ownership of a block of memory.

Input
  BX     Old codeID
  ECX    Number of pages in run
  DX     New codeID
  ESI    Address of first page in run

Output
  AL     Status
 

0x90    De-allocate common memory Pages


All used for de-allocating DMA pages.

Input
  EBX    Address of first page
  ECX    Number of pages
  DX     CodeID

Output
  AL     Status
 

0xC0    Install module


This allocates memory for a module, copies it to the allocated space and creates a code seg for it.

Input
  EBX    Physical address of module

Output
  EBX    Offset within module for code entry point
  CX     Code ID for module
  AL     status
 

0xC1    Create address space


This creates an address space for an application, allocates code pages for it and copies it to the allocated space.

Input
  EBX    Physical address of module
  CX     Task ID for application

Output
  EBX    Address of page directory
  AL     status
 

0xC2    Create stack 


This creates a protected stack in an address space.

Input
  EBX    Address of page directory
  CL     Stack number (0 for first)

Output
  EBX    Address of stack (ESP for new stack)
  AL     status
 

0xC8    Remove module


This de-allocates memory used by a module and removes it's code segment.

Input
  BX    Code segment for module

Output
  AL     status
 

0xC9    Destroy address space


This destroys an address space and de-allocates any memory it used.

Input
  EBX    Address of page directory
  CX     Task ID for application

Output
  AL     status
 
 

0xDF    Find address of code


This is used to remove a call gate for OS services.

Input
  BX     Code ID

Output
  EBX    Address of code
  AL     status
 

0xE0    Allocate interrupt gate


Input
  BL     Interrupt
  CX     Selector
  EDX    Offset

Output
  AL     status
 

0xE1    Allocate trap gate


Input
  BL     Interrupt
  CX     Selector
  EDX    Offset

Output
  AL     status

0xE2    Allocate task gate


Input
  BL     Interrupt
  CX     Selector

Output
  AL     status
 

0xE8    De-allocate interrupt


Input
  BL     Interrupt
  CX     Selector

Output
  AL     status
 

0xF0    Self Test


This service test the memory manager.

Input
  none

Output
  EBX    address of error string (unless no error)
  AL     status (0 means ok, no error string)
 

0xF1    Idle


This is used to give the memory manager idle time. It's normally only ever used by time services.

Input
  none

Output
  AL     status (0 means ok, no error string)
 


Home  Index
Copyright 1998, Brendan Trotter