;--------------------------------------------------------- Inroot proc near ;the procedure of input root start2:push ax push dx CMP CX,186 jz quit mov [si],al call leftchild call rightchild pop ax pop dx ret quit: mov ax,0900h mov dx,offset hey9 int 21h jmp exit1 Inroot endp ;----------------------------------------------------------------leftchild proc near ;input the left child start3:push ax push dx push bx mov bx,offset hey3 call prompt mov ax,0100h int 21h cmp al,0dh jz right add byte ptr [si+1],1 push si mov si,offset binary add si,cx add cx,3 call inroot pop si right: pop bx pop dx pop ax ret leftchild endp ;------------------------------------------------------------------ rightchild proc near ; input the right child start4:push ax push dx push bx mov bx,offset hey4 call prompt mov ax,0100h int 21h cmp al,0dh jz left add byte ptr[si+2],1 push si mov si,offset binary add si,cx add cx,3 call inroot pop si left: sub si,3 pop bx ;return si pop dx pop ax ret rightchild endp

评论