Page 132 - DCAP507_SYSTEM_SOFTWARE
P. 132

System Software




                    Notes          {
                                   if(strcmp(input,"H")==0)
                                   {
                                   fscanf(fp1,"%s  %x  %x  %s",label,&start,&end,input);
                                   address=start;
                                   }
                                   else  if(strcmp(input,"T")==0)
                                   {
                                   l=length;
                                   ptaddr=addr;
                                   fscanf(fp1,"%x  %x  %s",&taddr,&length,input);
                                   addr=taddr;
                                   if(w==0)
                                   {
                                   ptaddr=address;
                                   w=1;
                                   }
                                   for(k=0;k<(taddr-(ptaddr+l));k++)
                                   {
                                   address=address+1;
                                   fprintf(fp2,"xx");
                                   count++;
                                   if(count==4)
                                   {
                                   fprintf(fp2,"    ");
                                   i++;
                                   if(i==4)
                                   {
                                   fprintf(fp2,"\n\n%x\t\t",address);
                                   i=0;
                                   }
                                   count=0;
                                   }
                                   }
                                   if(taddr==start)
                                   fprintf(fp2,"\n\n%x\t\t",taddr);
                                   fprintf(fp2,"%c%c",input[0],input[1]);
                                   check();
                                   fprintf(fp2,"%c%c",input[2],input[3]);
                                   check();




          126                               LOVELY PROFESSIONAL UNIVERSITY
   127   128   129   130   131   132   133   134   135   136   137