View previous topic :: View next topic
|
Author |
Message |
isnehil Warnings : 1 New User
Joined: 10 Oct 2007 Posts: 23 Location: mumbai
|
|
|
|
Hi friends,
I required information on
How to write a program that writes a creates for a pseudo-code a given assembler program ? I am trying the same in REXX.
And is it possible to write in any other language as well?
Also, Is there any tool that could provide me the flow of an assembler program? |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
write a program that writes a creates for a pseudo-code a given assembler program |
You need to clarify what this means. There have been no replies as people who read your topic probably do not understand what you are asking.
Quote: |
I am trying the same in REXX. |
What are you trying - provide a description.
Quote: |
And is it possible to write in any other language as well? |
Probably. Among other possibilities, there is assembler which will do pretty much anything.
Once someone has an understanding of your requirement, they may be able to make a suggestion. |
|
Back to top |
|
|
Bill Dennis
Active Member
Joined: 17 Aug 2007 Posts: 562 Location: Iowa, USA
|
|
|
|
Do you want a program that will read Assembler code and create text such as
Code: |
COMPARE A TO B
IF A IS LESS GOTO CHECK
IF A IS MORE GOTO REFUND
etc.
|
|
|
Back to top |
|
|
isnehil Warnings : 1 New User
Joined: 10 Oct 2007 Posts: 23 Location: mumbai
|
|
|
|
Hi,
I want to create a tool which can help people analyse an assembly code.
The output could pretty much be as shown by bill. I have to decide the languages eg REXX/Cobol, etc. which could be used to create such a tool.
Please suggest out of your experience & understanding, the name & feasibility of the languages you name. Your inputs in thi context would be valuable.
Thanks,
Snehil |
|
Back to top |
|
|
isnehil Warnings : 1 New User
Joined: 10 Oct 2007 Posts: 23 Location: mumbai
|
|
|
|
This tool has to be created to reduce the time people spend on analysing assembly programs & help them understand the assembly program.
The functionality should basically help in reverse engineering purposes.
Thanks. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
Good luck implementing this "tool" - it will be a substantial undertaking. Your code will have to be able to do pretty much everything the assembly process does and instead of reducing the source to object, it will need to expand it to english-like pseudo-code.
In the past, my teams have had success mapping the functions within an assembler module - the individual lines of code are not so important, but rather what does each piece of code in the module accomplish? Once the specs for the small pieces of the whole module are understood, re-coding in some other language is not difficult.
Places that tried to convert line-by-line from assembler to cobol had a lot of problems because the assembler will not convert 1-for-1 to cobol and people got caught trying to "force" the code.
Long ago, there were some commercial products that would convert assembler to cobol, but the generated cobol was horrendous. It might compile, but it was nearly impossible to maintain. I've not looked for anything like this for many years. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10886 Location: italy
|
|
|
|
hi Dick,
the gentleman has two topics on the same subject,
and I started replying to the other one and PMed the guy
and I deleted a third one
I will cut and paste my reply from the other topic and delete it |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10886 Location: italy
|
|
|
|
here is my post moved from the other topic with the question asked there
Quote: |
Hi all,
I want to develop a tool which can analyse an assembler program and create a pseuodo code from it.
Can anyone suggest me, which languages eg. REXX,COBOL, etc can be used for the same. ie. which languages are feasible to create a tool such as this.
This is a R&D type of a task., wherein it is in its kickoff stage.
Please give the valuable inputs from your experience & understanding.
Thanks,
~ Snehil
|
You already asked,
asking again will not provide more replies...
but before I spend more time on Your question
first let me ask a serious question ....
do You have any experience in compiler construction techniques and tools ??
remember also that answering is on
voluntary effort
time availability
knowledge
also make Your management aware that if the project is mission critical
there are companies which provide such tools,
and an evaluation should be carried on about buy vs. develop costs
- if Your organization mission is not compiler or language transformation tools development
buy would seem a more viable alternative
to give a bit of visibility to the research part
did You try googling for assembler reengineering |
|
Back to top |
|
|
isnehil Warnings : 1 New User
Joined: 10 Oct 2007 Posts: 23 Location: mumbai
|
|
|
|
Hi,
Thanks Dick for your feedback. Yes, the real challenge here is to figure out a way to make the program understand "pieces of code" of the assembly program. Which languages did your team use to amalyse the code line by line? ...please share...
Yes, my organisation is aware of commercial tools for assembler re-engineering, but wants to develop one of its own. (My manager has asked me to do this task)
Thanks Enrico, for your suggestion. No, I do not have any experience in compiler construction techniques and tools. It would be so nice of you if you could direct me to a proper source where I can learn the essential knowledge regarding compiler contruction techniques & tools. Your feedback on this matter would be valuable. The project is not mission critical. I had suggested my managers to buy such re-eingineering tools, but they do not want to buy it .... dunno y....
"remember also that answering is on
voluntary effort
time availability
knowledge "
I respect the time people spend on answering to queries such as mine & sharing their knowledge...Thnks 4 being patient with me..
I apologize for multiple thread creation. The other thread was posted by one of my team mates using my ID, without my knowledge.
Have a nice time...
~ Snehil |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10886 Location: italy
|
|
|
|
It will take a bit of time,
but I will try to give You ( innocent victim )
an Your dummy organization a few references |
|
Back to top |
|
|
isnehil Warnings : 1 New User
Joined: 10 Oct 2007 Posts: 23 Location: mumbai
|
|
|
|
Thanks Enrico... waiting for your reply... |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello Snehil,
Quote: |
Which languages did your team use to amalyse the code line by line? ...please share... |
We did it by hand (for multiple systems). What we found out was that in an entire large application many things are repeated many times. Things like standard linkage instructions, file definitions, report headers, arrays (for lookup or accumulation) and the like need only be re-worked once. One goal was to make the process more science than art.
We made copies of each module and added comments to the various parts of the code describing what that piece of code was doing. We then created a new COBOL program from several standard skeleton programs and re-coded the business logic. |
|
Back to top |
|
|
isnehil Warnings : 1 New User
Joined: 10 Oct 2007 Posts: 23 Location: mumbai
|
|
|
|
Hi dick,
Thanks for sharing this info with me... |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10886 Location: italy
|
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10886 Location: italy
|
|
Back to top |
|
|
|