GEM pages
Home -> GEM -> GEM interrupts

Interrupts used by Intel GEM

GEM consists of two modules which provide services:

It is entirely possible to have the VDI loaded without the AES (for example, by typing GEMVDI /COMMAND.COM). This is not possible in ViewMAX.

GEM/1 and GEM/2 hook three interrupts. GEM/3 and ViewMAX hook two...

INT 24h
The critical error handler. This is hooked by the AES, which offers the choices "Retry" or "Cancel". "Retry" returns as normal, while "Cancel" pops the stack and returns to the application which made the INT 21h call with the Carry flag set and AX=40h+critical error code (see the Interrupt List, table 1798). GEM/2 only supports the DOS 2.x critical error numbers.
INT E0h
Calls with CL=73h are intercepted by the GEM/1 and GEM/2 VDIs, emulating the GSX-86 graphics system.

If CH is not 4, the call returns immediately. Otherwise, the call goes to the VDI with DS:DX pointing to the parameter block.

The ViewMAX and GEM/3 VDIs do not hook this interrupt.

INT EFh
    For calls to the AES:
    DX=0;
    ES:BX -> AES parameter block;
    CX=00C8h or 00C9h.
    For calls to the VDI:
    DS:DX -> VDI parameter block;
    CX=0473h (ignored by the VDI, but used to get the call past the AES). 
If the AES is not loaded, all calls go to the VDI, which ignores CX. The installation check below should be used to find whether the AES or VDI are present.

Formats of the parameter blocks

AES parameter block

    DD  control ;Control array. 5 words.
    DD  global  ;Global variables. 15 words.
    DD  int_in  ;Integer parameters
    DD  int_out ;Integer results
    DD  addr_in ;Address (DWORD) parameters
    DD  addr_out;Address (DWORD) results

control is five words in size:

    DW  function    ;AES function number, 10-132
    DW  no. of words in int_in
    DW  no. of words available in int_out
    DW  no. of words in addr_in
    DW  no. of words available in addr_out

VDI parameter block

    DD  contrl  ;Control array. 11 words.
    DD  intin   ;Integer parameters
    DD  ptsin   ;(x,y) pair parameters
    DD  intout  ;Integer results
    DD  ptsout  ;(x,y) pair results

contrl is 11 words:

    DW  function    ;VDI function number, 1-132
    DW  [in]  no. of words in ptsin   
    DW  [out] no. of words in ptsout
    DW  [in]  no. of words in intin
    DW  [out] no. of words in intout
    DW  subfunction 
    DW  graphics handle
    DD  [in]  pointer parameter
    DD  [out] pointer return

Installation check

Two bytes after the INT EFh entry point, one of the following ASCII sequences should appear:

"GEMVDI"
The GEM VDI (only) is present.
"GEMAES"
The GEM AES and VDI, or the ViewMAX AES and VDI, are present.
"ViewMAX"
The ViewMAX VDI (only) is present.

Either sequence is followed by a zero-terminated ASCII number. Known combinations are:

"GEMAES10"
GEM/1 AES
"GEMAES20"
GEM/2, GEM/3, ViewMAX AES; GROWBOX.ACC
"GEMAES400"
GEM/4 AES
"GEMVDI10"
GEM/1 VDI
"GEMVDI20"
GEM/2 VDI
"GEMVDI23"
GEM/3 VDI
"GEMVDI32 31-Mar-89"
GEM/4 VDI
"ViewMAX1"
ViewMAX/1 and ViewMAX/2 VDIs

John Elliott 8-2-1998