Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7787521
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T20:41:57+00:00 2026-06-01T20:41:57+00:00

Just reading in a C++ book that you can literally drop assembler into C++

  • 0

Just reading in a C++ book that you can literally drop assembler into C++ by just using the asm keyword.

Does this mean, if one wanted to use Visual Studio to write assembler I could simply create a C++ main method and then drop assembler into that and execute it as a C++ program? The compiler would simply run the assembler-embedded C++ as if it was only an assembler program?

My question originates from a lack of a decent IDE for Assembler.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T20:41:59+00:00Added an answer on June 1, 2026 at 8:41 pm

    When you use a C++ compiler, it will add extra code to your program that is not in int main(). If you ever decompile a simple hello world program, you will notice it begins execution far before int main(), calling a few functions such as _set_app_type and _getmainargs and then eventually calls your int main(). The most interesting thing to you would probably be the call to _getmainargs as it gets the command line arguments for your program. If you were to compile your assembly with an assembler such as NASM, FASM or even GAS, it would not make calls to _getmainargs and others so you as a programmer would have to implement your own way to get command line arguments which can be tricky for beginners.

    As long as you specify your __asm with the volatile keyword, the compiler should not tinker with your assembly code and it will run (that specific code) as if it was an ”
    Assembler program”.

    If you are looking for an IDE for assembly, I can tell you I have been down the same path. I use FASM which is a great little IDE but there are plugins for Eclipse and even Visual Studio though I can’t say I have had good experiences with them.

    Edit: I’d like to add that if you are learning assembly, you are probably better off learning it with an assembler. The common uses of assembly are used when C++ or a higher language cannot be, therefore if you become dependent on a C++ compiler and inline assembly syntax it could likely cause confusion when you try to write raw assembly.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Just came across this quote in a book on OOP that I'm reading, A
I just finished reading a book on scala. What strikes me is that every
I was just reading this thread and it occurred to me that there is
I am reading a C book that deals a lot with asm and looking
From reading parts of the Programming in Scala book, I realize that Scala can
I am reading a book about Java and it says that you can declare
I'm studying Enterprise Patterns and I'm reading this book . I just read chapter
I'm reading a book about java. It just got to explaining how you create
Just now, I'm reading Josuttis' STL book. As far as I know -- c++
I was just reading through Learning Python by Mark Lutz and came across this

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.