.model small
.stack 100h

xor cx, cx

mov ah, 1h
int 21h

cmp al, 0dh
je @end
push ax
inc cx
jmp @loop

mov ah, 2h
pop ax
int 21h
loop dis

mov ah, 4ch
int 21h

end start

The first thing you should understand is how commands group together.
Certain values are set and then an interrupt is issued.
When that happens, an effect takes place.


So, if you look at your first grouped "command", you see AH is being set to 1 and in interrupt 21 is then issued.

If you look at that reference for 21h, what do you see happens if AH is set at 1 and that interrupt is issued?

Once you learn that, you can learn anything dealing with this.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.