kamkow1
kamkow1

Reputation: 501

equivalent of NASM's "dd" in Gnu Assembler

I'm trying to translate dd from NASM (or MASM) to GAS.
I can't find it anywhere in the manual.

Upvotes: 1

Views: 205

Answers (1)

paulsm4
paulsm4

Reputation: 121649

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
https://nasm.us/doc/nasmdoc3.html#section-3.2

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

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

https://sourceware.org/binutils/docs/as/Long.html

; example:
dimensions:
  .long 0, 0

Upvotes: 5

Related Questions