Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Скачиваний:
11
Добавлен:
01.05.2014
Размер:
1.27 Кб
Скачать
package GUI;

import java.io.BufferedReader;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.InputStreamReader;

import memory.phithical_mem.PhithicalMemory;

import core.proc_interface.ProcessorInterface;

public class RISC {

public static void main(String args[]){
if(args==null){
System.out.println("Please chose the file with code");

}
else{

String fileName="codeSample.txt";
ProcessorInterface.resetProcessor();
PhithicalMemory.mallocXpages(1);

System.out.println("Reading file "+fileName);
BufferedReader in = null;
try {
in = new BufferedReader(
new InputStreamReader(
new FileInputStream(fileName)));

/*int x=-214;
byte[] a = Interpretator.DecToBin(x,32);
for(int i=0;i<a.length;i++){
System.out.print(a[i]);
}
x = Interpretator.BinToDec(a);
System.out.println("");
System.out.println(x);*/

GUI window = new GUI(in);
window.start();
} catch (FileNotFoundException e) {
System.err.println("File "+fileName+" not found");
} finally{
try{
if(in!=null)
in.close();
}catch(Exception e){}
}
}
}
}
Соседние файлы в папке GUI