提交 46c5cec5 创建 作者: 李川's avatar 李川

Merge branch 'lab1' into 'master'

差异被折叠。
差异被折叠。
......@@ -11,11 +11,6 @@
</filefolder>
<filefolder id="b7132f26-d8eb-4047-9776-662fed73c3d9" name="IO">
<file relativepath="IO\IO.dlsche"/>
<file relativepath="IO\IO_test.dlsche"/>
</filefolder>
<filefolder id="7fa7244b-4e62-4754-8282-a4f68faa0e9f" name="tristate">
<file relativepath="tristate\8tristate.dlsche"/>
<file relativepath="tristate\tristate.dlsche"/>
</filefolder>
<filefolder id="5f9a2128-dfbd-48f9-ab67-84ab8d9626d9" name="8086">
<file relativepath="8086\8086.dlsche"/>
......
;test测试
.text
mov al, 16 ;将立即数16存入al寄存器中
; 0~15号存储单元存放中断向量,即中断向量表
.int_table
UP:
add al, 1 ;al与立即数1相加,结果写回al
cmp al, 20 ;将al减去立即数20,修改运算标志
jne UP ;若零标志为false,则al继续加1,直到al=20
; 代码段 .text 总是从位置 0x10 开始
.text
mov al, 16
add al, num
DOWN:
dec al ;al减1
cmp al, 16 ;al减去立即数16,修改运算标志
jnz DOWN ;若零标志为false,则al继续减1,直到al=16
jmp UP ;零标志为true,跳转到up
; 死循环
end:
jmp end
; 数据段
.data
num: -1
没有这种文件类型的预览
0001 ;test测试
0002 .text
0003 10 01 00 10 mov al, 16 ;将立即数16存入al寄存器中
0004
0005 UP:
0006 13 0E 00 01 add al, 1 ;al与立即数1相加,结果写回al
0007 16 47 00 14 cmp al, 20 ;将al减去立即数20,修改运算标志
0008 19 55 13 jne UP ;若零标志为false,则al继续加1,直到al=20
0009
0010 DOWN:
0011 1B 79 00 dec al ;al减1
0012 1D 47 00 10 cmp al, 16 ;al减去立即数16,修改运算标志
0013 20 55 1B jnz DOWN ;若零标志为false,则al继续减1,直到al=16
0014 22 57 13 jmp UP ;零标志为true,跳转到up
0015
0001 ; 0~15号存储单元存放中断向量,即中断向量表
0002 .int_table
0003
0004 ; 代码段 .text 总是从位置 0x10 开始
0005 .text
0006 10 01 00 10 mov al, 16
0007 13 0C 00 18 add al, num
0008
0009 ; 死循环
0010 end:
0011 16 57 16 jmp end
0012
0013 ; 数据段
0014 .data
0015 18 FF num: -1
0016
0017
0018
没有这种文件类型的预览
差异被折叠。
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<svg height="969" version="1.1" width="1048" xmlns="http://www.w3.org/2000/svg">
<line stroke="#000000" stroke-linecap="round" stroke-width="5" x1="548" x2="488" y1="424" y2="424"/>
<line stroke="#000000" stroke-linecap="round" stroke-width="5" x1="628" x2="688" y1="424" y2="424"/>
<line stroke="#000000" stroke-linecap="round" stroke-width="5" x1="588" x2="588" y1="464" y2="524"/>
<circle cx="588" cy="456" fill="none" r="5" stroke="#000000" stroke-width="5"/>
<polygon fill="#ffffff" fill-opacity="0.5" points="548 374, 548 474, 628 424, 548 374" stroke="#000000" stroke-width="5"/>
<text alignment-baseline="after-edge" fill="#000000" font-family="Arial" font-size="25" font-weight="700" text-anchor="start" x="598" y="344">U1</text>
<text alignment-baseline="after-edge" fill="#000000" font-family="Arial" font-size="25" font-weight="700" text-anchor="start" x="548" y="374">NBUFFER</text>
<line stroke="#000000" stroke-linecap="round" stroke-width="5" x1="548" x2="488" y1="724" y2="724"/>
<line stroke="#000000" stroke-linecap="round" stroke-width="5" x1="628" x2="688" y1="724" y2="724"/>
<line stroke="#000000" stroke-linecap="round" stroke-width="5" x1="588" x2="588" y1="764" y2="824"/>
<circle cx="588" cy="756" fill="none" r="5" stroke="#000000" stroke-width="5"/>
<polygon fill="#ffffff" fill-opacity="0.5" points="548 674, 548 774, 628 724, 548 674" stroke="#000000" stroke-width="5"/>
<text alignment-baseline="after-edge" fill="#000000" font-family="Arial" font-size="25" font-weight="700" text-anchor="start" x="598" y="644">U2</text>
<text alignment-baseline="after-edge" fill="#000000" font-family="Arial" font-size="25" font-weight="700" text-anchor="start" x="548" y="674">NBUFFER</text>
<polyline fill="none" points="688 424, 788 424, 788 724, 688 724" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="488 424, 288 424" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="488 724, 288 724" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<line stroke="#000000" stroke-linecap="round" stroke-width="5" x1="188" x2="288" y1="424" y2="424"/>
<text alignment-baseline="after-edge" fill="#000080" font-family="Times New Roman" font-size="30" font-weight="400" text-anchor="start" x="128" y="445">0</text>
<rect fill="#ffffff" fill-opacity="0.5" height="60" stroke="#800000" stroke-width="5" width="100" x="88" y="394"/>
<text alignment-baseline="after-edge" fill="#000000" font-family="Arial" font-size="25" font-weight="700" text-anchor="start" x="132" y="385">1</text>
<text alignment-baseline="after-edge" fill="#000000" font-family="Arial" font-size="25" font-weight="700" text-anchor="start" x="19" y="446">DCT</text>
<text alignment-baseline="after-edge" fill="#000080" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="89" y="497">Key = 1</text>
<line stroke="#000000" stroke-linecap="round" stroke-width="5" x1="188" x2="288" y1="574" y2="574"/>
<text alignment-baseline="after-edge" fill="#000080" font-family="Times New Roman" font-size="30" font-weight="400" text-anchor="start" x="128" y="595">0</text>
<rect fill="#ffffff" fill-opacity="0.5" height="60" stroke="#800000" stroke-width="5" width="100" x="88" y="544"/>
<text alignment-baseline="after-edge" fill="#000000" font-family="Arial" font-size="25" font-weight="700" text-anchor="start" x="132" y="535">2</text>
<text alignment-baseline="after-edge" fill="#000000" font-family="Arial" font-size="25" font-weight="700" text-anchor="start" x="19" y="596">DCT</text>
<text alignment-baseline="after-edge" fill="#000080" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="89" y="647">Key = 2</text>
<line stroke="#000000" stroke-linecap="round" stroke-width="5" x1="188" x2="288" y1="724" y2="724"/>
<text alignment-baseline="after-edge" fill="#000080" font-family="Times New Roman" font-size="30" font-weight="400" text-anchor="start" x="129" y="744">1</text>
<rect fill="#ffffff" fill-opacity="0.5" height="60" stroke="#800000" stroke-width="5" width="100" x="88" y="694"/>
<text alignment-baseline="after-edge" fill="#000000" font-family="Arial" font-size="25" font-weight="700" text-anchor="start" x="132" y="685">3</text>
<text alignment-baseline="after-edge" fill="#000000" font-family="Arial" font-size="25" font-weight="700" text-anchor="start" x="19" y="746">DCT</text>
<text alignment-baseline="after-edge" fill="#000080" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="89" y="797">Key = 3</text>
<line stroke="#000000" stroke-linecap="round" stroke-width="5" x1="188" x2="288" y1="874" y2="874"/>
<text alignment-baseline="after-edge" fill="#000080" font-family="Times New Roman" font-size="30" font-weight="400" text-anchor="start" x="129" y="894">1</text>
<rect fill="#ffffff" fill-opacity="0.5" height="60" stroke="#800000" stroke-width="5" width="100" x="88" y="844"/>
<text alignment-baseline="after-edge" fill="#000000" font-family="Arial" font-size="25" font-weight="700" text-anchor="start" x="132" y="835">4</text>
<text alignment-baseline="after-edge" fill="#000000" font-family="Arial" font-size="25" font-weight="700" text-anchor="start" x="19" y="896">DCT</text>
<text alignment-baseline="after-edge" fill="#000080" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="89" y="947">Key = 4</text>
<line stroke="#000000" stroke-linecap="round" stroke-width="5" x1="788" x2="788" y1="324" y2="424"/>
<circle cx="788" cy="304" fill="#ffffff" fill-opacity="0.5" r="18" stroke="#000000" stroke-width="1"/>
<text alignment-baseline="after-edge" fill="#000000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="780" y="273">5</text>
<text alignment-baseline="after-edge" fill="#000000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="809" y="379">P</text>
<polyline fill="none" points="288 574, 588 574, 588 524" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="288 874, 588 874, 588 824" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<text alignment-baseline="after-edge" fill="#000000" font-family="微软雅黑" font-size="65" font-weight="700" text-anchor="start" x="88" y="94">一位三态门功能测试电路</text>
<text alignment-baseline="after-edge" fill="#000080" font-family="宋体" font-size="25" font-weight="400" text-anchor="start" x="288" y="424">输入1</text>
<text alignment-baseline="after-edge" fill="#000080" font-family="宋体" font-size="25" font-weight="400" text-anchor="start" x="288" y="724">输入2</text>
<text alignment-baseline="after-edge" fill="#000080" font-family="宋体" font-size="25" font-weight="400" text-anchor="start" x="288" y="574">门控1</text>
<text alignment-baseline="after-edge" fill="#000080" font-family="宋体" font-size="25" font-weight="400" text-anchor="start" x="288" y="874">门控2</text>
<text alignment-baseline="after-edge" fill="#000080" font-family="宋体" font-size="25" font-weight="400" text-anchor="start" x="788" y="724">位宽为1的总线</text>
<text alignment-baseline="after-edge" fill="#000080" font-family="宋体" font-size="25" font-weight="400" text-anchor="start" x="78" y="144">两个三态门输出到同一条总线上</text>
<text alignment-baseline="after-edge" fill="#000080" font-family="宋体" font-size="25" font-weight="400" text-anchor="start" x="68" y="204">为了避免信号冲突,就需要始终保证最多一个门打开,其它门关闭</text>
<circle cx="788" cy="424" fill="#0000ff" r="8" stroke="#0000ff" stroke-width="5"/>
</svg>
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论