t_stat cdr_boot (int32 unitno, DEVICE *dptr) { uint32 i; extern t_uint64 *M; for (i = 0; i < BOOT_SIZE; i++) WriteP (BOOT_START + i, boot_rom[i]); PC = BOOT_START; return SCPE_OK; }
int main(){ void WriteX(unsigned,ofstream&); void WriteMX1(unsigned,ofstream&); void WriteR(unsigned,ofstream&); void WriteRO(ofstream&); void WriteP(unsigned,ofstream&); void WriteA(unsigned,ofstream&); void WriteL(unsigned,ofstream&); void WriteN(ofstream&); void WriteB(unsigned,ofstream&); unsigned dimension; string file; ofstream sfile; cout<<"This file is used to write the connections of the nodes in the .mx file"<<endl; cout<<"Give one of the dimensions of the MX1 matrix"<<endl; cin>>dimension; cout<<"Cool thanks"<<endl; cout<<"Please give a file name "<<endl; cin>>file; file = file + ".mx"; sfile.open(file,ios::app); if(sfile.fail()){ cerr<<"this file '"<<file<<"' does not exist in the form of .mx"<<endl; return false; } else{ cout<<"file "<<file<<" is k"<<endl; cout<<"On to the processing!!!"<<endl; //sfile<<"END CONNECTIONS"<<endl; WriteX(dimension,sfile); WriteMX1(dimension,sfile); WriteR(dimension,sfile); WriteRO(sfile); WriteP(dimension,sfile); WriteA(dimension,sfile); WriteL(dimension,sfile); WriteN(sfile); WriteB(dimension,sfile); sfile<<"END CONNECTIONS"<<endl; sfile.close(); } cout<<"File closed. TERMINATING....."<<endl; return 0; }