/*
coded by :Da_MoRz
Email :p_mdriyaz@hotmail.com
*/
/*____________________________ ECMA(Ver 1.11) __________________________*/
/*_____________________________ Source  code ___________________________*/
/*__________________________________________________________Header files*/

#include 
#include 
#include 

/*___________________________________________________Global Declarations*/

FILE *fv,*fk;
int tot=1;

/*_________________________________________________Function declerations*/

void prnt_top(void);
void prnt_scr(void);
void rec_cmp(char,float);
void rec_in(char,float,int);
float rec_out(char);

void main()
{

/*________________________________________________________Initialization*/

	char var1,var2,var3,var4,op;
	int check=1,ct=1,chk_goto,found_goto;
	int command_no=0;
	int i=0,go=0;float j;
	float val2=0.0,val3=0.0;
	float sum2,sum3;
	FILE *fx,*fy,*fz,*fc,*fw;
clr:
	fw=fopen("var4.ec","w");
	fx=fopen("var1.ec","w");
	fy=fopen("var2.ec","w");
	fz=fopen("var3.ec","w");
	fc=fopen("commands.ec","w");
	fv=fopen("value.ec","w");
	fclose(fv);
/*_______________________________________________________Store the files*/

clrscr();
prnt_top();
prnt_scr();
clrscr();
prnt_top();
while(check)
	{
	begin:
	go=0;
	op=' ';var1=' ';var2=' ';var3=' ';var4=' ';
	printf("(Ln:%d)",command_no+1);
	printf("Operator--> ");
	op=getche();
	if(op=='\b') {command_no=0;goto clr;}
	if(op=='\r') {printf("\a");goto begin;}
	if(op==';') go=1;
	if(op==':') go=2;
	if(op=='g' || op=='d')
		{
		printf(" Label--> ");
		if(op=='d'){var1=getche();}
		if(op=='g'){var2=getche();}
		if((op=='d' && var1=='\r') || (op=='g' && var2=='\r')) {printf("\a");goto begin;}
		printf("\n");
		}
	else if(op=='x'){check=0;}
	else
		{
		printf(" Option--> ");
		var1=getche();
		if(var1=='\r') {printf("\a");goto begin;}
		printf(" Var 1--> ");
		var2=getche();
		if(var2=='\r') {printf("\a");goto begin;}
		if(go!=1)
			{
			printf(" var 2--> ");
			var3=getche();
			if(var3=='\r') {printf("\a");goto begin;}
			if(go != 2)
				{
				printf(" Eq.Var--> ");
				var4=getche();
				}
			}
		printf("\n");
		}
	++command_no;
	if(op !='x')

		{
		fwrite(&var1,sizeof(var1),1,fx);
		fwrite(&var2,sizeof(var2),1,fy);
		fwrite(&var3,sizeof(var3),1,fz);
		fwrite(&var4,sizeof(var4),1,fw);
		fwrite(&op,sizeof(op),1,fc);
		}
	}
fclose(fc);fclose(fz);fclose(fy);fclose(fx);fclose(fw);

/*___________________________________________________________________Run*/


fx=fopen("var1.ec","r");
fy=fopen("var2.ec","r");
fz=fopen("var3.ec","r");
fw=fopen("var4.ec","r");
fc=fopen("commands.ec","r");
getch();
coding:
clrscr();
prnt_top();
printf("\n\n\n\n\n\n\n\n\n\n\t   Press BACKSPACE to list the code (or) any other key to RUN");
if(getch()=='\b')
	{
	clrscr();
	prnt_top();
	rewind(fc);rewind(fx);rewind(fy);rewind(fz);rewind(fw);ct=1;
	printf("PROGRAM CODING");
	printf("\n~~~~~~~~~~~~~~\n");
	while(ct

    Source: geocities.com/ecma_ver1/source

               ( geocities.com/ecma_ver1)