void main()
{
unsigned int BLOCK;
for( BLOCK = 0 ; BLOCK < 4 ; BLOCK++ )
{
char FSOURCE[] = "c:\BFCODE.txt" ;
file_open( FSOURCE );
unsigned int MODE;
for( MODE = 0 ; MODE < 4 ; MODE++ )
{
unsigned int RR = 0;
unsigned int iptr;
for( iptr = 0, RR = 0 ; iptr < 32 ; iptr++ )
{
unsigned int INS;
switch (buff_in[iptr])
{
case 'R':
RR = 1;
break;
case '>':
INS = 0;
break;
case '<':
INS = 1;
break;
case '+':
INS = 2;
break;
case '-':
INS = 3;
break;
case ',':
INS = 4;
break;
case '.':
INS = 5;
break;
case '[':
INS = 6;
break;
case ']':
INS = 7;
break;
default:
INS = 8;
}
if (INS < Cool
{
if( buff_in[iptr] != 'R' )
{
unsigned int uC;
for( uC=0 ; uC<4 ; uC++ )
{
unsigned int a =MODE * 128 + ( iptr - RR ) * 4 + uC * 1 ;
unsigned int b = RR * 512 +MODE* 128 + BLOCK*32 + INS * 4+ uC * 1;
buff_out[a] = INS_HEX ;
}
}
}
}
}
if(BLOCK == 0)
file_close( "c:\RAM.txt" );
else if(BLOCK == 1)
file_close( "c:\ALU.txt" );
else if(BLOCK == 2)
file_close( "c:\IO.txt" );
else if(BLOCK == 3)
file_close( "c:\WLC.txt" );
}
return;
}