Author Topic: make ide  (Read 3342 times)

Offline ravi0807

  • Jr. Member
  • *
  • Posts: 9
make ide
« 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. :)

Offline ravi0807

  • Jr. Member
  • *
  • Posts: 9
IDE 4 NASM
« Reply #1 on: June 03, 2014, 11:36:34 AM »
.

Offline nullptr

  • Jr. Member
  • *
  • Posts: 27
Re: make ide
« Reply #2 on: June 03, 2014, 07:29:51 PM »
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.

Offline ravi0807

  • Jr. Member
  • *
  • Posts: 9
Re: make ide
« Reply #3 on: June 05, 2014, 01:33:05 PM »
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 :(

Offline gammac

  • Jr. Member
  • *
  • Posts: 71
  • Country: 00
Re: make ide
« Reply #4 on: June 05, 2014, 08:34:41 PM »
Runtime.getRuntime().exec("cmd /c dir");
Please comment your code! It helps to help you.

Offline ravi0807

  • Jr. Member
  • *
  • Posts: 9
Re: make ide
« Reply #5 on: June 09, 2014, 09:24:10 AM »
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
« Last Edit: June 09, 2014, 09:26:24 AM by ravi0807 »

Offline Frank Kotler

  • NASM Developer
  • Hero Member
  • *****
  • Posts: 2436
  • Country: us
Re: make ide
« Reply #6 on: June 09, 2014, 10:19:55 AM »
"nasm -f elf" rather than "nasm elf"?

Best,
Frank