Question:

C++ to Assembly and/or Java to Assembly program?

by  |  earlier

0 LIKES UnLike

Yeah, I was wondering if there are any programs out there that convert C++ or Java to Assembly, so I can port it to an PIC16F628A for standalone computing operations. I'm using it for a saftey system for a HHO generator i'm developing, and it needs to see if the analog voltage is higher then a pre-set value, so it can shut off power, and seal the tank off. That way, if there is a fire, or too much preasure is building up(it wouldn't seal the unit in this case) it can shut a solenoid and cut the power.

 Tags:

   Report

2 ANSWERS


  1. If you're using MS Dev Studio, you can simply debug the program and look at the Dissasembly window.  This shows you the code as MASM source (though I doubt if it works for Java).

    Bear in mind, it can't resolve unlabelled jumps.  If you put a while loop, there isn't a label to jump to if when it goes back to the start of the loop, it puts the offset instead.  On the plus side, the debugger tracks the source and the dissasembly at the same time, so you can see what assembly relates to which line of code.

    I'm sure there will be all lots of other dissasemblers, this is just the simplest way I can think of doing it.

    I don't know what a PIC16F628A is.  It does have the same instruction set as an Intel 80x86, dosen't it?  Otherwise, you're not going to get far with this idea.


  2. I believe you have to redo the code in Java.... I dont think there is a real way to change out C++ to Java due to the libraries needed and the different styles of algorithm.

Question Stats

Latest activity: earlier.
This question has 2 answers.

BECOME A GUIDE

Share your knowledge and help people by answering questions.