title: Interruption service in assembler (int 21h) and it's behavior (w/OllyDbg)
body: <p><strong>Hello, fellow programmers!</strong><br/>
  I have a stupid (for your lvl) question:<br/>
  <em>Using &quot;flat assembler&quot; and debugging it using &quot;ollydbg (v2.00.01)&quot;</em><br/></p>
  <p>I have a following code:<br/></p>
  <pre><code>format PE
  
  org    100h
  
  start:
         mov eax, 0    ; clear entire register
         mov edx, 0    ; clear entire register
         
         mov ah,  02h  ; define control character 
         mov dl,  'A'  ; character it needs to print to &quot;standart output&quot; (?)
         int      21h  ; interruption service call
         
         hlt
  </code></pre>
  <p>So, with the code above I have 2 problems:<br/></p>
  <ol>
  <li>OllyDbg says &quot;Access violation when reading [FFFFFFFF]&quot; when it comes to the line with interruption service call.</li>
  <li>I rewrote the code above using <code>mov ah, 05h</code> control character. Still got an error from 1st item.</li>
  </ol>
  <p>It would be kind of you to help me solve this two requirements:</p>
  <ol>
  <li>Understanding the difference between the &quot;standart output&quot; and &quot;default printer&quot;.</li>
  <li>Writing a single character to <em>console(?)</em> without using <code>ds</code> register (and any previously defined data).</li>
  </ol>
  <p><strong>My greatest thanks to everyone, who reply!</strong><br/>
  <br/>
  <strong>Solved by...</strong><br/>
  As it comes out, you cannot use direct call of DOS services from Win32 executable.</p>