Computing.Net > Forums > Programming > From high-level to low-level

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

From high-level to low-level

Reply to Message Icon

Name: alphonso
Date: December 8, 2005 at 06:05:30 Pacific
OS: Win 98
CPU/Ram: 128+
Comment:

Hi. I was just wondering if I could ask someone from here to translate a code from C/C++ down to the low level, TASM (Task ASseMbler). Um, the code will be posted here in a day or two, but what I really need is a volunteer to translate it for me. Is anyone available? I don't really know much about this TASM thing.



Sponsored Link
Ads by Google

Response Number 1
Name: Stephen Hall
Date: December 10, 2005 at 10:57:37 Pacific
Reply:

Alphonso,

As long as the code is not too much, I'd love to at least see it. Volunteering without knowing what is entailed is not something I'm interested in doing, but if it's not too much, I might be able to help out.
Couple of questions: why do you need it in ASM? C/C++ would work just fine for most things and will get compiled into ASM on its way to raw machine language. Second, are you wanting exactly the same results you're getting in C? If so, you can compile the C into an OBJ file and then disassemble. If you don't have a disassembler in your package (TASM might do that, I'm not sure), you can download OpenWatcom (www.openwatcom.org) and compile the C/C++ code in it and then disassemble. OpenWatcom also comes with its own assembler (WASM).
All in all, assembly is fun, but it's a lot of work. It would really help to know exactly why you need it in assembly since this kind of dictates how the translation should be directed. Think of C/C++ as a general (high-level) way of talking and a translation to ASM as a more specific (low-level) way of saying the same thing. As is normal with lower-level interpretations of higher-level thought (and ASM is no exception), there are sometimes _many_ different ways to produce the same results in ASM. The context will determine which one should be used.

Give me a good cause and a small code piece, and I'll see if I'm up to it. If this is just to translate something for no real purpose, then I'd say leave it in C/C++.

Stephen

"Live long and PROGRAM......or at least do _something_ with all that time...!"


0

Response Number 2
Name: elric
Date: January 9, 2006 at 05:24:39 Pacific
Reply:

G'day,

Just a thought: some compliers (ie Borland Turbo C ) have a switch (/s??) that will produce an assembly language file (asm or lst ) so that you can decide how "tight" the code is.
Try running your C code thru a compliler with such an option.
regards,
Elric


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More


Access-read only but allo... Converting html to pdf



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: From high-level to low-level

high level/low level programming www.computing.net/answers/programming/high-levellow-level-programming/1636.html

pinging a server from java www.computing.net/answers/programming/pinging-a-server-from-java/12350.html

change from windows 2000 to XP www.computing.net/answers/programming/change-from-windows-2000-to-xp/17802.html