<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8">
<meta name="generator" content="pdf2htmlEX">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<link rel="stylesheet" href="https://static.pudn.com/base/css/base.min.css">
<link rel="stylesheet" href="https://static.pudn.com/base/css/fancy.min.css">
<link rel="stylesheet" href="https://static.pudn.com/prod/directory_preview_static/628bcd71ce083560b86d11b3/raw.css">
<script src="https://static.pudn.com/base/js/compatibility.min.js"></script>
<script src="https://static.pudn.com/base/js/pdf2htmlEX.min.js"></script>
<script>
try{
pdf2htmlEX.defaultViewer = new pdf2htmlEX.Viewer({});
}catch(e){}
</script>
<title></title>
</head>
<body>
<div id="sidebar" style="display: none">
<div id="outline">
</div>
</div>
<div id="pf1" class="pf w0 h0" data-page-no="1"><div class="pc pc1 w0 h0"><img class="bi x0 y0 w1 h1" alt="" src="https://static.pudn.com/prod/directory_preview_static/628bcd71ce083560b86d11b3/bg1.jpg"><div class="c x0 y1 w2 h2"><div class="t m0 x1 h3 y2 ff1 fs0 fc0 sc0 ls0 ws0">计算机工程系计算机原理实验报告</div><div class="t m0 x2 h4 y3 ff1 fs1 fc0 sc1 ls0 ws0">计算机原理实验室实验报告</div><div class="t m0 x1 h4 y4 ff1 fs1 fc0 sc1 ls0 ws0">课程名称:单片微型计算机原理及应用</div><div class="t m0 x3 h5 y5 ff1 fs2 fc0 sc0 ls0 ws0">姓 名<span class="_ _0"> </span>学 号<span class="_ _1"> </span>班 级<span class="_ _2"> </span>成 绩</div><div class="t m0 x4 h5 y6 ff1 fs2 fc0 sc0 ls0 ws0">设备名称及软件环境<span class="_ _3"> </span><span class="ff2">MedWi<span class="_ _4"></span>n v2.39 <span class="ff1">模拟仿真</span></span></div><div class="t m0 x5 h5 y7 ff1 fs2 fc0 sc0 ls0 ws0">实验名称<span class="_ _5"> </span>排序程序<span class="_ _6"> </span>实验日期</div><div class="t m0 x6 h5 y8 ff1 fs2 fc0 sc0 ls0 ws0">一.实验内容</div><div class="t m0 x6 h5 y9 ff3 fs2 fc0 sc0 ls0 ws0"> <span class="ff1">对内部存储器<span class="_ _7"> </span></span>RAM<span class="_ _7"> </span><span class="ff1">中地址为<span class="_ _7"> </span></span>20H<span class="_ _7"> </span><span class="ff1">开始的六个数据进行由大到小的排序,使用两种方法。</span></div><div class="t m0 x6 h5 ya ff1 fs2 fc0 sc0 ls0 ws0">二.理论分析或算法分析</div><div class="t m0 x6 h5 yb ff3 fs2 fc0 sc0 ls0 ws0"> <span class="ff1">采用的两种排序方法为直接排序和冒泡排序。</span></div><div class="t m0 x6 h5 yc ff1 fs2 fc0 sc0 ls0 ws0">三.实现方法(<span class="fs0">含实现思路、程序流程图、实验电路图和源程序列表等</span>)</div><div class="t m0 x6 h5 yd ff1 fs2 fc0 sc0 ls0 ws0">源程序为:</div><div class="t m0 x6 h5 ye ff3 fs2 fc0 sc0 ls0 ws0"> <span class="ff1">冒泡排序</span></div><div class="t m0 x6 h6 yf ff3 fs2 fc0 sc0 ls0 ws0"> jmp L0</div><div class="t m0 x6 h6 y10 ff3 fs2 fc0 sc0 ls0 ws0"> or<span class="_ _4"></span>g 20h</div><div class="t m0 x6 h6 y11 ff3 fs2 fc0 sc0 ls0 ws0"> dat1: db 22h,21h,10h,13h,1<span class="_ _4"></span>1h,12h</div><div class="t m0 x7 h6 y12 ff3 fs2 fc0 sc0 ls0 ws0">L0:mov r1,#06h</div><div class="t m0 x6 h6 y13 ff3 fs2 fc0 sc0 ls0 ws0"> mov r0,#20h</div><div class="t m0 x6 h6 y14 ff3 fs2 fc0 sc0 ls0 ws0"> mov dptr<span class="_ _4"></span>,#20h</div><div class="t m0 x6 h6 y15 ff3 fs2 fc0 sc0 ls0 ws0"> mov r2,#00h</div><div class="t m0 x7 h6 y16 ff3 fs2 fc0 sc0 ls0 ws0">L1:mov a,r2</div><div class="t m0 x6 h6 y17 ff3 fs2 fc0 sc0 ls0 ws0"> movc a,@a+dptr</div><div class="t m0 x6 h6 y18 ff3 fs2 fc0 sc0 ls0 ws0"> mov @r0,a</div><div class="t m0 x6 h6 y19 ff3 fs2 fc0 sc0 ls0 ws0"> inc r0</div><div class="t m0 x6 h6 y1a ff3 fs2 fc0 sc0 ls0 ws0"> inc r2</div><div class="t m0 x6 h6 y1b ff3 fs2 fc0 sc0 ls0 ws0"> djnz r1,L1</div><div class="t m0 x6 h6 y1c ff3 fs2 fc0 sc0 ls0 ws0"> mov r3,#05h</div><div class="t m0 x6 h6 y1d ff3 fs2 fc0 sc0 ls0 ws0"> mov r4,#00h</div><div class="t m0 x6 h6 y1e ff3 fs2 fc0 sc0 ls0 ws0"> mov r0,#20h</div><div class="t m0 x7 h6 y1f ff3 fs2 fc0 sc0 ls0 ws0">L2:mov a,@r0</div><div class="t m0 x6 h6 y20 ff3 fs2 fc0 sc0 ls0 ws0"> mov r5,a</div><div class="t m0 x6 h6 y21 ff3 fs2 fc0 sc0 ls0 ws0"> inc r0</div><div class="t m0 x6 h6 y22 ff3 fs2 fc0 sc0 ls0 ws0"> mov a,@r0</div><div class="t m0 x6 h6 y23 ff3 fs2 fc0 sc0 ls0 ws0"> subb a,r5</div><div class="t m0 x6 h6 y24 ff3 fs2 fc0 sc0 ls0 ws0"> mov a,@r0</div><div class="t m0 x6 h6 y25 ff3 fs2 fc0 sc0 ls0 ws0"> jnc L3 </div><div class="t m0 x6 h6 y26 ff3 fs2 fc0 sc0 ls0 ws0"> dec r0</div><div class="t m0 x6 h6 y27 ff3 fs2 fc0 sc0 ls0 ws0"> mov @r0,a</div><div class="t m0 x6 h6 y28 ff3 fs2 fc0 sc0 ls0 ws0"> inc r0</div><div class="t m0 x6 h6 y29 ff3 fs2 fc0 sc0 ls0 ws0"> mov a,r5</div></div><div class="t m0 x8 h7 y2a ff3 fs0 fc0 sc0 ls0 ws0">1</div></div><div class="pi" data-data='{"ctm":[1.611850,0.000000,0.000000,1.611850,0.000000,0.000000]}'></div></div>
</body>
</html>