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 8564967
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T17:18:55+00:00 2026-06-11T17:18:55+00:00

dump of assembler code for function main: 0x0000000100000de6 <main+0>: push %rbp 0x0000000100000de7 <main+1>: mov

  • 0

dump of assembler code for function main:

0x0000000100000de6 <main+0>:    push   %rbp
0x0000000100000de7 <main+1>:    mov    %rsp,%rbp
0x0000000100000dea <main+4>:    sub    $0x30,%rsp
0x0000000100000dee <main+8>:    mov    %edi,-0x14(%rbp)

I learned mov %rsp,%rbp means move the value of rsp to rbp
But I knew in Intel architecture, that would mean move the value of rbp to rsp
According to Intel manual(Intel Architecture Software Developer’s Manual. Volume 2. 3-104 MOV instruction), mov a, b should mean move b to a

Next sub instuction is the same.
I knew sub a,b means a = a-b. But here sub $0x30, %rsp means rsp = rsp - 0x30

What’s wrong with me?

  • 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-11T17:18:57+00:00Added an answer on June 11, 2026 at 5:18 pm

    Nothing’s wrong with you. What you have presented here is assembly code in AT&T syntax (google it up), in which the operand order is the opposite to what you see in the Intel manuals.

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

Sidebar

Related Questions

Dump of assembler code for function main: 0x0804833e <+0>: push %ebp 0x0804833f <+1>: mov
(gdb) disas foo Dump of assembler code for function foo: 0x00000000004004a8 <foo+0>: push %rbp
(gdb) disas /m main Dump of assembler code for function main(): 2 { 0x080483f4
Dump of assembler code for function foo@plt: 0x0000000000400528 <foo@plt+0>: jmpq *0x2004d2(%rip) # 0x600a00 <_GLOBAL_OFFSET_TABLE_+40>
(gdb) disas htons Dump of assembler code for function ntohs: 0x00000037aa4e9470 <ntohs+0>: ror $0x8,%di
So I have the following code segment in x86 assembly: mov $0x0, %eax callq
Below is my code (test.c): #include <stdio.h> #include <string.h> int main(int argc, char **argv)
Through debug,I found that when func called in main , RSP is decreased by
Cannot dump Stack Overflow XML file into SQL Server 2008. Could you please explain
How can I dump all the global variables and the address offsets in my

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.