Search code examples
assemblyx86gnu-assembler

x86 assembly short and long size


I'm writing a little x86 program and I'm surprised about "types" size.

.short are handling 4 bytes values such a .short 0xFFFF and .long 8 bytes, while .bytes are handling 2 bytes.

I can't find an explaination, what I'm doing wrong?


Solution

  • 0xFFFF is two bytes, not four. A single hex digit is four bits (a nybble), and there are eight bits in a byte.