Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Function 0Ah expects the buffer address in DS:DX, your code only sets up BX, never DX.</p> <p>Here's how I type the code in: </p> <pre><code>C:\&gt;debug -a 100 13DB:0100 mov bx, 200 13DB:0103 mov byte [bx], 33 13DB:0106 mov ah, 0a 13DB:0108 mov dx, bx 13DB:010A int 21 13DB:010C </code></pre> <p>Here's what I get: </p> <pre><code>-u 100 13DB:0100 BB0002 MOV BX,0200 13DB:0103 C60733 MOV BYTE PTR [BX],33 13DB:0106 B40A MOV AH,0A 13DB:0108 89DA MOV DX,BX 13DB:010A CD21 INT 21 </code></pre> <p>Here's what's in the registers:</p> <pre><code>-r AX=0000 BX=0000 CX=0000 DX=0000 SP=FFEE BP=0000 SI=0000 DI=0000 DS=13DB ES=13DB SS=13DB CS=13DB IP=0100 NV UP EI PL NZ NA PO NC 13DB:0100 BB0002 MOV BX,0200 </code></pre> <p>Next I just use the "proceed" command to execute the code instruction by instruction:</p> <pre><code>AX=0000 BX=0000 CX=0000 DX=0000 SP=FFEE BP=0000 SI=0000 DI=0000 DS=13DB ES=13DB SS=13DB CS=13DB IP=0100 NV UP EI PL NZ NA PO NC 13DB:0100 BB0002 MOV BX,0200 -p AX=0000 BX=0200 CX=0000 DX=0000 SP=FFEE BP=0000 SI=0000 DI=0000 DS=13DB ES=13DB SS=13DB CS=13DB IP=0103 NV UP EI PL NZ NA PO NC 13DB:0103 C60733 MOV BYTE PTR [BX],33 DS:0200=33 -p AX=0000 BX=0200 CX=0000 DX=0000 SP=FFEE BP=0000 SI=0000 DI=0000 DS=13DB ES=13DB SS=13DB CS=13DB IP=0106 NV UP EI PL NZ NA PO NC 13DB:0106 B40A MOV AH,0A -p AX=0A00 BX=0200 CX=0000 DX=0000 SP=FFEE BP=0000 SI=0000 DI=0000 DS=13DB ES=13DB SS=13DB CS=13DB IP=0108 NV UP EI PL NZ NA PO NC 13DB:0108 89DA MOV DX,BX -p AX=0A00 BX=0200 CX=0000 DX=0200 SP=FFEE BP=0000 SI=0000 DI=0000 DS=13DB ES=13DB SS=13DB CS=13DB IP=010A NV UP EI PL NZ NA PO NC 13DB:010A CD21 INT 21 -p </code></pre> <p>Then type in "QWE" followed by enter:</p> <pre><code>QWE AX=0A0D BX=0200 CX=0000 DX=0200 SP=FFEE BP=0000 SI=0000 DI=0000 DS=13DB ES=13DB SS=13DB CS=13DB IP=010C NV UP EI PL NZ NA PO NC 13DB:010C 0000 ADD [BX+SI],AL DS:0200=33 - </code></pre> <p>Done. And here it is in the memory:</p> <pre><code>-d 200 13DB:0200 33 03 51 57 45 0D 00 00-00 00 00 00 00 00 00 00 3.QWE........... 13DB:0210 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................ 13DB:0220 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................ </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload