Potential do_border replacement:
	int pass;
	_asm
	{
		mov		eax, dword ptr [scrn_ptr]		;; eax = &scrn_ptr[LCHOP * 8]
		add		eax, 24
		mov		ecx, dword ptr cl_word + 16		;; ecx = cl_word[8]
		mov		edx, dword ptr cl_word + 16		;; edx = cl_word[8]
		mov		ebx, offset pm_scanline + 12	;; ebx = &pm_scanline[12]
		shl		edx, 16							;; edx = edx << 16
		and		ecx, 0ffffh						;; bottom word of ecx
		or		edx, ecx						;; cl_word[8] << 16 | cl_word[8]
		mov		dword ptr[pass], 2				;; pass = 2
		mov		ecx, dword ptr [left_border_chars]		;; ecx = left_border_chars

start_pass:
		cmp		dword ptr [ebx], 0				;; (ULONG *)ptr == 0?
		jne		has_pm							;; Nope, it's a p/m
		mov		dword ptr [eax], edx			;; *ptr = COL_8_LONG
		add		eax, 4							;; ptr++
		mov		dword ptr [eax], edx			;; *ptr = COL_8_LONG
		add		eax, 4							;; ptr++

		add		ebx, 4							;; ptr++
		dec		ecx								;; loop-- 
		jnz		start_pass;						;; loop == 0?
		dec		dword ptr[pass]					;; pass--
		jnz		end_pass						;; pass == 0?
		jmp		end_routine						;; if so, exit
has_pm:
		/*
				UBYTE *c_pm_scanline_ptr = (char *) t_pm_scanline_ptr;
				UBYTE pm_pixel;
				UBYTE colreg;
				int k;
				for (k = 1; k <= 4; k++) {
					pm_pixel = *c_pm_scanline_ptr++;
					colreg = 8;
					pf_colls[colreg]|=pm_pixel;
					colreg=cur_prior[new_pm_lookup[pm_pixel]+colreg];
					*ptr++ = cl_word[colreg];
				}	*/
		push	ecx
		mov		cl, byte ptr [ebx]				;; cl = (char *)t_pm_scanline_ptr;
		mov		ch, cl
		or		cl, byte ptr pf_colls + 8		;; ch |= pf_colls[8]
		mov		byte ptr pf_colls + 8, cl
		mov		cl, byte ptr new_pm_lookup + ch
		add		cl, 8
		mov		ch, byte ptr cur_prior + cl
		mov		word ptr [ebx], word ptr cl_word + ch

		add		ebx, 4							;; ptr++
		dec		ecx								;; loop-- 
		jnz		start_pass;						;; loop == 0?
		dec		dword ptr[pass]					;; pass--
		jnz		end_pass						;; pass == 0?
		jmp		end_routine						;; if so, exit
end_pass:
		mov		ebx, dword ptr [right_border_start]
		mov		eax, dword ptr [scrn_ptr]
		add		eax, ebx
		mov		ecx, ebx
		shr		ebx, 1
		add		ebx, offset pm_scanline
		cmp		ecx, 0
		jnz		start_pass
end_routine:
	}
#endif




/* Routine to read an EXE directly */

/*         binary load file header
           Decimal        Hexadecimal
     
             255  identifier   FF
             255               FF
               0     start     00
               7               07
              15      end      FF
               8               08
     
     The above file would load at address $0700 (1792 decimal) and end at
     address $08FF (2063).  If a binary load file has initialization and
     run address appended to it they take on the following format:
     
                              Init and run tailer
        init address format
        CHR   Decimal        Hexadecimal
        [b]     226  identifier  E2
          |       2              02
        [c]     227              E3
          |       2              02
                  n    address   nn
                  n              nn
     
      run address format
      [diamond] 224  identifier  E0
          |       2              02
        [a]     225              E1
          |       2              02
                  n    address   nn
                  n              nn */


#if 0
	FILE *exefile;
	unsigned char *tempmem = NULL;
	int	filelength, startaddr, stopaddr, progress;
	unsigned char	runfmt[] = { 0xe0, 0x02, 0xe1, 0x02 };
	unsigned char	initfmt[] = { 0xe2, 0x02, 0xe3, 0x02 };

	exefile = fopen( filename, "rb" );
	if( !exefile )
	{
		Aprint( "Could not open file %s for reading", filename );
		return FALSE;
	}

	fseek( exefile, 0, SEEK_END );
	filelength = ftell( exefile );

	if( filelength > 65536 )
	{
		Aprint( "File is too long to be an Atari executable" );
		return FALSE;
	}

	tempmem = malloc( filelength );
	if( !tempmem )
	{
		Aprint( "Could not allocate temporary storage for executable!" );
		return FALSE;
	}

	fseek( exefile, 0, SEEK_SET );
	if( fread( tempmem, filelength, 1, exefile ) != 1 )
	{
		Aprint( "Failure reading from file %s", filename );
		free( tempmem );
		return FALSE;
	}

	if( tempmem[0]!=255 || tempmem[1]!=255 )
	{
		Aprint( "Not an Atari executable format file - missing FF FF header." );
		free( tempmem );
		return FALSE;
	}

	progress = 2;

	while( progress < filelength )
	{
		startaddr = tempmem[progress] + 256 * tempmem[progress + 1];
		stopaddr = tempmem[progress + 2] + 256 * tempmem[progress + 3];
		progress += 4;	/* Skip header bytes for start/stop address */

		if( startaddr == 0 || stopaddr == 0 )
		{
			Aprint( "Illegal start or stop address in segment" );
			free( tempmem );
			return FALSE;
		}

		if( progress + stopaddr - startaddr > filelength )
		{
			Aprint( "File is corrupt - segment address past end of file." );
			free( tempmem );
			return FALSE;
		}

		memcpy( &memory[startaddr], &tempmem[progress], stopaddr - startaddr );
		progress += stopaddr - startaddr + 1;	/* Skip length of segment plus trailing 0*/

		if( tempmem[progress] == 255 && tempmem[progress + 1] == 255 )
			progress += 2;
		else
		{
			if( !strncmp( (const char *)&tempmem[progress], (const char *)&runfmt[0], 4 ) ||
				!strncmp( (const char *)&tempmem[progress], (const char *)&initfmt[0], 4 ) )
				break;
		}
	}

	if( !strncmp( (const char *)&tempmem[progress], (const char *)&runfmt[0], 4 ) )
	{
		memory[ 9 ] = 2;	/* Set casette boot vector */
		memory[ 2 ] = tempmem[ progress + 4 ]; /* Set CASINI */
		memory[ 3 ] = tempmem[ progress + 5 ];
		free( tempmem );
		Warmstart();
		return TRUE;
	}
	
	Aprint( "Unable to load this file - it requires Atari DOS to load" );

	free( tempmem );
	
	return FALSE;
#endif

static void Screen_Windowed_DDraw_768( UBYTE *screen )
{
	RECT	rcWind, rcTmp, rcDesktop;
	HDC	hdc;
	HRESULT	hResult;
	int	iOffset = GetSystemMetrics( SM_CXEDGE );
	char *dest, *src, *stop;
	UBYTE	screentemp[ ATARI_STRETCH_VIS_SCREEN_SIZE ];

	consol = 7;
	if( unAtariState & ATARI_PAUSED )
		return;

	SystemParametersInfo( SPI_GETWORKAREA, 0, (LPVOID)&rcDesktop, 0 );
	GetWindowRect( hWnd, &rcWind );
	rcWind.left += iOffset;
	rcWind.top += iOffset;

	memcpy( &rcTmp, &srcBlt, sizeof( RECT ) );

	dstBlt.left = rcWind.left - rcDesktop.left;
	if( dstBlt.left < 0 )
	{
		dstBlt.left = rcDesktop.left;
		rcTmp.left = -dstBlt.left >> 1;
	}

	dstBlt.right = dstBlt.left + ATARI_STRETCH_VIS_WIDTH;
	if( dstBlt.right > rcDesktop.right )
	{
		dstBlt.right = rcDesktop.right;
		rcTmp.right = ATARI_STRETCH_VIS_WIDTH - (ATARI_STRETCH_VIS_WIDTH + dstBlt.left - dstBlt.right)/2;
	}

	dstBlt.top = rcWind.top;
	dstBlt.bottom = dstBlt.top + ATARI_STRETCH_HEIGHT;
	if( dstBlt.bottom > rcDesktop.bottom )
	{
		rcTmp.bottom -= (dstBlt.bottom - rcDesktop.bottom) >> 1;
		dstBlt.bottom = rcDesktop.bottom ;
	}

	dest = screentemp;
	src = screenbuff + ATARI_HORZ_CLIP;
	stop = screentemp + ATARI_STRETCH_VIS_SCREEN_SIZE;
	while( dest < stop )
	{
		char *linep = dest;
		while( linep < dest + ATARI_STRETCH_VIS_WIDTH )
		{
			*linep++ = *src;
			*linep++ = *src++;
		}
		memcpy( linep, linep - ATARI_STRETCH_VIS_WIDTH, ATARI_STRETCH_VIS_WIDTH );
		dest += ATARI_STRETCH_VIS_WIDTH * 2;
		src += ATARI_HORZ_CLIP * 2;
	}
	hResult = lpMemory->lpVtbl->GetDC( lpPrimary, &hdc );
	if( hResult == DD_OK )
	{
		StretchDIBits( hdc, 0, 0, ATARI_STRETCH_VIS_WIDTH, ATARI_STRETCH_HEIGHT,
			rcWind.left, rcWind.top, ATARI_STRETCH_VIS_WIDTH, ATARI_STRETCH_HEIGHT,
			screentemp, lpbmi2, DIB_RGB_COLORS, SRCCOPY);
	}
	else
		ShowDDrawError( IDS_DDERR_SURFACE_LOCK, hResult, TRUE );
	lpMemory->lpVtbl->ReleaseDC( lpPrimary, hdc );

#ifdef USE_VIDEO_BUFFER
	lpVideo->lpVtbl->Blt( lpVideo, &rcTmp, lpMemory, &rcTmp, 0, NULL);
	hResult = lpPrimary->lpVtbl->Blt( lpPrimary, &dstBlt, lpVideo, &rcTmp, 0, NULL);
#else	
	hResult = lpPrimary->lpVtbl->Blt( lpPrimary, &dstBlt, lpMemory, &rcTmp, 0, NULL);
#endif
	if( hResult != DD_OK )
		ShowDDrawError( IDS_DDERR_PRIMARY_BLT, hResult, TRUE );
	return;
}



#if 0 
		/* Pixel mode/depth isn't important any more */
		DDPIXELFORMAT	ddPix;
		
		ZeroMemory( &ddPix, sizeof( ddPix ) );
		ddPix.dwSize = sizeof( ddPix );
		lpPrimary->lpVtbl->GetPixelFormat( lpPrimary, &ddPix );
		
		if( ddPix.dwRGBBitCount == 16 )
			RGBMode |= RGB_16BPP;
		else if( ddPix.dwRGBBitCount == 24 )
			RGBMode |= RGB_24BPP;
		else if( ddPix.dwRGBBitCount == 32 )
			RGBMode |= RGB_32BPP;
		else
			ShowDDrawError( "finding the pixel mode, DDraw returned an unhandled depth.", DD_OK, TRUE );
#endif
		



#if 0
static void Blit_Windowed_DDraw( void )
{
	RECT	rcWind, rcTmp, rcDesktop;
	HRESULT	hResult;
	int	iOffset = GetSystemMetrics( SM_CXEDGE );

	SystemParametersInfo( SPI_GETWORKAREA, 0, (LPVOID)&rcDesktop, 0 );
	GetWindowRect( hWnd, &rcWind );
	rcWind.left += iOffset;
	rcWind.top += iOffset;

	if( unAtariState & ATARI_PAUSED )
		return;

	if( iDDrawMode & WINDOWED_384_240 )
	{
		HDC	hdc;
		int	height = ATARI_HEIGHT;

		if( rcWind.bottom > rcDesktop.bottom )
			height = rcDesktop.bottom - rcWind.top;
		/*Blts fail here in different bitplane depth modes. Easier (but slow) to use StretchDIB*/
		/*Further, it is faster to use StetchBlt then the colorspace conversion below UNLESS we*/
		/*are stretching the output*/
		hResult = lpPrimary->lpVtbl->GetDC( lpPrimary, &hdc );
		if( hResult == DD_OK )
			StretchDIBits( hdc, rcWind.left, rcWind.top, ATARI_WIDTH, height,
				0, ATARI_HEIGHT - height, ATARI_WIDTH, height,
				atari_screen, lpbmi, DIB_RGB_COLORS, SRCCOPY );
		else
			ShowDDrawError( "obtaining a lock on the drawing surface", hResult, TRUE );
		lpPrimary->lpVtbl->ReleaseDC( lpPrimary, hdc );
		return;
	}

	dstBlt.right = 0;
	memcpy( &rcTmp, &srcBlt, sizeof( RECT ) );

	dstBlt.left = rcWind.left - rcDesktop.left;
	if( dstBlt.left < 0 )
	{
		dstBlt.right = dstBlt.left;
		rcTmp.left = -dstBlt.right >> 1;
		dstBlt.left = rcDesktop.left;
	}
	dstBlt.top = rcWind.top;
	dstBlt.right += dstBlt.left + ATARI_WIDTH * 2;
	dstBlt.bottom = dstBlt.top + ATARI_HEIGHT * 2;
	if( dstBlt.bottom > rcDesktop.bottom )
	{
		rcTmp.bottom -= (dstBlt.bottom - rcDesktop.bottom) >> 1;
		dstBlt.bottom = rcDesktop.bottom ;
	}

	if( RGBMode & RGB_8BPP )
		hResult = lpPrimary->lpVtbl->Blt( lpPrimary, &dstBlt, lpMemory, &rcTmp, 0, NULL);
	if( RGBMode & RGB_16BPP )
	{
		UBYTE	*src = (UBYTE *)atari_screen;
		unsigned short	*dest = (unsigned short *)rgb_buff;
		int i = ATARI_HEIGHT * ATARI_WIDTH;
		while( i-- )
			*dest++ = RGB16bpp[ *src++ ];
		
		hResult = lpPrimary->lpVtbl->Blt( lpPrimary, &dstBlt, lpMemory, &rcTmp, 0, NULL);
	}
	if( RGBMode & RGB_24BPP )
	{
		UBYTE	*src = (UBYTE *)atari_screen;
		RGBTRIPLE	*dest = (RGBTRIPLE *)rgb_buff;
		int i = ATARI_HEIGHT * ATARI_WIDTH;
		while( i-- )
			*dest++ = RGB24bpp[ *src++ ];
		
		hResult = lpPrimary->lpVtbl->Blt( lpPrimary, &dstBlt, lpMemory, &rcTmp, 0, NULL);
	}
	if( hResult != DD_OK )
		ShowDDrawError( "Blitting to the primary surface in windowed mode", hResult, TRUE );
}

void Atari_DisplayScreen (UBYTE *screen)
{
	HRESULT	hResult;

	consol = 7;
	if( !(iDDrawMode & DDRAW_NONE) )
	{
		if( iDDrawMode & DDRAW_FULL )
		{
			if( (iDDrawMode & DDRAW_FULL_RES_MASK) < DDRAW_640_400 )
				hResult = lpPrimary->lpVtbl->BltFast( lpPrimary, dstBlt.left, dstBlt.top, lpMemory, &srcBlt, DDBLTFAST_NOCOLORKEY);
			else
				hResult = lpPrimary->lpVtbl->Blt( lpPrimary, &dstBlt, lpMemory, &srcBlt, 0, NULL);

			if( hResult == DD_OK )
				return;

            if( hResult == DDERR_SURFACELOST )
			{
				if( !RestoreSurfaces() )
					ShowDDrawError( "restoring the DDraw surfaces", hResult, TRUE );
			}
			else
				ShowDDrawError( "blitting from system memory to the primary surface", hResult, TRUE );
			return;
		}
		else	//DDraw, windowed mode
			Blit_Windowed_DDraw();
	}
	else
	{
		// If we get to here, we aren't even using DirectDraw
		if( iDDrawMode & WINDOWED_384_240 )
		{
			StretchDIBits( h_screenDC, 0, 0, ATARI_WIDTH, ATARI_HEIGHT, 
				0, 0, ATARI_WIDTH, ATARI_HEIGHT, 
				screen, lpbmi, DIB_RGB_COLORS, SRCCOPY);
		}
		else
			StretchDIBits( h_screenDC, 0, 0, ATARI_WIDTH * 2, ATARI_HEIGHT * 2,
				0, 0, ATARI_WIDTH, ATARI_HEIGHT,
				screen, lpbmi, DIB_RGB_COLORS, SRCCOPY);
	}
}
#endif




#if 0
	m_iSpecialKeys[19]=AKEY_BREAK;		//Break key
	m_iSpecialKeys[12]=KEYPAD5;
	m_iSpecialKeys[33]=KEYPAD9;
	m_iSpecialKeys[34]=KEYPAD3;
	m_iSpecialKeys[35]=KEYPAD1;
	m_iSpecialKeys[36]=KEYPAD7;
	m_iSpecialKeys[37]=KEYPAD4;
	m_iSpecialKeys[38]=KEYPAD8;
	m_iSpecialKeys[39]=KEYPAD6;
	m_iSpecialKeys[40]=KEYPAD2;
	m_iSpecialKeys[45]=KEYPAD0;

	m_iSpecialKeys[46]=AKEY_ATARI;		//Delete key

	m_iSpecialKeys[113]=AKEY_OPTION;	//F2
	m_iSpecialKeys[114]=AKEY_SELECT;	//F3
	m_iSpecialKeys[115]=AKEY_START;		//F4
	m_iSpecialKeys[116]=AKEY_WARMSTART;	//F5
	m_iSpecialKeys[119]=SPEED_ATARI;	//F8
	m_iSpecialKeys[120]=SUSPEND_ATARI;	//F9

	m_iCtrlKeys[32]=AKEY_UI;
	m_iCtrlKeys[48]=AKEY_CTRL_0;
	m_iCtrlKeys[49]=AKEY_CTRL_1;
	m_iCtrlKeys[50]=AKEY_CTRL_2;
	m_iCtrlKeys[51]=AKEY_CTRL_3;
	m_iCtrlKeys[52]=AKEY_CTRL_4;
	m_iCtrlKeys[53]=AKEY_CTRL_5;
	m_iCtrlKeys[54]=AKEY_CTRL_6;
	m_iCtrlKeys[55]=AKEY_CTRL_7;
	m_iCtrlKeys[56]=AKEY_CTRL_8;
	m_iCtrlKeys[57]=AKEY_CTRL_9;

	m_iCtrlKeys[65]=AKEY_CTRL_a;
	m_iCtrlKeys[66]=AKEY_CTRL_b;
	m_iCtrlKeys[67]=AKEY_CTRL_c;
	m_iCtrlKeys[68]=AKEY_CTRL_d;
	m_iCtrlKeys[69]=AKEY_CTRL_e;
	m_iCtrlKeys[70]=AKEY_CTRL_f;
	m_iCtrlKeys[71]=AKEY_CTRL_g;
	m_iCtrlKeys[72]=AKEY_CTRL_h;
	m_iCtrlKeys[73]=AKEY_CTRL_i;
	m_iCtrlKeys[74]=AKEY_CTRL_j;
	m_iCtrlKeys[75]=AKEY_CTRL_k;
	m_iCtrlKeys[76]=AKEY_CTRL_l;
	m_iCtrlKeys[77]=AKEY_CTRL_m;
	m_iCtrlKeys[78]=AKEY_CTRL_n;
	m_iCtrlKeys[79]=AKEY_CTRL_o;
	m_iCtrlKeys[80]=AKEY_CTRL_p;
	m_iCtrlKeys[81]=AKEY_CTRL_q;
	m_iCtrlKeys[82]=AKEY_CTRL_r;
	m_iCtrlKeys[83]=AKEY_CTRL_s;
	m_iCtrlKeys[84]=AKEY_CTRL_t;
	m_iCtrlKeys[85]=AKEY_CTRL_u;
	m_iCtrlKeys[86]=AKEY_CTRL_v;
	m_iCtrlKeys[87]=AKEY_CTRL_w;
	m_iCtrlKeys[88]=AKEY_CTRL_x;
	m_iCtrlKeys[89]=AKEY_CTRL_y;
	m_iCtrlKeys[90]=AKEY_CTRL_z;

	m_iCtrlKeys[97]=AKEY_CTRL_A;
	m_iCtrlKeys[98]=AKEY_CTRL_B;
	m_iCtrlKeys[99]=AKEY_CTRL_C;
	m_iCtrlKeys[100]=AKEY_CTRL_D;
	m_iCtrlKeys[101]=AKEY_CTRL_E;
	m_iCtrlKeys[102]=AKEY_CTRL_F;
	m_iCtrlKeys[103]=AKEY_CTRL_G;
	m_iCtrlKeys[104]=AKEY_CTRL_H;
	m_iCtrlKeys[105]=AKEY_CTRL_I;
	m_iCtrlKeys[106]=AKEY_CTRL_J;
	m_iCtrlKeys[107]=AKEY_CTRL_K;
	m_iCtrlKeys[108]=AKEY_CTRL_L;
	m_iCtrlKeys[109]=AKEY_CTRL_M;
	m_iCtrlKeys[110]=AKEY_CTRL_N;
	m_iCtrlKeys[111]=AKEY_CTRL_O;
	m_iCtrlKeys[112]=AKEY_CTRL_P;
	m_iCtrlKeys[113]=AKEY_CTRL_Q;
	m_iCtrlKeys[114]=AKEY_CTRL_R;
	m_iCtrlKeys[115]=AKEY_CTRL_S;
	m_iCtrlKeys[116]=AKEY_CTRL_T;
	m_iCtrlKeys[117]=AKEY_CTRL_U;
	m_iCtrlKeys[118]=AKEY_CTRL_V;
	m_iCtrlKeys[119]=AKEY_CTRL_W;
	m_iCtrlKeys[120]=AKEY_CTRL_X;
	m_iCtrlKeys[121]=AKEY_CTRL_Y;
	m_iCtrlKeys[122]=AKEY_CTRL_Z;

	m_iNormKeys[8]=AKEY_BACKSPACE;
	m_iNormKeys[13]=AKEY_RETURN;
	m_iNormKeys[27]=AKEY_ESCAPE;
	m_iNormKeys[32]=AKEY_SPACE;
	m_iNormKeys[33]=AKEY_EXCLAMATION;
	m_iNormKeys[64]=AKEY_AT;
	m_iNormKeys[35]=AKEY_HASH;
	m_iNormKeys[36]=AKEY_DOLLAR;
	m_iNormKeys[37]=AKEY_PERCENT;
	m_iNormKeys[94]=AKEY_CIRCUMFLEX;
	m_iNormKeys[38]=AKEY_AMPERSAND;
	m_iNormKeys[39]=AKEY_QUOTE;
	m_iNormKeys[42]=AKEY_ASTERISK;
	m_iNormKeys[40]=AKEY_PARENLEFT;
	m_iNormKeys[41]=AKEY_PARENRIGHT;
	m_iNormKeys[95]=AKEY_UNDERSCORE;
	m_iNormKeys[45]=AKEY_MINUS;
	m_iNormKeys[43]=AKEY_PLUS;
	m_iNormKeys[61]=AKEY_EQUAL;
	m_iNormKeys[91]=AKEY_BRACKETLEFT;
	m_iNormKeys[93]=AKEY_BRACKETRIGHT;
	m_iNormKeys[47]=AKEY_SLASH;
	m_iNormKeys[46]=AKEY_FULLSTOP;
	m_iNormKeys[44]=AKEY_COMMA;
	m_iNormKeys[92]=AKEY_BACKSLASH;
	m_iNormKeys[96]=AKEY_CAPSTOGGLE;
	m_iNormKeys[124]=AKEY_BAR;
	m_iNormKeys[126]=AKEY_CAPSLOCK;
	m_iNormKeys[60]=AKEY_LESS;
	m_iNormKeys[62]=AKEY_GREATER;
	m_iNormKeys[63]=AKEY_QUESTION;
	m_iNormKeys[58]=AKEY_COLON;
	m_iNormKeys[59]=AKEY_SEMICOLON;
	m_iNormKeys[34]=AKEY_DBLQUOTE;

	m_iNormKeys[48]=AKEY_0;
	m_iNormKeys[49]=AKEY_1;
	m_iNormKeys[50]=AKEY_2;
	m_iNormKeys[51]=AKEY_3;
	m_iNormKeys[52]=AKEY_4;
	m_iNormKeys[53]=AKEY_5;
	m_iNormKeys[54]=AKEY_6;
	m_iNormKeys[55]=AKEY_7;
	m_iNormKeys[56]=AKEY_8;
	m_iNormKeys[57]=AKEY_9;

	m_iNormKeys[65]=AKEY_A;
	m_iNormKeys[66]=AKEY_B;
	m_iNormKeys[67]=AKEY_C;
	m_iNormKeys[68]=AKEY_D;
	m_iNormKeys[69]=AKEY_E;
	m_iNormKeys[70]=AKEY_F;
	m_iNormKeys[71]=AKEY_G;
	m_iNormKeys[72]=AKEY_H;
	m_iNormKeys[73]=AKEY_I;
	m_iNormKeys[74]=AKEY_J;
	m_iNormKeys[75]=AKEY_K;
	m_iNormKeys[76]=AKEY_L;
	m_iNormKeys[77]=AKEY_M;
	m_iNormKeys[78]=AKEY_N;
	m_iNormKeys[79]=AKEY_O;
	m_iNormKeys[80]=AKEY_P;
	m_iNormKeys[81]=AKEY_Q;
	m_iNormKeys[82]=AKEY_R;
	m_iNormKeys[83]=AKEY_S;
	m_iNormKeys[84]=AKEY_T;
	m_iNormKeys[85]=AKEY_U;
	m_iNormKeys[86]=AKEY_V;
	m_iNormKeys[87]=AKEY_W;
	m_iNormKeys[88]=AKEY_X;
	m_iNormKeys[89]=AKEY_Y;
	m_iNormKeys[90]=AKEY_Z;

	m_iNormKeys[97]=AKEY_a;
	m_iNormKeys[98]=AKEY_b;
	m_iNormKeys[99]=AKEY_c;
	m_iNormKeys[100]=AKEY_d;
	m_iNormKeys[101]=AKEY_e;
	m_iNormKeys[102]=AKEY_f;
	m_iNormKeys[103]=AKEY_g;
	m_iNormKeys[104]=AKEY_h;
	m_iNormKeys[105]=AKEY_i;
	m_iNormKeys[106]=AKEY_j;
	m_iNormKeys[107]=AKEY_k;
	m_iNormKeys[108]=AKEY_l;
	m_iNormKeys[109]=AKEY_m;
	m_iNormKeys[110]=AKEY_n;
	m_iNormKeys[111]=AKEY_o;
	m_iNormKeys[112]=AKEY_p;
	m_iNormKeys[113]=AKEY_q;
	m_iNormKeys[114]=AKEY_r;
	m_iNormKeys[115]=AKEY_s;
	m_iNormKeys[116]=AKEY_t;
	m_iNormKeys[117]=AKEY_u;
	m_iNormKeys[118]=AKEY_v;
	m_iNormKeys[119]=AKEY_w;
	m_iNormKeys[120]=AKEY_x;
	m_iNormKeys[121]=AKEY_y;
	m_iNormKeys[122]=AKEY_z;

#endif


		CATCH( CFileException, e )
		{    
			if( e->m_cause == CFileException::generic  )
				strcpy( szDestDir, "foobar" );
			if( e->m_cause ==  CFileException::fileNotFound )
				strcpy( szDestDir, "foobar" );
			if( e->m_cause == CFileException::badPath )
				strcpy( szDestDir, "foobar" );
			if( e->m_cause == CFileException::tooManyOpenFiles )
				strcpy( szDestDir, "foobar" );
			if( e->m_cause == CFileException::accessDenied )
				strcpy( szDestDir, "foobar" );
			if( e->m_cause == CFileException::invalidFile )
				strcpy( szDestDir, "foobar" );
			if( e->m_cause == CFileException::removeCurrentDir )
				strcpy( szDestDir, "foobar" );
			if( e->m_cause == CFileException::directoryFull )
				strcpy( szDestDir, "foobar" );
			if( e->m_cause == CFileException::badSeek )
				strcpy( szDestDir, "foobar" );
			if( e->m_cause == CFileException::hardIO )
				strcpy( szDestDir, "foobar" );
			if( e->m_cause == CFileException::sharingViolation )
				strcpy( szDestDir, "foobar" );
			if( e->m_cause == CFileException::lockViolation )
				strcpy( szDestDir, "foobar" );
			if( e->m_cause == CFileException::diskFull )
				strcpy( szDestDir, "foobar" );
			if( e->m_cause == CFileException::endOfFile )
				strcpy( szDestDir, "foobar" );
		}
		END_CATCH
