 <p>This one works fine:</p> <pre><code>; 0_9.asm ; assemble with "nasm -f bin -o 0_9.com 0_9.asm" org 0x100 ; .com files always start 256 bytes into the segment mov cx, 9 ; counter mov dl, "0" ; 0 top: push dx push cx mov ah, 2 int 21h mov dl, "_" ; display underscore mov ah, 2 int 21h pop cx pop dx inc dl loop top mov dl, "9" ; display 9 mov ah, 2 int 21h mov ah, 4ch ; "terminate program" sub-function mov al,00h int 21h </code></pre>