title: Inline Assembly - Display a register in decimal using printf?
body: <p>I just had a really quick question that I saw someone mention something about in another question, but I didn't want to necro-post on it.</p>
  
  <p>I'm coding in inline assembly with c++, and need to display a register value in decimal. I was searching ways to do this, and saw someone mention "If you're using inline c, just call printf." But they didn't go much further into explanation on it than that.</p>
  
  <p>Is it possible the call printf can be used to get a register value in decimal format without needing to write a conversion section of the code? And if so, how would that work? Say after some computations to a user entered integer, the value now lies in the AX register. Would I simply put call printf in the code after it? Or does it print values from the stack? Or is it maybe even possible to do something like: </p>
  
  <pre><code>AX printf
  </code></pre>
  
  <p>I apologize for my ignorance on this, our book does not cover inline assembly, and I'd like to avoid having to write a massive segment of code to convert if I can. Plus I can't really seem to find answers on how exactly printf works. Thank you for any help, I really appreciate it!</p>