Solved

386 assembler C or C++ source code needed

Posted on 2002-07-08
4
188 Views
Last Modified: 2010-04-15
I have a C++ program that would benefit by having a built in assembler. By which I mean it would take a string (or file) as input and generate machine code op-codes.

I don't need fancy linkers, it would just generate small segments of executable code, it would need to cope with simple labels (forward and backward references)

Ideally C or C++ source code which could be incorporated into my program.

I have searched for source code to no avail. Oh, it must run on Windows (Linux source code not suitable) using MS C++ compiler.

Thanks
Ian
0
Comment
Question by:icd
  • 3
4 Comments
 
LVL 86

Expert Comment

by:jkr
ID: 7141287
>> by having a built in assembler

Why don't you just run e.g. the GNU assembler 'seamlessly' from your app? This one is also available for Win32 and is OSS, BTW.
0
 
LVL 86

Accepted Solution

by:
jkr earned 200 total points
ID: 7141294
Oh, and there is of course NASM that comes with source code: http://nasm.sourceforge.net/
0
 
LVL 5

Author Comment

by:icd
ID: 7141450
Interestingly I just found the NASM assembler and so far it seems to do what I want. I think I can just bring in the source code modules I need and build them into my application.

I had not thought of the GNU assembler. I will look at it but I don't want to have external exe files if I can help it which I suspect is what you are referring to.

I had just come back here to delete my question, but I see I will have to award you the points now :)
0
 
LVL 86

Expert Comment

by:jkr
ID: 7182920
Thank you! :o)
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

This tutorial is posted by Aaron Wojnowski, administrator at SDKExpert.net.  To view more iPhone tutorials, visit www.sdkexpert.net. This is a very simple tutorial on finding the user's current location easily. In this tutorial, you will learn ho…
Summary: This tutorial covers some basics of pointer, pointer arithmetic and function pointer. What is a pointer: A pointer is a variable which holds an address. This address might be address of another variable/address of devices/address of fu…
The goal of this video is to provide viewers with basic examples to understand opening and writing to files in the C programming language.
The goal of this video is to provide viewers with basic examples to understand how to use strings and some functions related to them in the C programming language.

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

25 Experts available now in Live!

Get 1:1 Help Now