I am new to AT&T syntax (I used to code for NASM) and can't seem to find the equivalent of Intel's DB (Define Byte)
I am trying to OSDev and need to define:
db 0x55
db 0xAA
Asked
Active
Viewed 479 times
-1

old_timer
- 69,149
- 8
- 89
- 168

Ramdomly Random
- 47
- 6
-
1Please refer to the GNU as manual for the directives available. – fuz Jun 05 '21 at 08:07
-
assembly language is specific to the tool not the target. AT&T is a convention and does not cover the details nor differences of the various languages for x86. – old_timer Jun 05 '21 at 18:33
-
@old_timer: In practice there's only one widely-used overall syntax that uses AT&T for instructions, so Unix / GAS directives "go with" AT&T syntax strongly enough that the [att] tag isn't truly wrong for this question. I'm not going to add it back in, but I wouldn't have removed it. I'd expect many novices to search on [att] while looking for a question like this. (I should have removed [bare-metal] when I added [gnu-assembler] though.) Of course there aren't that many GAS directives in the manual, and it's easy to look at gcc output for global `char foo = 123;`. – Peter Cordes Jun 05 '21 at 21:50
-
nothing about the question was related to at&t vs intel. if there had been then it would be a valid tag. – old_timer Jun 05 '21 at 23:58