Solved

386 assembler C or C++ source code needed

Posted on 2002-07-08
4
229 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Windows programmers of the C/C++ variety, how many of you realise that since Window 9x Microsoft has been lying to you about what constitutes Unicode (http://en.wikipedia.org/wiki/Unicode)? They will have you believe that Unicode requires you to use…
Examines three attack vectors, specifically, the different types of malware used in malicious attacks, web application attacks, and finally, network based attacks.  Concludes by examining the means of securing and protecting critical systems and inf…
The goal of this video is to provide viewers with basic examples to understand recursion 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.

736 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