#ifndef _TDPMI32_
#define _TDPMI32_ 1

#code32 TRUE
#include "TDPMI16.H--"

#undef INITTINYDPMI
#define INITTINYDPMI INITTINYDPMI32
:void INITTINYDPMI32(){
  @INITTINYDPMI16();
  @ENTER32SEG();
}

:void ENTER32SEG(){
  #code32 FALSE
  AL=6;
  BX=CS;
  $Int	0x31		 //get segment base address
  $Push CX,DX,WORD 0xcf
  CH=0xfa;
  $Push CX,DX
  $Push -1
  AX=0;
  CX=1;
  $Int	0x31		 //allocate LDT descriptors
  AX><BX;
  AX=0xc;
  EDI=ESP;
  $Int 0x31	       //set descriptor
  AX--; AX--;
  $Int	0x31	       //create alias descriptor
  $Push BX
  $Push $+4	       //dirty, but it works
  $Retf
}
#endif