What are the sizes of tword
, oword
and yword
operands, as used in the NASM/YASM manual? And on a related note, is there a trick or underlying idea to these names? Is there a way by which bigger word sizes are given logical names?
I know that while word sizes may differ between systems, a NASM word
is 2 bytes, dword
is double that (4 bytes), qword
is a quad word (8 bytes), but... is tword
a triple word (6 bytes)? And for oword
and yword
I can't even think of a plausible meaning.
Note that it is probably an easy question, but I couldn't find an answer. In the NASM and YASM manuals these sizes are not explained, not even at the DQ
, DT
, DY
, RESQ
, REST
, RESY
pseudo-instructions. I read somewhere that MASM uses a similar system, but could not find anything on that either.
Edit: Based on the answers, this is the complete list:
- 1 byte (8 bit):
byte
,DB
,RESB
- 2 bytes (16 bit):
word
,DW
,RESW
- 4 bytes (32 bit):
dword
,DD
,RESD
- 8 bytes (64 bit):
qword
,DQ
,RESQ
- 10 bytes (80 bit):
tword
,DT
,REST
- 16 bytes (128 bit):
oword
,DO
,RESO
,DDQ
,RESDQ
- 32 bytes (256 bit):
yword
,DY
,RESY
- 64 bytes (512 bit):
zword
,DZ
,RESZ
I have checked it with two approaches for NASM: source code and empirical.
Source code
Source at: http://repo.or.cz/w/nasm.git
Then:
And we fall upon:
Empirical
git log -p
andgit tag --contains
tell me thatzword
was added in 2.11, and since I'm on 2.10 and lazy, I'll omit that one.On our
.asm
file:Then compile and:
gives:
If we take the differences between each position, we reach the same conclusion as before.
zword menemonic
For the
ZMM
registers added by AVX-512: https://en.wikipedia.org/wiki/AVX-512I wonder what Intel will do when the letters of the alphabet end.
Looking at TFS, it looks like:
So, not exactly a logical naming convention.