Exemple #1
0
int main(int argc, char *argv[])
{
	QApplication a(argc, argv);

	while(1)
	{
		processSleep( 100 );

		qDebug() << "checkIfRunningProcess()";
		if( checkIfRunningProcess() == false )
			break;
	}

	// for race condition, SharedPainter program exiting..
	processSleep( 200 );

	// Extract Patch file.
	if (unzipPatchFile() )
		return -1;

	// Remove Patch file.
	renamePatchFile( PROGRAM_FILE_NAME );

	// Run application
	launchProgram( PROGRAM_FILE_NAME );

	return 0;
}
Exemple #2
0
void executeProgram(char* name, int segment){
	char buff[13312];
	int i = 0;
	readFile(name,buff);
	while(i< 13312){
		putInMemory(segment, i, buff[i]);
		i++;
	}
	launchProgram(segment);
}
void executeProgram(char* name, int segment) {
  char buffer[0x1000];
  int i = 0;
  readFile(name, buffer);
  
  while ( i < 0x1000) {
      putInMemory(segment, i, buffer[i]);
      i++;
   }
   launchProgram(segment);
}
Exemple #4
0
executeProgram(char* name, int segment){
	int i ;
	char buffer[512];
	readFile(name , buffer);
	i = 0;
	while(i<512){
		putInMemory(segment , i , buffer[i]);
		i++;
	}
	launchProgram(segment);
}
void executeProgram(char* name, int segment){
	char temp[13312];
	int i;
	printString("launching program...\r\n");
	if(readFile(name,temp)==1){//means that the program file exists
		for(i=0;i<13312;i++){  //put temp into memory
			putInMemory(segment,i,temp[i]);
		}		
		launchProgram(segment);
	}	
}
void executeProgram(char* name, int segment){
	int counter= 0;
	int index = 0x0000;
	char buffer [13312];
	readfile(name, buffer);
	while(counter < 13312){
		putInMemory(segment, index++, buffer[counter]);
		 counter++;
		
	}
	launchProgram(segment);
	
}
Exemple #7
0
	void executeProgram (char* c , int seg)
	{
		char buffer[13312];
		int i = 0;
		readFile(c,buffer);
		while(i < 13312)
		{
			putInMemory(seg , i , buffer[i]);
			i++;
		}
		launchProgram(seg);

	}
Exemple #8
0
void executeProgram(char* name, int segment) {
	
	char file_buffer[13312];
	int i = 0;
	
	readFile(name, file_buffer);
	while (i < 13312) {
		putInMemory(segment, i, file_buffer[i]);
		++i;
	}
	launchProgram(segment);
	
	
}
Exemple #9
0
void executeProgram(char* name, int segment){
	char buffer[26*512];
	int i;
	int bufferSize=26*512; //26 sector , 512 bytes per sector
	int t= readFile(name,buffer);

	if(t>-1){
		for (i=0; i<13312;i++){
			moveToSegment(segment,i,buffer[i]);
		} 

		launchProgram(segment);
	}

}
Exemple #10
0
void runProgram(char *name, int segment){
  // load file into buffer
char buffer[13312];
int size;
int base_location = segment*4096;
int index=0;
readFile(name,buffer,&size);
/*loads in memory segment location and then loads in buffer info */
while (index!=13312){
  putInMemory(base_location,index,buffer[index]);
  ++index;
  }
  /*launches program */
launchProgram(base_location);
}
void executeProgram(char* name, int segment){
	int i ;
     char buffer[13312];
     readFile(name,buffer);
     //printString("heree");
     for(i=0;i<13312;i++){
     	// if(buffer[i] != 0x0){
      //      printString("buffer");
      // }
     		//printString("here2");
     		putInMemory(segment,0x0000+i,buffer[i]);
     	//}else{
     	//break;
     	//}
     }
     launchProgram(segment);
}
Exemple #12
0
/* Will run both single and multi-sector programs */
void runProgram(char* name, int segment) {
  char programBuffer[13312];
  int programSize = 0;
  int baseLocation;
  int offset;

  if(!readFile(name,&programBuffer,&programSize))
    return;
  baseLocation = 0x1000 * segment;

  for(offset = 0; offset != programSize; ++offset) {
    putInMemory(baseLocation,offset,programBuffer[offset]);
  }

  launchProgram(baseLocation);
   
}
Exemple #13
0
executeProgram(char* name, int segment) {
	int i;
	char buffer[13312];
	//printString("executeProgram\r\n");
	readFile(name, buffer);
	if (buffer[0] == 0x00) {
		//Check with Ramy
		interrupt(0x21, 0, "File not found!\0", 0, 0);
		interrupt(0x21, 5, 0, 0, 0);
	}
	//printString("executeProgram READ\r\n");
	for(i=0; i<13312; i++) {
		putInMemory(segment, i, buffer[i]);
	}
	//printString("executeProgram MEM\r\n");
	launchProgram(segment);
}
Exemple #14
0
void executeProgram(char * name, int segment){ 
    char buffer[13312];
    int counter = 0;
    int i;
    readFile(name, buffer);
    for(i = 0x0000; counter < 5; i++){
        putInMemory(segment, i, buffer[i]);
        if(buffer[i] == 0x00){
            counter++;
        } else {
            counter = 0;
        }

    }
    i++;
    launchProgram(segment);
    printString("tettsetse\n\0");
}
Exemple #15
0
void runProgram(char* name, int segment) {
    char buffer[512];
    int size = 0, baseLoc = segment * 4096;
    int offset;
    
    // Read program file into buffer
    readFile(name, buffer, &size);

    if(size == 0) {
        // Return if file is not found
        return;
    }

    for(offset = 0; offset < size * 512; offset += 1) {
        // Put each char in the buffer into memory
        putInMemory(baseLoc, offset, buffer[offset]);
    }

    // Launch the program
    launchProgram(baseLoc);
}
Exemple #16
0
void stop() { launchProgram(8192); }