Linking Assembler Module

Posted on 2006-04-28
Last Modified: 2013-11-20
Can anybody tell me how to link some assembler code into my MFC application?  I think I need to convert it into object code first, how do I do that?  Many thanks in advance.
Question by:reidy_boy
    LVL 22

    Assisted Solution

    Refer this :

    Other way :
    You need to manually (for each assembler source file) add a file to your project, then alter the custom build project settings for that file.


    In the commands section:
    c:\masm611\bin\ml /nologo /c /coff $(InputName).asm

    the /c tells masm to compile, but not link.
    the /coff tells masm to output in COFF object format.

    In the output section:

    LVL 22

    Expert Comment

    Also refer this to compile and link ASM file :  <=======

    LVL 43

    Accepted Solution

    Also look at the _asm keyword in help.

    ... c code here
    __asm {
       mov al, 2
       mov dx, 0xD007
       out dx, al
    ... and more c code

    that compiles a small block of assembler inside a C/C++ function

    Featured Post

    Enabling OSINT in Activity Based Intelligence

    Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

    Join & Write a Comment

    Suggested Solutions

    Introduction: Ownerdraw of the grid button.  A singleton class implentation and usage. Continuing from the fifth article about sudoku.   Open the project in visual studio. Go to the class view – CGridButton should be visible as a class.  R…
    Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
    This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
    This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

    745 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

    16 Experts available now in Live!

    Get 1:1 Help Now