title: How many bytes do RESB, RESW, RESD, RESQ allocate in NASM?
body: <p><code>DB</code> allocates in chunks of 1 byte.</p>
  
  <p><code>DW</code> allocates in chunks of 2 bytes.</p>
  
  <p><code>DD</code> allocates in chunks of 4 bytes.</p>
  
  <p><code>DQ</code> allocates in chunks of 8 bytes.</p>
  
  <p>So I assume that:</p>
  
  <p><code>RESB 1</code> allocates 1 byte.</p>
  
  <p><code>RESW 1</code> allocates 2 bytes.</p>
  
  <p><code>RESD 1</code> allocates 4 bytes.</p>
  
  <p><code>RESQ 1</code> allocates 8 bytes.</p>
  
  <p>Am I correct?</p>
  
  <hr>
  
  <p>The <a href="http://www.nasm.us/xdoc/2.11.06/html/nasmdoc3.html#section-3.2.2" rel="noreferrer">documentation</a> doesn't say much:</p>
  
  <blockquote>
    <p>3.2.2 RESB and Friends: Declaring Uninitialized Data</p>
    
    <p>RESB, RESW, RESD, RESQ, REST, RESO, RESY and RESZ are designed to be
    used in the BSS section of a module: they declare uninitialized
    storage space. Each takes a single operand, which is the number of
    bytes, words, doublewords or whatever to reserve. As stated in section
    2.2.7, NASM does not support the MASM/TASM syntax of reserving uninitialized space by writing DW ? or similar things: this is what it
    does instead. The operand to a RESB-type pseudo-instruction is a
    critical expression: see section 3.8.</p>
    
    <p>For example:</p>
    
    <p>buffer:         resb    64              ; reserve 64 bytes </p>
    
    <p>wordvar:        resw    1               ; reserve a word </p>
    
    <p>realarray       resq    10              ; array of ten reals </p>
    
    <p>ymmval:         resy    1               ; one YMM register </p>
    
    <p>zmmvals:        resz    32              ; 32 ZMM registers</p>
  </blockquote>