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

  • SEARCH
  • Home
  • 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 7562669
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T13:28:02+00:00 2026-05-30T13:28:02+00:00

I have this c++ code: #include <iostream> using namespace std; int main () {

  • 0

I have this c++ code:

#include <iostream>
using namespace std;

int main () {

  char chr[] = "111111111111";
  int pop = 9999;
  cout << chr << (pop+1) << endl;

}

when I do in the shell (64 bit linux) g++ -S hello.cpp I get assembly code :

when I use on it nasm hello.s it says it contains a lot of errors such as:

instruction needed
expression syntax error
symbol `popq' redefined

maybe it is because it is 64bit? how can I compile the .s I created with the g++?

  • 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-05-30T13:28:03+00:00Added an answer on May 30, 2026 at 1:28 pm

    The assembler generated by GCC is using what is known as AT&T syntax, which differs from the Intel-syntax used by nasm. You have to use the GCC assembler (as) to compile GCC generated assembler files.

    See e.g. http://en.wikipedia.org/wiki/GNU_Assembler#Criticism.

    For more information about the GNU assembler syntax, see http://en.wikibooks.org/wiki/X86_Assembly/GAS_Syntax.

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

Sidebar

Related Questions

I have this code #include <iostream> using namespace std; int main(int argc,char **argv) {
I have this simple code: #include <iostream> #include <fstream> using namespace std; int main(void)
I have this code main.cpp #include <iostream> #include functs.h using namespace std; int main()
Have a look at this code: #include <iostream> using namespace std; int main() {
I have this code #include <iostream> using namespace std; class Test{ public: int a;
I have this C++ code: #include <iostream> using namespace std; struct MyItem { int
I have this code from programming pearls #include <iostream> //#include <string> using namespace std;
I have a the following code: #include <iostream> using namespace std; void func(char *
I have this code: #include <iostream> using namespace std; class FooA { public: virtual
I have the following code #include <iostream> #include <vector> using namespace std; int distance(vector<int>&

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.