#include "config.h"

#if defined(CONFIG_INT2F)  /* a BIG if block */

#include <stdio.h>
#include "dosrun.h"
#include "config.h"
#include "xms.h"



int int2f_emu ( void )
{
  switch (AH) {
/* XMS functions first ! */
#   ifdef CONFIG_XMS
    case 0x43 : switch (AL) {
                  case 0x00 : AL=0x80;
		              break;
		  case 0x10 : ES=XMS_PROC_SEG;
		              BX=XMS_PROC_OFS;
			      break;
		}
		return 1;
#   endif
/* other int 2F functions follows */
#   ifdef CONFIG_INT2F_OTHER
    /* ANSI.SYS installation checking */
    case 0x1A : if (AL==0) AL=0xFF;
                return 1;
    /* COMMAND.COM running ? */
    case 0x55 : return 1; /* just ignore */
    /* APPEND functions */
    case 0xB7 : return 1; /* just ignore */
#   endif
  }
# ifdef CONFIG_DEBUG_UNIMPLEMENTED_FUNC
  fprintf(stderr,"INT2F: unimplemented function AX=%04X BX=%04X ES=%04X\n",AX,BX,ES);
# endif
  STC;
  return 1;
}


#endif
