NASM - The Netwide Assembler
NASM Forum => Programming with NASM => Topic started by: ravi0807 on June 03, 2014, 11:35:35 AM
-
I want to make NASM ide......so that students can easly write programs with indentation and debugging mode.
could you guyz suggest which else features should be there in our ide.
which language will be best to develop ide?
I have decided , making in Java so that it can be platform independent and using API may make r job easy....
I am working with my friend Amit
i request u all to give your suggestion. :)
-
.
-
hi ravi0807, I think that it would be nice if your IDE had identifiers highlight as IDA has(when you double click on var or proc name it highlights other instances of it in the code). Also autocomplete as gVim has - when you start typing something and press ctrl+n it suggest possible complition based on previous typed words.
-
I will surely try this thing.
Till know our GUI is ready....
Could any1 plzz tell me how to call nasm compiler from java.....I am totall clueless :(
-
Runtime.getRuntime().exec("cmd /c dir");
-
private void compile(File file)
{
try {
String fullName=file.getName();
String name;
int index=file.getName().lastIndexOf('.');
if(index>0 && index<=file.getName().length()-2)
name=file.getName().substring(0, index);
else
name=file.getName();
//*********************************
String dir1=file.getParent();
//************************************************************
//This part is not working properly .....nly terminal is opened
String[] command = new String[4];
command[0] = "xterm";
command[1] = "-c";
command[2] = " cd " + dir1 +"; -e ";
command[3]="nasm elf -l "+ fullName
//********************************************************************
Process p = Runtime.getRuntime().exec(command);
BufferedReader reader = new BufferedReader(new InputStreamReader(p.getInputStream()));
String line = reader.readLine();
while (line != null) {
System.out.println(line);
line = reader.readLine();
}
BufferedReader stdInput = new BufferedReader(new InputStreamReader(p.getInputStream()));
BufferedReader stdError = new BufferedReader(new InputStreamReader(p.getErrorStream()));
String Error;
while ((Error = stdError.readLine()) != null) {
System.out.println(Error);
}
while ((Error = stdInput.readLine()) != null) {
System.out.println(Error);
}
} catch (Exception e) {
e.printStackTrace();
}
}
this is my function to call nasm compiler.....
1st i opened terminal den pass nasm command as string....
error!!!
terminal can be easly opened but nasm command which i passed doesn't work........
suggest me to improve my solution......if there is any other better method then plz guide me
-
"nasm -f elf" rather than "nasm elf"?
Best,
Frank