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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T03:05:36+00:00 2026-05-16T03:05:36+00:00

How can I prepend a SS: or ES: using AT&T Assembly Syntax without adding

  • 0

How can I prepend a SS: or ES: using AT&T Assembly Syntax without adding in a .byte 0x36 or .byte 0x26?

ie. How would I be able to convert mov dword ptr ss:[esp+0x10], offset foo from Intel syntax to AT&T without using:

.byte   0x36
movl    $foo, 0x10(%esp)

I have tried movl $foo, %ss:0x10(%esp) which assembles without warnings but, looking through the binary, still does not add in SS:

  • 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-16T03:05:37+00:00Added an answer on May 16, 2026 at 3:05 am

    An SS: prefix is not required when used with the ESP and EBP registers. For those registers as a base, ss is already the default segment.

    This might be the reason why the assembler simply omits it to conserve space.

    You don’t want or need an actual SS prefix in the machine code (unless you want to make the instruction longer for alignment / padding reasons). The SS: in the Intel-syntax disassembly is just there to remind you of the default segment implied by the addressing mode.

    If for some strange reason you do want a redundant SS prefix in the machine code, you could manually emit the SS: prefix with a .byte 0x36 directive. The assembler won’t modify raw bytes.


    Mainstream 32-bit OSes use a flat memory model where all the segment bases are 0 so it doesn’t matter anyway; that’s why you can copy ESP to another register like EAX to get the address of a stack var, and dereference it with (%eax) aka %ds:(%eax) to still address same stack memory. That’s why compilers don’t need to know where a pointer came from, and don’t need to use %ss:(%eax).

    Only FS or GS segment overrides (for thread-local storage) are useful in normal code, if you’re not writing your own OS with a non-flat memory mode.

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

Sidebar

Related Questions

How can I implement prepend and append with regular JavaScript without using jQuery?
i would like to convert xhtml to dokuwiki syntax using xslt . now, one
I can't confirm that this syntax is best practice. I would like to reference
How can I prepend a string, say 'a' stored in the variable $x to
The method ObjectOutputStream.writeStreamHeader() can be overridden to prepend or append data to the header.
Can I authenticate with just Google account username and password instead of using OAuth?
Using Chris's answer on another question I could prepend a snapshot-history to my git
I am creating XML using a while loop, but now I need to prepend
I am using a collection_select field, but need to prepend the options with some
So i have this picker: http://www.filamentgroup.com/lab/date_range_picker_using_jquery_ui_16_and_jquery_ui_css_framework/ Now, how can I prepend the date/daterange you

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.