正文

汇编语言实现二叉树的存储和遍历(三)2005-08-17 17:09:00

【评论】 【打印】 【字体: 】 本文链接:http://blog.pfan.cn/hofy/3881.html

分享到:

;--------------------------------------------------------- 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

阅读(2871) | 评论(0)


版权声明:编程爱好者网站为此博客服务提供商,如本文牵涉到版权问题,编程爱好者网站不承担相关责任,如有版权问题请直接与本文作者联系解决。谢谢!

评论

暂无评论
您需要登录后才能评论,请 登录 或者 注册