code segment assume cs:code,ds:code,es:code org 100h start: mov ah,52h int 21h mov ax,es:[bx-02h] ;MCBチェインの最初のセグメント xor cx,cx ;MCBの0パラの場合をにした数 xor bx,bx ;0 mcb: mov es,ax inc ax cmp word ptr es:[bx+3],bx jnz next mov word ptr es:[bx+1],bx inc cx next: add ax,es:[bx+3] cmp byte ptr es:[bx],'M' ;Mなら続きが有る jz mcb xchg ax,cx mov ah,4ch int 21h code ends end start