当前位置: 网学 > 编程文档 > 汇编语言 > 正文

汇编语言实现二叉树的存储和遍历

来源:Http://myeducs.cn 联系QQ:点击这里给我发消息 作者: 用户投稿 来源: 网络 发布时间: 12/10/18
下载{$ArticleTitle}原创论文样式
endp
;-------------------------------------------------------------------------------------------------------------------------------------------
lastrl proc near
start12:push ax
push dx
cmp byte ptr[si+1],0
jz exit4
push si
mov si,offset binary
add si,cx
add cx,3
call lastr
pop si
exit4: pop dx
pop ax
ret
lastrl endp
;--------------------------------------------------------------------------------------------------------------------------------------------
lastrr proc near
start13:push ax
push dx
cmp byte ptr[si+2],0
jz exit5
push si
mov si,offset binary
add si,cx
add cx,3
call lastr
pop si
exit5: pop dx
pop ax
ret
lastrr endp
end main

prompt proc near ;give the prompt information
start5:push ax
push dx
mov ax,0900h
mov dx,offset hey2
int 21h
mov ax,0200h
mov dl,[si]
int 21h
mov ax,0900h
mov dx,bx
int 21h
pop dx
pop ax
ret
prompt endp
;---------------------------------------------------------------------------------------------------------------------------------------------
firstr proc near ;the traversing of first root
push ax
push dx
mov dx,offset hey5
mov ax,0900h
int 21h
mov si,offset binary
start6:mov dl,[si]
mov ax,0200h
int 21h
add si,3
cmp byte ptr[si],0
jz re
jmp start6
re: pop dx
pop ax
ret
firstr endp
;--------------------------------------------------------------------------------------------------------------------------------------------
midr proc near
start7:push ax
push dx
call midrl
mov ax,0200h
mov dl,[si]
int 21h
call midrr
pop dx
pop ax
ret
midr endp
;-----------------------------------------------------------------------------------------------------------------------------------------
midrl proc near
start9:push ax
push dx
cmp byte ptr[si+1],0
jz exit2
push si
mov si,offset binary
add si,cx
add cx,3
call midr
pop si
exit2: pop dx
pop ax
ret
midrl endp
 

  • 上一篇资讯: D/A、A/D闭环测试
  • 下一篇资讯: masm32新手指南
  • 网学推荐

    免费论文

    原创论文

    浏览:
    设为首页 | 加入收藏 | 论文首页 | 论文专题 | 设计下载 | 网学软件 | 论文模板 | 论文资源 | 程序设计 | 关于网学 | 站内搜索 | 网学留言 | 友情链接 | 资料中心
    版权所有 QQ:3710167 邮箱:3710167@qq.com 网学网 [Myeducs.cn] 您电脑的分辨率是 像素
    Copyright 2008-2015 myeducs.Cn www.myeducs.Cn All Rights Reserved
    湘ICP备09003080号