title: Printing bits of a byte
body: <p>I am using "lahf" to store the flags in ah. I would like to output these values (1s and 0s) to see my flags, but I have no idea how. My Holder label in the code below outputs a decimal, is there a way to output a binary number instead? or should I go about this in a different way? </p>
  
  <pre><code>lahf                 ;moves flags to ah
  mov [flagg], ah      ;moves flags to label "flagg" in .bss (reserved 1 dword)
  
  
  ;later on...
  mov eax,[flagg]      ;moves the flag values into eax
  push eax             ;pushes eax onto stack
  push Holder          ;Holder is a label in .data ( "%d",0 )
  call printf          ;prints to screen
  add esp, 8
  </code></pre>