Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

equivalent of "dd" (nasm) in Gnu Assembler

I’d like to know how to translate "dd" from nasm to GAS. I can’t find it anywhere in the manual.

Thanks

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

In NASM, the "dd" pseudo op defines a "double word" (e.g. 4 byte integer):

http://www.tortall.net/projects/yasm/manual/html/nasm-pseudop.html

; Example:
dd      0x12345678          ; 0x78 0x56 0x34 0x12

In Gas, the corresponding directive would typically be ".long":

https://ftp.gnu.org/old-gnu/Manuals/gas-2.9.1/html_chapter/as_7.html

; example:
dimensions:
  .long 0, 0
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading