Sunday, January 09, 2011
ibus malayalam ubuntu 10.10
To create my previous post, i tried to use ibus to type in malayalam, but in ibus, malayalam was misssing. i found a solution, it may work for you also.
To get malayalam support in ibus , run the following command
To get malayalam support in ibus , run the following command
sudo apt-get install ibus ibus-m17n m17n-db m17n-contrib ibus-gtk
not only for malayalam but several other like Hindi,urdu....
Friday, January 07, 2011
IS de fragmentation required in Linux File system?
One of the question that come out every once a while from new GNU/Linux users is how to defrag Linux? Usually most would be satisfied with the short answer "Linux does not need filesystem defragmentation like Windows".
For curious users who prefer a rather complete explanation about why GNU/Linux filesystem doesn't need defragmentation like WIndows are, then this article might provide such answer to you : Why doesn't Linux need defragmenting?
For curious users who prefer a rather complete explanation about why GNU/Linux filesystem doesn't need defragmentation like WIndows are, then this article might provide such answer to you : Why doesn't Linux need defragmenting?
Tuesday, January 04, 2011
Design of Single Pass Assembler using C
DESCRIPTION input : sic source code in the file 'INPUT.DAT' out put : files : SYMTAB.DAT,OBJFILE.DAT,ERROR.DAT RUNabhisheklal@abhisheklal-System-Product-Name:~/Documents/Single Pass/Single Pass$ gcc SINGLE.c abhisheklal@abhisheklal-System-Product-Name:~/Documents/Single Pass/Single Pass$ ./a.out Output file:OBJCODE.DAT Errors are described in ERROR.DAT Symbol table is in the file:SYMTAB.DATabhisheklal@abhisheklal-System-Product-Name:~/Documents/Single Pass/Single Pass$
CODE#include<stdio.h>
#include<string.h>
#define q 11//no. of mnemonics in the array A
void main()
{
int lc,ad,address,err=0;
int s,num,l,i=0,j,n=0,line=1,f=0,f1=0,t=0,ni=0,m=0,t1;
FILE *fp1,*fp2,*fp3,*fp4;
char lab[10],op[10],val[10],code[10];
char a[20][15]={"STA","STL","LDA","LDB","J","JEQ","J","SUB","COMP","STCH","ADD","SUB"};
char b[20][15]={"14","32","03","69","34","30","48","28","24","16","0C"};
char sym[15][10];
int symadd[15];
//clrscr();
fp1=fopen("INPUT.DAT","r");
fp2=fopen("OBJFILE.DAT","w");
fp3=fopen("ERROR.DAT","w");
fp4=fopen("SYMTAB.DAT","w");
while((!feof(fp1)))
{
fscanf(fp1,"%s\t%s\t%s",lab,op,val);
t++;
m++;
if(strcmp(op,".")==0)
m=0;
else if(strcmp(op,"END")==0)
break;
}
t=t-1;
m--;
fclose(fp1);
fp1=fopen("INPUT.DAT","r");
fscanf(fp1,"%s\t%s\t%x",lab,op,&lc);
fprintf(fp3,"-------------------------------------\n");
fprintf(fp3,"LINE NO.\t|ERROR FOUND\n");
fprintf(fp3,"-------------------------------------");
fprintf(fp4,"SYMBOL\tADDRESS");
s=lc;
fprintf(fp2,"H^%s^00%x^%x\n",lab,lc,t*3);
fprintf(fp2,"T^00%x^",lc);
if(m>10)
fprintf(fp2,"1E");
else
fprintf(fp2,"%x",m*3);
while((op,".")!=0&&(!feof(fp1)))
{
fscanf(fp1,"%s\t%s\t%s",lab,op,val);
line++;
if(strcmp(lab,"$")!=0)
{
for(i=0;i<n;i++)
{
if(strcmp(lab,sym[i])==0)
{
f=1;
break;
}
f=0;
}
if(f==0)
{
strcpy(sym[n],lab);
symadd[n]=lc;
fprintf(fp4,"\n%s\t%x",lab,lc);
n++;
}
if(f==1){
fprintf(fp3,"%d\t\t|SYMBOL ALREADY DEFINED\n",line);err++;}
}
num=atoi(val);
if(strcmp(op,"RESW")==0)
lc=lc+(num*3);
else if(strcmp(op,"RESB")==0)
lc=lc+num;
else if(strcmp(op,"BYTE")==0)
{
num=strlen(val)-3;
lc=lc+num;
for(i=2,j=0;i<strlen(val)-1;i++)
{
code[j]=val[i];
j++;
}
code[j]='\0';
fprintf(fp2,"^%s",code);
ni++;
}
else
lc=lc+3;
if(strcmp(op,".")==0)
break;
}
while(strcmp(op,"END")!=0&&(!feof(fp1)))
{
fscanf(fp1,"%s\t%s\t%s",lab,op,val);
line++;
if(strcmp(op,"END")==0)
break;
if((strcmp(lab,"$")!=0)&&((strcmp(op,"RESW")!=0||strcmp(op,"RESB")!=0||strcmp(op,"WORD")!=0||strcmp(op,"BYTE")==0)))
{
for(i=0;i<n;i++)
{
if(strcmp(lab,sym[i])==0)
{
f=1;
break;
}
f=0;
}
if(f==0)
{
strcpy(sym[n],lab);
symadd[n]=lc;
fprintf(fp4,"\n%s\t%x",lab,lc);
n++;
}
else{
fprintf(fp3,"\n%d\t\t|SYMBOL ALREADY DEFINED",err++);}
}
else if(strcmp(op,"RESW")==0||strcmp(op,"RESB")==0||strcmp(op,"WORD")==0||strcmp(op,"BYTE")==0)
fprintf(fp3,"\n%d\t\t|Declaration not allowed here",line);
if(strcmp(op,"RESW")!=0&&strcmp(op,"RESB")!=0&&strcmp(op,"WORD")!=0&&strcmp(op,"BYTE")!=0)
{
for(i=0;i<q;i++)
{
if(strcmp(op,a[i])==0)
{
strcpy(code,b[i]);
f1=0;
break;
}
f1=1;
}
if(f1==1){
fprintf(fp3,"\n%d\t\t|WRONG OPCODE",line);err++;}
for(i=0;i<n;i++)
{
if(strcmp(val,sym[i])==0)
{
address=symadd[i];
f=0;
break;
}
f=1;
}
if(f){
fprintf(fp3,"\n%d\t\t|UNDEFINED SYMBOL",line);err++;}
}
if(ni<10)
{
fprintf(fp2,"^%s%x",code,address);
ni++;
}
else
{
fprintf(fp2,"T^00%x^",lc);
if(m>10)
{
fprintf(fp2,"1E");
m=m-10;
}
else
{
fprintf(fp2,"%x",m*3);
fprintf(fp2,"^%s%x",code,address);
ni=0;
}
}
lc=lc+3;
}
fprintf(fp2,"\nE^00%x",s);
fprintf(fp3,"\nNo of errors=%d\n--------------------------------------",err);
printf("Output file:OBJCODE.DAT\nErrors are described in ERROR.DAT\nSymbol table is in the file:SYMTAB.DAT");
//getch();
fcloseall();
}
Friday, July 10, 2009
Ubuntu Repository 9.04 (Jaunty)
For super seed downloads use flashget installed using wine
Multiple links will acclerate up to 10 times.
http://repo.ugm.ac.id/iso/ubuntu-dvdrepo/9.04/
http://bos.fkip.uns.ac.id/pub/repository/ubuntu/ubuntu9.04/
ftp://kambing.ui.ac.id/iso/ubuntu-repository/jaunty/
http://mirror.unej.ac.id/pub/iso/ubuntu-repository/jaunty/
http://opensource.telkomspeedy.com/repo/iso/JauntyRepoDVD/
http://kmte.ukm.ums.ac.id/pub/iso/Repo%20Ubuntu/repo-ubuntu9.04/
http://buaya.klas.or.id/pub/ubuntu/9.04/repo/
http://repo.ugm.ac.id/iso/ubuntu-dvdrepo/9.04/
Subscribe to:
Posts (Atom)