提交 7c300cda 创建 作者: 赵鹏翀's avatar 赵鹏翀

Initial commit

上级
*.cir
*.xml
*.bak
/.vs
\ No newline at end of file
[submodule "8086"]
path = 8086
url = https://zpc@www.codecode.net/engintime/Dream-Logic/Intel-classic-chips/8086.git
[submodule "8259A"]
path = 8259A
url = https://zpc@www.codecode.net/engintime/Dream-Logic/Intel-classic-chips/8259A.git
8086 @ 0646239b
Subproject commit 0646239b4d1645f6a0da63d7f4bb3142942e567c
8259A @ e090530d
Subproject commit e090530dbe6c8add5b683e25ea969b581be5cfca
添加文件
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<svg height="1196" version="1.1" width="2060" xmlns="http://www.w3.org/2000/svg">
<polygon fill="#ffff80" points="36 697, 36 672, 211 672, 236 697, 211 722, 36 722, 36 697" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="36" y="697">A[7..0]</text>
<polyline fill="none" points="1136 717, 936 717, 786 717, 436 717" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="1136 747, 936 747, 786 747, 436 747" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="1136 777, 936 777, 786 777, 436 777" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<text alignment-baseline="after-edge" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="436" y="717">A3</text>
<text alignment-baseline="after-edge" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="436" y="747">A4</text>
<text alignment-baseline="after-edge" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="436" y="777">A5</text>
<line stroke="#000000" stroke-linecap="round" stroke-width="5" x1="1186" x2="1136" y1="817" y2="817"/>
<text alignment-baseline="central" fill="#000000" font-family="Courier New" font-size="17" font-weight="400" text-anchor="end" x="1232" y="816">G1</text>
<text alignment-baseline="after-edge" fill="#000000" font-family="Courier New" font-size="17" font-weight="400" text-anchor="end" x="1159" y="816">6</text>
<line stroke="#000000" stroke-linecap="round" stroke-width="5" x1="1176" x2="1136" y1="847" y2="847"/>
<text alignment-baseline="central" fill="#000000" font-family="Courier New" font-size="17" font-weight="400" text-anchor="end" x="1256" y="846">^G2A</text>
<text alignment-baseline="after-edge" fill="#000000" font-family="Courier New" font-size="17" font-weight="400" text-anchor="end" x="1159" y="848">4</text>
<line stroke="#000000" stroke-linecap="round" stroke-width="5" x1="1176" x2="1136" y1="877" y2="877"/>
<text alignment-baseline="central" fill="#000000" font-family="Courier New" font-size="17" font-weight="400" text-anchor="end" x="1256" y="876">^G2B</text>
<text alignment-baseline="after-edge" fill="#000000" font-family="Courier New" font-size="17" font-weight="400" text-anchor="end" x="1158" y="877">5</text>
<line stroke="#000000" stroke-linecap="round" stroke-width="5" x1="1186" x2="1136" y1="717" y2="717"/>
<text alignment-baseline="central" fill="#000000" font-family="Courier New" font-size="17" font-weight="400" text-anchor="middle" x="1213" y="717">A</text>
<text alignment-baseline="after-edge" fill="#000000" font-family="Courier New" font-size="17" font-weight="400" text-anchor="start" x="1146" y="716">1</text>
<line stroke="#000000" stroke-linecap="round" stroke-width="5" x1="1186" x2="1136" y1="747" y2="747"/>
<text alignment-baseline="central" fill="#000000" font-family="Courier New" font-size="17" font-weight="400" text-anchor="end" x="1219" y="747">B</text>
<text alignment-baseline="after-edge" fill="#000000" font-family="Courier New" font-size="17" font-weight="400" text-anchor="end" x="1160" y="747">2</text>
<line stroke="#000000" stroke-linecap="round" stroke-width="5" x1="1186" x2="1136" y1="777" y2="777"/>
<text alignment-baseline="central" fill="#000000" font-family="Courier New" font-size="17" font-weight="400" text-anchor="middle" x="1213" y="777">C</text>
<text alignment-baseline="after-edge" fill="#000000" font-family="Courier New" font-size="17" font-weight="400" text-anchor="start" x="1147" y="777">3</text>
<line stroke="#000000" stroke-linecap="round" stroke-width="5" x1="1346" x2="1386" y1="697" y2="697"/>
<text alignment-baseline="central" fill="#000000" font-family="Courier New" font-size="17" font-weight="400" text-anchor="middle" x="1307" y="694">Y0</text>
<text alignment-baseline="after-edge" fill="#000000" font-family="Courier New" font-size="17" font-weight="400" text-anchor="start" x="1355" y="697">15</text>
<line stroke="#000000" stroke-linecap="round" stroke-width="5" x1="1346" x2="1386" y1="727" y2="727"/>
<text alignment-baseline="central" fill="#000000" font-family="Courier New" font-size="17" font-weight="400" text-anchor="middle" x="1307" y="724">Y1</text>
<text alignment-baseline="after-edge" fill="#000000" font-family="Courier New" font-size="17" font-weight="400" text-anchor="start" x="1356" y="727">14</text>
<line stroke="#000000" stroke-linecap="round" stroke-width="5" x1="1346" x2="1386" y1="757" y2="757"/>
<text alignment-baseline="central" fill="#000000" font-family="Courier New" font-size="17" font-weight="400" text-anchor="middle" x="1307" y="754">Y2</text>
<text alignment-baseline="after-edge" fill="#000000" font-family="Courier New" font-size="17" font-weight="400" text-anchor="start" x="1356" y="757">13</text>
<line stroke="#000000" stroke-linecap="round" stroke-width="5" x1="1346" x2="1386" y1="787" y2="787"/>
<text alignment-baseline="central" fill="#000000" font-family="Courier New" font-size="17" font-weight="400" text-anchor="middle" x="1307" y="784">Y3</text>
<text alignment-baseline="after-edge" fill="#000000" font-family="Courier New" font-size="17" font-weight="400" text-anchor="start" x="1356" y="787">12</text>
<line stroke="#000000" stroke-linecap="round" stroke-width="5" x1="1346" x2="1386" y1="817" y2="817"/>
<text alignment-baseline="central" fill="#000000" font-family="Courier New" font-size="17" font-weight="400" text-anchor="middle" x="1307" y="814">Y4</text>
<text alignment-baseline="after-edge" fill="#000000" font-family="Courier New" font-size="17" font-weight="400" text-anchor="start" x="1356" y="817">11</text>
<line stroke="#000000" stroke-linecap="round" stroke-width="5" x1="1346" x2="1386" y1="847" y2="847"/>
<text alignment-baseline="central" fill="#000000" font-family="Courier New" font-size="17" font-weight="400" text-anchor="middle" x="1307" y="844">Y5</text>
<text alignment-baseline="after-edge" fill="#000000" font-family="Courier New" font-size="17" font-weight="400" text-anchor="start" x="1356" y="847">10</text>
<line stroke="#000000" stroke-linecap="round" stroke-width="5" x1="1346" x2="1386" y1="877" y2="877"/>
<text alignment-baseline="central" fill="#000000" font-family="Courier New" font-size="17" font-weight="400" text-anchor="middle" x="1307" y="874">Y6</text>
<text alignment-baseline="after-edge" fill="#000000" font-family="Courier New" font-size="17" font-weight="400" text-anchor="start" x="1368" y="877">9</text>
<line stroke="#000000" stroke-linecap="round" stroke-width="5" x1="1346" x2="1386" y1="907" y2="907"/>
<text alignment-baseline="central" fill="#000000" font-family="Courier New" font-size="17" font-weight="400" text-anchor="end" x="1321" y="906">Y7</text>
<text alignment-baseline="after-edge" fill="#000000" font-family="Courier New" font-size="17" font-weight="400" text-anchor="end" x="1383" y="907">7</text>
<circle cx="1181" cy="877" fill="none" r="5" stroke="#000000" stroke-width="5"/>
<circle cx="1341" cy="757" fill="none" r="5" stroke="#000000" stroke-width="5"/>
<circle cx="1341" cy="788" fill="none" r="5" stroke="#000000" stroke-width="5"/>
<circle cx="1342" cy="817" fill="#ffffff" r="5" stroke="#000000" stroke-width="5"/>
<circle cx="1341" cy="697" fill="none" r="5" stroke="#000000" stroke-width="5"/>
<circle cx="1341" cy="847" fill="none" r="5" stroke="#000000" stroke-width="5"/>
<circle cx="1341" cy="726" fill="none" r="5" stroke="#000000" stroke-width="5"/>
<circle cx="1341" cy="876" fill="none" r="5" stroke="#000000" stroke-width="5"/>
<circle cx="1341" cy="908" fill="none" r="5" stroke="#000000" stroke-width="5"/>
<circle cx="1181" cy="847" fill="none" r="5" stroke="#000000" stroke-width="5"/>
<rect fill="#ffffff" fill-opacity="0.5" height="264" stroke="#000000" stroke-width="5" width="146" x="1188" y="663"/>
<text alignment-baseline="after-edge" fill="#000000" font-family="Arial" font-size="25" font-weight="700" text-anchor="start" x="1251" y="654">U1</text>
<text alignment-baseline="after-edge" fill="#000000" font-family="Arial" font-size="25" font-weight="700" text-anchor="start" x="1189" y="969">74LS138D</text>
<polygon fill="#ffff80" points="36 1147, 36 1122, 161 1122, 186 1147, 161 1172, 36 1172, 36 1147" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="36" y="1147">MIO</text>
<text alignment-baseline="after-edge" fill="#000080" font-family="宋体" font-size="25" font-weight="400" text-anchor="start" x="16" y="1087">低电平表示访问IO端口</text>
<polygon fill="#ffff80" points="36 397, 36 372, 211 372, 236 397, 211 422, 36 422, 36 397" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="36" y="397">WR_OUT</text>
<polygon fill="#ffff80" points="36 547, 36 522, 211 522, 236 547, 211 572, 36 572, 36 547" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="36" y="547">READ_OUT</text>
<line stroke="#000000" stroke-linecap="round" stroke-width="5" x1="446" x2="386" y1="337" y2="337"/>
<line stroke="#000000" stroke-linecap="round" stroke-width="5" x1="446" x2="386" y1="397" y2="397"/>
<line stroke="#000000" stroke-linecap="round" stroke-width="5" x1="576" x2="636" y1="367" y2="367"/>
<path d="M442 321 C 468 360, 441 410, 441 410, 441 410, 441 410, 441 410" fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="442 320, 500 320" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="441 410, 499 410" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<path d="M500 320 C 552 320, 576 367, 576 367" fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<path d="M498 410 C 554 410, 576 367, 576 367" fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<text alignment-baseline="after-edge" fill="#000000" font-family="Arial" font-size="25" font-weight="700" text-anchor="start" x="491" y="310">U3</text>
<text alignment-baseline="after-edge" fill="#000000" font-family="Arial" font-size="25" font-weight="700" text-anchor="start" x="479" y="461">OR</text>
<line stroke="#000000" stroke-linecap="round" stroke-width="5" x1="446" x2="386" y1="487" y2="487"/>
<line stroke="#000000" stroke-linecap="round" stroke-width="5" x1="446" x2="386" y1="547" y2="547"/>
<line stroke="#000000" stroke-linecap="round" stroke-width="5" x1="576" x2="636" y1="517" y2="517"/>
<path d="M442 471 C 468 510, 441 560, 441 560, 441 560, 441 560, 441 560" fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="442 470, 500 470" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="441 560, 499 560" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<path d="M500 470 C 552 470, 576 517, 576 517" fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<path d="M498 560 C 554 560, 576 517, 576 517" fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<text alignment-baseline="after-edge" fill="#000000" font-family="Arial" font-size="25" font-weight="700" text-anchor="start" x="491" y="460">U4</text>
<text alignment-baseline="after-edge" fill="#000000" font-family="Arial" font-size="25" font-weight="700" text-anchor="start" x="479" y="611">OR</text>
<polyline fill="none" points="386 547, 236 547" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="386 337, 286 337, 286 487" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polygon fill="#ffff80" points="1836 367, 1836 342, 2011 342, 2036 367, 2011 392, 1836 392, 1836 367" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="1836" y="367">IOW</text>
<polygon fill="#ffff80" points="1836 517, 1836 492, 2011 492, 2036 517, 2011 542, 1836 542, 1836 517" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="1836" y="517">IOR</text>
<text alignment-baseline="after-edge" fill="#000000" font-family="微软雅黑" font-size="125" font-weight="700" text-anchor="start" x="456" y="167">I/O地址译码单元</text>
<polyline fill="none" points="386 397, 236 397" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polygon fill="#ffff80" points="36 487, 36 462, 211 462, 236 487, 211 512, 36 512, 36 487" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="36" y="487">MIO</text>
<polyline fill="none" points="386 487, 236 487" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<line stroke="#000000" stroke-linecap="round" stroke-width="5" x1="646" x2="586" y1="867" y2="867"/>
<line stroke="#000000" stroke-linecap="round" stroke-width="5" x1="726" x2="786" y1="867" y2="867"/>
<circle cx="722" cy="867" fill="none" r="5" stroke="#000000" stroke-width="5"/>
<polygon fill="#ffffff" fill-opacity="0.5" points="646 817, 646 917, 716 867, 646 817" 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="666" y="831">U5</text>
<text alignment-baseline="after-edge" fill="#000000" font-family="Arial" font-size="25" font-weight="700" text-anchor="start" x="646" y="963">NOT</text>
<text alignment-baseline="after-edge" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="436" y="867">A6</text>
<line stroke="#000000" stroke-linecap="round" stroke-width="5" x1="846" x2="786" y1="867" y2="867"/>
<line stroke="#000000" stroke-linecap="round" stroke-width="5" x1="846" x2="786" y1="927" y2="927"/>
<line stroke="#000000" stroke-linecap="round" stroke-width="5" x1="976" x2="1036" y1="897" y2="897"/>
<path d="M924 845 A 47 47 0 1 1 924 938" fill="none" stroke="#000000" stroke-linecap="round" stroke-width="5"/>
<polyline fill="none" points="925 939, 846 939, 846 845, 925 845" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<text alignment-baseline="after-edge" fill="#000000" font-family="Arial" font-size="25" font-weight="700" text-anchor="start" x="887" y="839">U6</text>
<text alignment-baseline="after-edge" fill="#000000" font-family="Arial" font-size="25" font-weight="700" text-anchor="start" x="870" y="985">AND</text>
<text alignment-baseline="after-edge" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="436" y="927">A7</text>
<polyline fill="none" points="586 867, 436 867" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="786 927, 436 927" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<line stroke="#000080" stroke-linecap="round" stroke-width="5" x1="386" x2="436" y1="767" y2="717"/>
<line stroke="#000080" stroke-linecap="round" stroke-width="5" x1="386" x2="436" y1="797" y2="747"/>
<line stroke="#000080" stroke-linecap="round" stroke-width="5" x1="386" x2="436" y1="827" y2="777"/>
<line stroke="#000080" stroke-linecap="round" stroke-width="5" x1="386" x2="436" y1="917" y2="867"/>
<line stroke="#000080" stroke-linecap="round" stroke-width="5" x1="386" x2="436" y1="977" y2="927"/>
<polyline fill="none" points="236 697, 386 697, 386 977" stroke="#000080" stroke-linecap="round" stroke-linejoin="round" stroke-width="20"/>
<polyline fill="none" points="1136 817, 1036 817, 1036 897" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="186 1147, 1086 1147, 1086 847, 1136 847" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="1386 697, 1836 697" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="1386 727, 1836 727" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="1386 757, 1836 757" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="1386 787, 1836 787" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="1386 817, 1836 817" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="1386 847, 1836 847" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="1386 877, 1836 877" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="1386 907, 1836 907" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polygon fill="#ffff80" points="1836 697, 1836 682, 2021 682, 2036 697, 2021 712, 1836 712, 1836 697" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="1836" y="697">CS0</text>
<polygon fill="#ffff80" points="1836 727, 1836 712, 2021 712, 2036 727, 2021 742, 1836 742, 1836 727" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="1836" y="727">CS1</text>
<polygon fill="#ffff80" points="1836 757, 1836 742, 2021 742, 2036 757, 2021 772, 1836 772, 1836 757" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="1836" y="757">CS2</text>
<polygon fill="#ffff80" points="1836 787, 1836 772, 2021 772, 2036 787, 2021 802, 1836 802, 1836 787" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="1836" y="787">CS3</text>
<polygon fill="#ffff80" points="1836 817, 1836 802, 2021 802, 2036 817, 2021 832, 1836 832, 1836 817" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="1836" y="817">CS4</text>
<polygon fill="#ffff80" points="1836 847, 1836 832, 2021 832, 2036 847, 2021 862, 1836 862, 1836 847" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="1836" y="847">CS5</text>
<polygon fill="#ffff80" points="1836 877, 1836 862, 2021 862, 2036 877, 2021 892, 1836 892, 1836 877" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="1836" y="877">CS6</text>
<polygon fill="#ffff80" points="1836 907, 1836 892, 2021 892, 2036 907, 2021 922, 1836 922, 1836 907" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="1836" y="907">CS7</text>
<text alignment-baseline="after-edge" fill="#000080" font-family="宋体" font-size="22" font-weight="400" text-anchor="start" x="1436" y="697">(80H~87H)</text>
<text alignment-baseline="after-edge" fill="#000080" font-family="宋体" font-size="22" font-weight="400" text-anchor="start" x="1436" y="727">(88H~8FH)</text>
<text alignment-baseline="after-edge" fill="#000080" font-family="宋体" font-size="22" font-weight="400" text-anchor="start" x="1436" y="757">(90H~97H)</text>
<text alignment-baseline="after-edge" fill="#000080" font-family="宋体" font-size="22" font-weight="400" text-anchor="start" x="1436" y="787">(98H~9FH)</text>
<text alignment-baseline="after-edge" fill="#000080" font-family="宋体" font-size="22" font-weight="400" text-anchor="start" x="1436" y="817">(A0H~A7H)</text>
<text alignment-baseline="after-edge" fill="#000080" font-family="宋体" font-size="22" font-weight="400" text-anchor="start" x="1436" y="847">(A8H~AFH)</text>
<text alignment-baseline="after-edge" fill="#000080" font-family="宋体" font-size="22" font-weight="400" text-anchor="start" x="1436" y="877">(B0H~B7H)</text>
<text alignment-baseline="after-edge" fill="#000080" font-family="宋体" font-size="22" font-weight="400" text-anchor="start" x="1436" y="907">(B8H~BFH)</text>
<polyline fill="none" points="636 367, 1836 367" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="636 517, 1836 517" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<circle cx="286" cy="487" fill="#0000ff" r="8" stroke="#0000ff" stroke-width="5"/>
</svg>
# 说明
IO接口芯片地址译码模块
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<project id="3407fe40-bd78-42b5-914a-e269ea66b67f" name="Lab004" version="1">
<files>
<filefolder id="d7502e9e-b220-4715-a645-2f139d9b4f34" name="MEM">
<file relativepath="MEM\MEM.dlsche"/>
<file relativepath="MEM\ram.asm"/>
<file relativepath="MEM\ram.bat"/>
<file relativepath="MEM\ram.rxm"/>
<file relativepath="MEM\README.md"/>
</filefolder>
<filefolder id="c6ec748e-8eff-4fcb-9ff0-d62ba30af439" name="IO">
<file relativepath="IO\IO.dlsche"/>
<file relativepath="IO\README.md"/>
</filefolder>
<filefolder id="c1859124-7805-4dc5-80ca-ead7e78df13a" name="8086">
<file relativepath="8086\8086.dlsche"/>
<file relativepath="8086\8086.pdf"/>
<file relativepath="8086\ALU.dlsche"/>
<file relativepath="8086\BRANCH.dlsche"/>
<file relativepath="8086\CU.dlsche"/>
<file relativepath="8086\FLAG.dlsche"/>
<file relativepath="8086\PC.dlsche"/>
<file relativepath="8086\README.md"/>
<file relativepath="8086\REGS.dlsche"/>
<file relativepath="8086\rom.bat"/>
<file relativepath="8086\rom.masm"/>
<file relativepath="8086\rom.rxm"/>
<file relativepath="8086\uPC_NEXT.dlsche"/>
</filefolder>
<filefolder id="4e580194-3c19-4f28-9858-1164a71103d7" name="8259A">
<file relativepath="8259A\8259A.dlsche"/>
<file relativepath="8259A\8259A.pdf"/>
<file relativepath="8259A\acs.dlsche"/>
<file relativepath="8259A\apply.dlsche"/>
<file relativepath="8259A\fsm.dlsche"/>
<file relativepath="8259A\initial.dlsche"/>
<file relativepath="8259A\IRR.dlsche"/>
<file relativepath="8259A\ISR.dlsche"/>
<file relativepath="8259A\PR.dlsche"/>
<file relativepath="8259A\README.md"/>
<file relativepath="8259A\sp.dlsche"/>
</filefolder>
<file relativepath="README.md"/>
<file relativepath="top.dlsche"/>
<file relativepath="top1.dlsche"/>
</files>
</project>
添加文件
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<svg height="1454" version="1.1" width="1952" xmlns="http://www.w3.org/2000/svg">
<polygon fill="#ffff80" points="21 402, 21 377, 146 377, 171 402, 146 427, 21 427, 21 402" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="21" y="402">ABUS[7..0]</text>
<line stroke="#000080" stroke-linecap="round" stroke-width="5" x1="221" x2="271" y1="422" y2="472"/>
<line stroke="#000080" stroke-linecap="round" stroke-width="5" x1="221" x2="271" y1="442" y2="492"/>
<line stroke="#000080" stroke-linecap="round" stroke-width="5" x1="221" x2="271" y1="462" y2="512"/>
<line stroke="#000080" stroke-linecap="round" stroke-width="5" x1="221" x2="271" y1="482" y2="532"/>
<line stroke="#000080" stroke-linecap="round" stroke-width="5" x1="221" x2="271" y1="502" y2="552"/>
<line stroke="#000080" stroke-linecap="round" stroke-width="5" x1="221" x2="271" y1="522" y2="572"/>
<line stroke="#000080" stroke-linecap="round" stroke-width="5" x1="221" x2="271" y1="542" y2="592"/>
<line stroke="#000080" stroke-linecap="round" stroke-width="5" x1="221" x2="271" y1="562" y2="612"/>
<polyline fill="none" points="271 472, 541 472" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="271 492, 541 492" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="271 512, 541 512" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="271 532, 541 532" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="271 552, 541 552" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="271 572, 541 572" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="271 592, 541 592" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="271 612, 541 612" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<text alignment-baseline="after-edge" fill="#800000" font-family="Times New Roman" font-size="12" font-weight="400" text-anchor="start" x="341" y="472">ABUS0</text>
<text alignment-baseline="after-edge" fill="#800000" font-family="Times New Roman" font-size="12" font-weight="400" text-anchor="start" x="341" y="492">ABUS1</text>
<text alignment-baseline="after-edge" fill="#800000" font-family="Times New Roman" font-size="12" font-weight="400" text-anchor="start" x="341" y="512">ABUS2</text>
<text alignment-baseline="after-edge" fill="#800000" font-family="Times New Roman" font-size="12" font-weight="400" text-anchor="start" x="341" y="532">ABUS3</text>
<text alignment-baseline="after-edge" fill="#800000" font-family="Times New Roman" font-size="12" font-weight="400" text-anchor="start" x="341" y="552">ABUS4</text>
<text alignment-baseline="after-edge" fill="#800000" font-family="Times New Roman" font-size="12" font-weight="400" text-anchor="start" x="341" y="572">ABUS5</text>
<text alignment-baseline="after-edge" fill="#800000" font-family="Times New Roman" font-size="12" font-weight="400" text-anchor="start" x="341" y="592">ABUS6</text>
<text alignment-baseline="after-edge" fill="#800000" font-family="Times New Roman" font-size="12" font-weight="400" text-anchor="start" x="341" y="612">ABUS7</text>
<polygon fill="#ffff80" points="21 682, 21 657, 146 657, 171 682, 146 707, 21 707, 21 682" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="21" y="682">DBUS[7..0]</text>
<line stroke="#000080" stroke-linecap="round" stroke-width="5" x1="221" x2="271" y1="862" y2="812"/>
<polyline fill="none" points="541 812, 271 812" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<line stroke="#000080" stroke-linecap="round" stroke-width="5" x1="221" x2="271" y1="842" y2="792"/>
<line stroke="#000080" stroke-linecap="round" stroke-width="5" x1="221" x2="271" y1="822" y2="772"/>
<line stroke="#000080" stroke-linecap="round" stroke-width="5" x1="221" x2="271" y1="802" y2="752"/>
<line stroke="#000080" stroke-linecap="round" stroke-width="5" x1="221" x2="271" y1="782" y2="732"/>
<line stroke="#000080" stroke-linecap="round" stroke-width="5" x1="221" x2="271" y1="762" y2="712"/>
<line stroke="#000080" stroke-linecap="round" stroke-width="5" x1="221" x2="271" y1="742" y2="692"/>
<line stroke="#000080" stroke-linecap="round" stroke-width="5" x1="221" x2="271" y1="722" y2="672"/>
<polyline fill="none" points="271 792, 541 792" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="271 772, 541 772" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="271 752, 541 752" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="271 732, 541 732" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="271 712, 541 712" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="271 692, 541 692" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="271 672, 541 672" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<text alignment-baseline="after-edge" fill="#800000" font-family="Times New Roman" font-size="12" font-weight="400" text-anchor="start" x="311" y="672">DBUS0</text>
<text alignment-baseline="after-edge" fill="#800000" font-family="Times New Roman" font-size="12" font-weight="400" text-anchor="start" x="311" y="692">DBUS1</text>
<text alignment-baseline="after-edge" fill="#800000" font-family="Times New Roman" font-size="12" font-weight="400" text-anchor="start" x="311" y="712">DBUS2</text>
<text alignment-baseline="after-edge" fill="#800000" font-family="Times New Roman" font-size="12" font-weight="400" text-anchor="start" x="311" y="732">DBUS3</text>
<text alignment-baseline="after-edge" fill="#800000" font-family="Times New Roman" font-size="12" font-weight="400" text-anchor="start" x="311" y="752">DBUS4</text>
<text alignment-baseline="after-edge" fill="#800000" font-family="Times New Roman" font-size="12" font-weight="400" text-anchor="start" x="311" y="772">DBUS5</text>
<text alignment-baseline="after-edge" fill="#800000" font-family="Times New Roman" font-size="12" font-weight="400" text-anchor="start" x="311" y="792">DBUS6</text>
<text alignment-baseline="after-edge" fill="#800000" font-family="Times New Roman" font-size="12" font-weight="400" text-anchor="start" x="311" y="812">DBUS7</text>
<polygon fill="#ffff80" points="21 1112, 21 1087, 146 1087, 171 1112, 146 1137, 21 1137, 21 1112" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="21" y="1112">WR_OUT</text>
<polygon fill="#ffff80" points="21 892, 21 867, 146 867, 171 892, 146 917, 21 917, 21 892" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="21" y="892">CLK</text>
<text alignment-baseline="after-edge" fill="#800000" font-family="Times New Roman" font-size="22" font-weight="400" text-anchor="start" x="1481" y="472">DBUS0</text>
<text alignment-baseline="after-edge" fill="#800000" font-family="Times New Roman" font-size="22" font-weight="400" text-anchor="start" x="1481" y="502">DBUS1</text>
<text alignment-baseline="after-edge" fill="#800000" font-family="Times New Roman" font-size="22" font-weight="400" text-anchor="start" x="1481" y="532">DBUS2</text>
<text alignment-baseline="after-edge" fill="#800000" font-family="Times New Roman" font-size="22" font-weight="400" text-anchor="start" x="1481" y="562">DBUS3</text>
<text alignment-baseline="after-edge" fill="#800000" font-family="Times New Roman" font-size="22" font-weight="400" text-anchor="start" x="1481" y="592">DBUS4</text>
<text alignment-baseline="after-edge" fill="#800000" font-family="Times New Roman" font-size="22" font-weight="400" text-anchor="start" x="1481" y="622">DBUS5</text>
<text alignment-baseline="after-edge" fill="#800000" font-family="Times New Roman" font-size="22" font-weight="400" text-anchor="start" x="1481" y="652">DBUS6</text>
<text alignment-baseline="after-edge" fill="#800000" font-family="Times New Roman" font-size="22" font-weight="400" text-anchor="start" x="1481" y="682">DBUS7</text>
<polyline fill="none" points="1431 472, 1631 472" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="1431 502, 1631 502" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="1431 532, 1631 532" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="1431 562, 1631 562" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="1431 592, 1631 592" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="1431 622, 1631 622" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="1431 652, 1631 652" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="1431 682, 1631 682" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<line stroke="#000080" stroke-linecap="round" stroke-width="5" x1="1631" x2="1681" y1="472" y2="422"/>
<line stroke="#000080" stroke-linecap="round" stroke-width="5" x1="1631" x2="1681" y1="502" y2="452"/>
<line stroke="#000080" stroke-linecap="round" stroke-width="5" x1="1631" x2="1681" y1="532" y2="482"/>
<line stroke="#000080" stroke-linecap="round" stroke-width="5" x1="1631" x2="1681" y1="562" y2="512"/>
<line stroke="#000080" stroke-linecap="round" stroke-width="5" x1="1631" x2="1681" y1="592" y2="542"/>
<line stroke="#000080" stroke-linecap="round" stroke-width="5" x1="1631" x2="1681" y1="622" y2="572"/>
<line stroke="#000080" stroke-linecap="round" stroke-width="5" x1="1631" x2="1681" y1="652" y2="602"/>
<line stroke="#000080" stroke-linecap="round" stroke-width="5" x1="1631" x2="1681" y1="682" y2="632"/>
<polyline fill="none" points="791 472, 1181 472" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="791 492, 1081 492, 1081 502, 1181 502" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="791 512, 1061 512, 1061 532, 1181 532" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="791 532, 1041 532, 1041 562, 1181 562" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="791 552, 1011 552, 1011 592, 1181 592" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="791 572, 981 572, 981 622, 1181 622" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="791 592, 951 592, 951 652, 1181 652" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="791 612, 921 612, 921 682, 1181 682" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<text alignment-baseline="after-edge" fill="#000000" font-family="微软雅黑" font-size="150" font-weight="700" text-anchor="start" x="651" y="192">MEM模块</text>
<polygon fill="#ffff80" points="21 1172, 21 1147, 146 1147, 171 1172, 146 1197, 21 1197, 21 1172" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="21" y="1172">MIO</text>
<line stroke="#000000" stroke-linecap="round" stroke-width="5" x1="681" x2="621" y1="1112" y2="1112"/>
<line stroke="#000000" stroke-linecap="round" stroke-width="5" x1="681" x2="621" y1="1172" y2="1172"/>
<line stroke="#000000" stroke-linecap="round" stroke-width="5" x1="811" x2="871" y1="1142" y2="1142"/>
<path d="M677 1096 C 703 1135, 676 1185, 676 1185, 676 1185, 676 1185, 676 1185" fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="677 1095, 735 1095" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="676 1185, 734 1185" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<path d="M735 1095 C 787 1095, 811 1142, 811 1142" fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<path d="M733 1185 C 789 1185, 811 1142, 811 1142" fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<text alignment-baseline="after-edge" fill="#000000" font-family="Arial" font-size="25" font-weight="700" text-anchor="start" x="726" y="1085">U1</text>
<text alignment-baseline="after-edge" fill="#000000" font-family="Arial" font-size="25" font-weight="700" text-anchor="start" x="714" y="1236">OR</text>
<polygon fill="#ffff80" points="21 1372, 21 1347, 146 1347, 171 1372, 146 1397, 21 1397, 21 1372" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="21" y="1372">READ_OUT</text>
<line stroke="#000000" stroke-linecap="round" stroke-width="5" x1="681" x2="621" y1="1312" y2="1312"/>
<line stroke="#000000" stroke-linecap="round" stroke-width="5" x1="681" x2="621" y1="1372" y2="1372"/>
<line stroke="#000000" stroke-linecap="round" stroke-width="5" x1="811" x2="871" y1="1342" y2="1342"/>
<path d="M677 1296 C 703 1335, 676 1385, 676 1385, 676 1385, 676 1385, 676 1385" fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="677 1295, 735 1295" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="676 1385, 734 1385" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<path d="M735 1295 C 787 1295, 811 1342, 811 1342" fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<path d="M733 1385 C 789 1385, 811 1342, 811 1342" fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<text alignment-baseline="after-edge" fill="#000000" font-family="Arial" font-size="25" font-weight="700" text-anchor="start" x="726" y="1285">U2</text>
<text alignment-baseline="after-edge" fill="#000000" font-family="Arial" font-size="25" font-weight="700" text-anchor="start" x="714" y="1436">OR</text>
<text alignment-baseline="after-edge" fill="#000080" font-family="宋体" font-size="25" font-weight="400" text-anchor="start" x="21" y="1312">MIO为高电平表示访问存储器</text>
<line stroke="#000000" stroke-linecap="round" stroke-width="5" x1="281" x2="221" y1="1172" y2="1172"/>
<line stroke="#000000" stroke-linecap="round" stroke-width="5" x1="361" x2="421" y1="1172" y2="1172"/>
<circle cx="357" cy="1172" fill="none" r="5" stroke="#000000" stroke-width="5"/>
<polygon fill="#ffffff" fill-opacity="0.5" points="281 1122, 281 1222, 351 1172, 281 1122" 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="301" y="1136">U3</text>
<text alignment-baseline="after-edge" fill="#000000" font-family="Arial" font-size="25" font-weight="700" text-anchor="start" x="281" y="1268">NOT</text>
<polyline fill="none" points="221 562, 221 402, 171 402" stroke="#000080" stroke-linecap="round" stroke-linejoin="round" stroke-width="20"/>
<polyline fill="none" points="221 862, 221 682, 171 682" stroke="#000080" stroke-linecap="round" stroke-linejoin="round" stroke-width="20"/>
<polyline fill="none" points="1681 632, 1681 412, 1781 412" stroke="#000080" stroke-linecap="round" stroke-linejoin="round" stroke-width="20"/>
<polygon fill="#ffff80" points="1781 412, 1781 387, 1906 387, 1931 412, 1906 437, 1781 437, 1781 412" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="1781" y="412">DBUS[7..0]</text>
<polyline fill="none" points="171 1372, 621 1372" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="221 1172, 171 1172" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="421 1172, 621 1172" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="621 1112, 171 1112" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="621 1312, 521 1312, 521 1172" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="541 892, 171 892" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="871 1142, 921 1142, 921 1012, 471 1012, 471 872, 541 872" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="871 1342, 1121 1342, 1121 742, 1181 742" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<line stroke="#000000" stroke-linecap="round" stroke-width="5" x1="591" x2="541" y1="472" y2="472"/>
<text alignment-baseline="central" fill="#000000" font-family="Courier New" font-size="17" font-weight="400" text-anchor="end" x="624" y="472">A0</text>
<line stroke="#000000" stroke-linecap="round" stroke-width="5" x1="591" x2="541" y1="492" y2="492"/>
<text alignment-baseline="central" fill="#000000" font-family="Courier New" font-size="17" font-weight="400" text-anchor="end" x="624" y="492">A1</text>
<line stroke="#000000" stroke-linecap="round" stroke-width="5" x1="591" x2="541" y1="512" y2="512"/>
<text alignment-baseline="central" fill="#000000" font-family="Courier New" font-size="17" font-weight="400" text-anchor="end" x="624" y="512">A2</text>
<line stroke="#000000" stroke-linecap="round" stroke-width="5" x1="591" x2="541" y1="532" y2="532"/>
<text alignment-baseline="central" fill="#000000" font-family="Courier New" font-size="17" font-weight="400" text-anchor="end" x="624" y="532">A3</text>
<line stroke="#000000" stroke-linecap="round" stroke-width="5" x1="591" x2="541" y1="552" y2="552"/>
<text alignment-baseline="central" fill="#000000" font-family="Courier New" font-size="17" font-weight="400" text-anchor="end" x="624" y="552">A4</text>
<line stroke="#000000" stroke-linecap="round" stroke-width="5" x1="591" x2="541" y1="572" y2="572"/>
<text alignment-baseline="central" fill="#000000" font-family="Courier New" font-size="17" font-weight="400" text-anchor="end" x="624" y="572">A5</text>
<line stroke="#000000" stroke-linecap="round" stroke-width="5" x1="591" x2="541" y1="592" y2="592"/>
<text alignment-baseline="central" fill="#000000" font-family="Courier New" font-size="17" font-weight="400" text-anchor="end" x="624" y="592">A6</text>
<line stroke="#000000" stroke-linecap="round" stroke-width="5" x1="591" x2="541" y1="612" y2="612"/>
<text alignment-baseline="central" fill="#000000" font-family="Courier New" font-size="17" font-weight="400" text-anchor="end" x="624" y="612">A7</text>
<line stroke="#000000" stroke-linecap="round" stroke-width="5" x1="591" x2="541" y1="672" y2="672"/>
<text alignment-baseline="central" fill="#000000" font-family="Courier New" font-size="17" font-weight="400" text-anchor="end" x="624" y="672">D0</text>
<line stroke="#000000" stroke-linecap="round" stroke-width="5" x1="591" x2="541" y1="692" y2="692"/>
<text alignment-baseline="central" fill="#000000" font-family="Courier New" font-size="17" font-weight="400" text-anchor="end" x="624" y="692">D1</text>
<line stroke="#000000" stroke-linecap="round" stroke-width="5" x1="591" x2="541" y1="712" y2="712"/>
<text alignment-baseline="central" fill="#000000" font-family="Courier New" font-size="17" font-weight="400" text-anchor="end" x="624" y="712">D2</text>
<line stroke="#000000" stroke-linecap="round" stroke-width="5" x1="591" x2="541" y1="732" y2="732"/>
<text alignment-baseline="central" fill="#000000" font-family="Courier New" font-size="17" font-weight="400" text-anchor="end" x="624" y="732">D3</text>
<line stroke="#000000" stroke-linecap="round" stroke-width="5" x1="591" x2="541" y1="752" y2="752"/>
<text alignment-baseline="central" fill="#000000" font-family="Courier New" font-size="17" font-weight="400" text-anchor="end" x="624" y="752">D4</text>
<line stroke="#000000" stroke-linecap="round" stroke-width="5" x1="591" x2="541" y1="772" y2="772"/>
<text alignment-baseline="central" fill="#000000" font-family="Courier New" font-size="17" font-weight="400" text-anchor="end" x="624" y="772">D5</text>
<line stroke="#000000" stroke-linecap="round" stroke-width="5" x1="591" x2="541" y1="792" y2="792"/>
<text alignment-baseline="central" fill="#000000" font-family="Courier New" font-size="17" font-weight="400" text-anchor="end" x="624" y="792">D6</text>
<line stroke="#000000" stroke-linecap="round" stroke-width="5" x1="591" x2="541" y1="812" y2="812"/>
<text alignment-baseline="central" fill="#000000" font-family="Courier New" font-size="17" font-weight="400" text-anchor="end" x="624" y="812">D7</text>
<line stroke="#000000" stroke-linecap="round" stroke-width="5" x1="741" x2="791" y1="472" y2="472"/>
<text alignment-baseline="central" fill="#000000" font-family="Courier New" font-size="17" font-weight="400" text-anchor="start" x="708" y="472">Q0</text>
<line stroke="#000000" stroke-linecap="round" stroke-width="5" x1="741" x2="791" y1="492" y2="492"/>
<text alignment-baseline="central" fill="#000000" font-family="Courier New" font-size="17" font-weight="400" text-anchor="start" x="708" y="492">Q1</text>
<line stroke="#000000" stroke-linecap="round" stroke-width="5" x1="741" x2="791" y1="512" y2="512"/>
<text alignment-baseline="central" fill="#000000" font-family="Courier New" font-size="17" font-weight="400" text-anchor="start" x="708" y="512">Q2</text>
<line stroke="#000000" stroke-linecap="round" stroke-width="5" x1="741" x2="791" y1="532" y2="532"/>
<text alignment-baseline="central" fill="#000000" font-family="Courier New" font-size="17" font-weight="400" text-anchor="start" x="708" y="532">Q3</text>
<line stroke="#000000" stroke-linecap="round" stroke-width="5" x1="741" x2="791" y1="552" y2="552"/>
<text alignment-baseline="central" fill="#000000" font-family="Courier New" font-size="17" font-weight="400" text-anchor="start" x="708" y="552">Q4</text>
<line stroke="#000000" stroke-linecap="round" stroke-width="5" x1="741" x2="791" y1="572" y2="572"/>
<text alignment-baseline="central" fill="#000000" font-family="Courier New" font-size="17" font-weight="400" text-anchor="start" x="708" y="572">Q5</text>
<line stroke="#000000" stroke-linecap="round" stroke-width="5" x1="741" x2="791" y1="592" y2="592"/>
<text alignment-baseline="central" fill="#000000" font-family="Courier New" font-size="17" font-weight="400" text-anchor="start" x="708" y="592">Q6</text>
<line stroke="#000000" stroke-linecap="round" stroke-width="5" x1="741" x2="791" y1="612" y2="612"/>
<text alignment-baseline="central" fill="#000000" font-family="Courier New" font-size="17" font-weight="400" text-anchor="start" x="708" y="612">Q7</text>
<line stroke="#000000" stroke-linecap="round" stroke-width="5" x1="581" x2="541" y1="872" y2="872"/>
<text alignment-baseline="central" fill="#000000" font-family="Courier New" font-size="17" font-weight="400" text-anchor="end" x="657" y="872">^W\R</text>
<line stroke="#000000" stroke-linecap="round" stroke-width="5" x1="591" x2="541" y1="892" y2="892"/>
<text alignment-baseline="central" fill="#000000" font-family="Courier New" font-size="17" font-weight="400" text-anchor="end" x="644" y="892">CLK</text>
<rect fill="#ff8057" fill-opacity="0.5" height="490" stroke="#000000" stroke-width="5" width="150" x="591" y="442"/>
<polyline fill="none" points="591 882, 601 892, 591 902" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/>
<circle cx="586" cy="872" fill="none" r="5" stroke="#000000" stroke-width="5"/>
<text alignment-baseline="after-edge" fill="#000000" font-family="Arial" font-size="90" font-weight="700" text-anchor="start" x="551" y="432">RAM</text>
<text alignment-baseline="after-edge" fill="#000000" font-family="Arial" font-size="25" font-weight="700" text-anchor="start" x="611" y="972">256RAM1</text>
<line stroke="#000000" stroke-linecap="round" stroke-width="5" x1="1231" x2="1181" y1="472" y2="472"/>
<text alignment-baseline="central" fill="#000000" font-family="Courier New" font-size="17" font-weight="400" text-anchor="end" x="1264" y="472">A0</text>
<line stroke="#000000" stroke-linecap="round" stroke-width="5" x1="1231" x2="1181" y1="502" y2="502"/>
<text alignment-baseline="central" fill="#000000" font-family="Courier New" font-size="17" font-weight="400" text-anchor="end" x="1264" y="502">A1</text>
<line stroke="#000000" stroke-linecap="round" stroke-width="5" x1="1231" x2="1181" y1="532" y2="532"/>
<text alignment-baseline="central" fill="#000000" font-family="Courier New" font-size="17" font-weight="400" text-anchor="end" x="1264" y="532">A2</text>
<line stroke="#000000" stroke-linecap="round" stroke-width="5" x1="1231" x2="1181" y1="562" y2="562"/>
<text alignment-baseline="central" fill="#000000" font-family="Courier New" font-size="17" font-weight="400" text-anchor="end" x="1264" y="562">A3</text>
<line stroke="#000000" stroke-linecap="round" stroke-width="5" x1="1231" x2="1181" y1="592" y2="592"/>
<text alignment-baseline="central" fill="#000000" font-family="Courier New" font-size="17" font-weight="400" text-anchor="end" x="1264" y="592">A4</text>
<line stroke="#000000" stroke-linecap="round" stroke-width="5" x1="1231" x2="1181" y1="622" y2="622"/>
<text alignment-baseline="central" fill="#000000" font-family="Courier New" font-size="17" font-weight="400" text-anchor="end" x="1264" y="622">A5</text>
<line stroke="#000000" stroke-linecap="round" stroke-width="5" x1="1231" x2="1181" y1="652" y2="652"/>
<text alignment-baseline="central" fill="#000000" font-family="Courier New" font-size="17" font-weight="400" text-anchor="end" x="1264" y="652">A6</text>
<line stroke="#000000" stroke-linecap="round" stroke-width="5" x1="1231" x2="1181" y1="682" y2="682"/>
<text alignment-baseline="central" fill="#000000" font-family="Courier New" font-size="17" font-weight="400" text-anchor="end" x="1264" y="682">A7</text>
<line stroke="#000000" stroke-linecap="round" stroke-width="5" x1="1381" x2="1431" y1="472" y2="472"/>
<text alignment-baseline="central" fill="#000000" font-family="Courier New" font-size="17" font-weight="400" text-anchor="start" x="1348" y="472">D0</text>
<line stroke="#000000" stroke-linecap="round" stroke-width="5" x1="1381" x2="1431" y1="502" y2="502"/>
<text alignment-baseline="central" fill="#000000" font-family="Courier New" font-size="17" font-weight="400" text-anchor="start" x="1348" y="502">D1</text>
<line stroke="#000000" stroke-linecap="round" stroke-width="5" x1="1381" x2="1431" y1="532" y2="532"/>
<text alignment-baseline="central" fill="#000000" font-family="Courier New" font-size="17" font-weight="400" text-anchor="start" x="1348" y="532">D2</text>
<line stroke="#000000" stroke-linecap="round" stroke-width="5" x1="1381" x2="1431" y1="562" y2="562"/>
<text alignment-baseline="central" fill="#000000" font-family="Courier New" font-size="17" font-weight="400" text-anchor="start" x="1348" y="562">D3</text>
<line stroke="#000000" stroke-linecap="round" stroke-width="5" x1="1381" x2="1431" y1="592" y2="592"/>
<text alignment-baseline="central" fill="#000000" font-family="Courier New" font-size="17" font-weight="400" text-anchor="start" x="1348" y="592">D4</text>
<line stroke="#000000" stroke-linecap="round" stroke-width="5" x1="1381" x2="1431" y1="622" y2="622"/>
<text alignment-baseline="central" fill="#000000" font-family="Courier New" font-size="17" font-weight="400" text-anchor="start" x="1348" y="622">D5</text>
<line stroke="#000000" stroke-linecap="round" stroke-width="5" x1="1381" x2="1431" y1="652" y2="652"/>
<text alignment-baseline="central" fill="#000000" font-family="Courier New" font-size="17" font-weight="400" text-anchor="start" x="1348" y="652">D6</text>
<line stroke="#000000" stroke-linecap="round" stroke-width="5" x1="1381" x2="1431" y1="682" y2="682"/>
<text alignment-baseline="central" fill="#000000" font-family="Courier New" font-size="17" font-weight="400" text-anchor="start" x="1348" y="682">D7</text>
<line stroke="#000000" stroke-linecap="round" stroke-width="5" x1="1221" x2="1181" y1="742" y2="742"/>
<text alignment-baseline="central" fill="#000000" font-family="Courier New" font-size="17" font-weight="400" text-anchor="end" x="1275" y="741">^EN</text>
<rect fill="#a0c0ff" fill-opacity="0.5" height="350" stroke="#000000" stroke-width="5" width="150" x="1231" y="432"/>
<circle cx="1226" cy="742" fill="none" r="5" 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="1231" y="422">MEM_gate</text>
<text alignment-baseline="after-edge" fill="#000000" font-family="Arial" font-size="25" font-weight="700" text-anchor="start" x="1231" y="832">BUS_TRANS8</text>
<circle cx="521" cy="1172" fill="#0000ff" r="8" stroke="#0000ff" stroke-width="5"/>
</svg>
# 说明
8086 微机系统的MEM主存储器,存储指令和数据
\ No newline at end of file
/*******************************************************************************
*******************************************************************************/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
typedef unsigned char BYTE;
typedef long BOOL;
#define FALSE 0
#define TRUE 1
#define MAX_LINE_LENGTH 256 // 一行代码最多可以有多少个字符
#define MAX_LINE_COUNT 1024 // 源代码文件最多可以有多少行
#define MAX_MACHINE_CODE_BYTE_COUNT 256 // 源代码编译后最多可以有多少个字节机器码
#define MAX_SYMBOL_LENGTH 64 // 一个符号最多可以包含多少个字符
#define MAX_SYMBOL_COUNT 256 // 源代码文件中最多可以包含多少个符号
#ifndef MAX_PATH
#define MAX_PATH 256 // 文件路径最多可以包含多少个字符
#endif
// 代码行数据库。记录源代码文件中所有代码行的信息(包括注释行、空行)
struct LINE_RECORD
{
char line_string[MAX_LINE_LENGTH]; // 代码行的内容
unsigned long line_num; // 行号
unsigned long address; // 此行代码转换的机器码在映像文件中的地址(偏移)
int machine_code_count; // 此行代码转换的机器码的字节数量
unsigned long flag; // 代码行标志位,32位
};
struct LINE_RECORD line_database[MAX_LINE_COUNT] = { 0 };
int line_count = 0;
int machine_code_line_count = 0; // 记录产生了机器码的代码行的数量
// 在此定义所有的代码行标志位。注意,代码行标志位是按位或的关系。
#define LF_INSTRUCTION 0x00000001 // 代码行标志位的最低位是1,表示此行是一条指令,否则表示此行是数据
// 重定位表。如果指令中使用了标号、变量名等符号,在第一次扫描时无法确定他们的地址,需要
// 在第二次扫描时进行重定位。
struct REALLOCATE
{
unsigned long address; // 第一次扫描时,在这里记录了需要重定位的机器码的地址(偏移),
// 第二次扫描时,根据符号的地址进行重定位。
char symbol_name[MAX_SYMBOL_LENGTH]; // 需要重定位的符号名称。
int line_num; // 行号。
};
struct REALLOCATE reallocate_table[MAX_LINE_COUNT] = { 0 };
int reallocate_count = 0;
// 符号表。符号包括源代码中的标号、变量名。
struct SYMBOL
{
char name[MAX_SYMBOL_LENGTH]; // 符号名称
unsigned long address; // 符号表示的地址。重定位时需要用到。
int machine_code_count; // 符号生成的机器码的数量(以字节为单位)。
int line_num; // 行号
int ref_count; // 引用计数
};
struct SYMBOL symbol_table[MAX_SYMBOL_COUNT] = { 0 };
int symbol_count = 0;
// 汇编过程的状态
enum
{
AS_BEGIN // 起始状态。在遇到代码段名称前,处于此状态
, AS_INT_TABLE // 正在处理中断向量列表。遇到向量列表名称后,遇到代码段名称前,处于此状态
, AS_TEXT // 正在处理代码段。遇到代码段名称后,遇到数据的名称前,处于此状态
, AS_DATA // 正在处理数据段。遇到数据段名称后,处于此状态
};
unsigned long assembler_state = AS_BEGIN;
//
// 在下面定义所有的关键字
//
// 段名称
const char* int_table_section_keyword = ".int_table"; // 中断向量列表标志
const char* code_section_keyword = ".text"; // 代码段标志
char const* data_section_keyword = ".data"; // 数据段标志
// 指令名称
const char* mov_instruction_keyword = "mov";
const char* add_instruction_keyword = "add";
const char* adc_instruction_keyword = "adc";
const char* sub_instruction_keyword = "sub";
const char* sbb_instruction_keyword = "sbb";
const char* and_instruction_keyword = "and";
const char* or_instruction_keyword = "or";
const char* xor_instruction_keyword = "xor";
const char* shr_instruction_keyword = "shr";
const char* shl_instruction_keyword = "shl";
const char* rcr_instruction_keyword = "rcr";
const char* rcl_instruction_keyword = "rcl";
const char* sal_instruction_keyword = "sal";
const char* sar_instruction_keyword = "sar";
const char* rol_instruction_keyword = "rol";
const char* ror_instruction_keyword = "ror";
const char* not_instruction_keyword = "not";
const char* push_instruction_keyword = "push";
const char* pop_instruction_keyword = "pop";
const char* in_instruction_keyword = "in";
const char* out_instruction_keyword = "out";
const char* call_instruction_keyword = "call";
const char* ret_instruction_keyword = "ret";
const char* int_instruction_keyword = "int";
const char* iret_instruction_keyword = "iret";
const char* inc_instruction_keyword = "inc";
const char* dec_instruction_keyword = "dec";
const char* lea_instruction_keyword = "lea";
const char* cmp_instruction_keyword = "cmp";
const char* nop_instruction_keyword = "nop";
const char* cli_instruction_keyword = "cli";
const char* sti_instruction_keyword = "sti";
const char* jmp_instruction_keyword = "jmp";
const char* jc_instruction_keyword = "jc";
const char* jz_instruction_keyword = "jz";
const char* je_instruction_keyword = "je";
const char* jne_instruction_keyword = "jne";
const char* jnz_instruction_keyword = "jnz";
// 通用寄存器名称
const char* al_register_keyword = "al";
const char* bl_register_keyword = "bl";
const char* cl_register_keyword = "cl";
const char* dl_register_keyword = "dl";
const char* sp_register_keyword = "sp";
const char* bp_register_keyword = "bp";
const char* si_register_keyword = "si";
const char* di_register_keyword = "di";
const char* cs_register_keyword = "cs";
const char* ds_register_keyword = "ds";
const char* ss_register_keyword = "ss";
const char* es_register_keyword = "es";
const char* al_register_indirect_keyword = "[al]";
const char* bl_register_indirect_keyword = "[bl]";
const char* cl_register_indirect_keyword = "[cl]";
const char* dl_register_indirect_keyword = "[dl]";
const char* sp_register_indirect_keyword = "[sp]";
const char* bp_register_indirect_keyword = "[bp]";
const char* si_register_indirect_keyword = "[si]";
const char* di_register_indirect_keyword = "[di]";
const char* cs_register_indirect_keyword = "[cs]";
const char* ds_register_indirect_keyword = "[ds]";
const char* ss_register_indirect_keyword = "[ss]";
const char* es_register_indirect_keyword = "[es]";
const char* delimit_char = "\n\t\r "; // 需要忽略的空白字符
const char* delimit_char_comma = "\n\t\r, "; // 需要忽略的空白字符,包括英文逗号
// 汇编产生的机器码
#define MAX_MACHINE_CODE 1024
BYTE machine_code[MAX_MACHINE_CODE];
unsigned long machine_code_address = 0;
unsigned long machine_code_old_address = 0;
const char* assembly_file_name = NULL; // 汇编文件路径
const char* target_file_name = NULL; // 目标文件路径
const char* list_file_name = NULL; // 列表文件路径
const char* dbg_file_name = NULL; // 调试信息文件路径
const unsigned long dbg_file_magic = 58;
const unsigned long dbg_file_version = 1;
// 输出汇编过程中发现的语法错误信息
void error_msg(const char* error_msg, int line_num)
{
if (line_num >= 1)
{
printf("%s:%d: error: %s\n", assembly_file_name, line_num, error_msg);
}
else
{
printf("%s: error: %s\n", assembly_file_name, error_msg);
}
exit(1);
}
char formated_msg[1024]; // 将格式化后的错误信息放在此字符串中。
void error_msg_miss_op(const char* instruction_name, int line_num)
{
sprintf(formated_msg, "%s 指令缺少操作数。", instruction_name);
error_msg(formated_msg, line_num);
}
void error_msg_wrong_op(const char* instruction_name, int line_num)
{
sprintf(formated_msg, "%s 指令不支持这样的操作数。", instruction_name);
error_msg(formated_msg, line_num);
}
void error_msg_same_symbol(const char* symbol, int line_num, int ref_line_num)
{
sprintf(formated_msg, "符号 %s 重复定义。参见第 %d 行。", symbol, ref_line_num);
error_msg(formated_msg, line_num);
}
void error_msg_keyword_symbol(const char* symbol, int line_num)
{
sprintf(formated_msg, "不能使用保留的关键字 %s 作为符号名称。", symbol);
error_msg(formated_msg, line_num);
}
void error_msg_keyword_int_vector(const char* vector, int line_num)
{
sprintf(formated_msg, "不能使用保留的关键字 %s 作为中断向量名称。", vector);
error_msg(formated_msg, line_num);
}
void error_msg_wrong_data(const char* data, int line_num)
{
sprintf(formated_msg, "%s 不是有效的数据。", data);
error_msg(formated_msg, line_num);
}
// 输出汇编过程中发现的警告信息
void warning_msg(const char* warning_msg, int line_num)
{
if (line_num >= 1)
{
printf("%s:%d: warning: %s\n", assembly_file_name, line_num, warning_msg);
}
else
{
printf("%s: warning: %s\n", assembly_file_name, warning_msg);
}
}
void warning_msg_invalid_line(int line_num)
{
warning_msg("忽略无效的代码行。", line_num);
}
void warning_msg_unref_symbol(const char* symbol, int line_num)
{
sprintf(formated_msg, "符号 %s 未被引用。", symbol);
warning_msg(formated_msg, line_num);
}
// 判断是否是立即数。如果是数字开头,或者是负号开头的,就认为是立即数。
int is_immediate(const char* token)
{
return (isdigit(token[0]) || '-' == token[0]) ? 1 : 0;
}
// 判断是否是立即数地址。类如,[4]
int is_immediate_address(const char* token)
{
// 最后一个字符必须是"]"
if (token[strlen(token) - 1] != ']')
{
return 0;
}
// 第一个字符必须是"["
if (token[0] != '[')
{
return 0;
}
// 后面的字符必须是数字开头
return (isdigit(token[1]) || ' ' == token[1]) ? 1 : 0;
}
// 判断是否是主存数据
int is_main_memory(const char* token)
{
return (isdigit(token[0]) || '@' == token[0]) ? 1 : 0;
}
// 指令操作数类型
enum
{
OT_REGISTER_AL // al
, OT_REGISTER_BL // bl
, OT_REGISTER_CL // cl
, OT_REGISTER_DL // dl
, OT_REGISTER_SP // sp
, OT_REGISTER_BP // bp
, OT_REGISTER_SI // si
, OT_REGISTER_DI // di
, OT_REGISTER_CS // cs
, OT_REGISTER_DS // ds
, OT_REGISTER_SS // ss
, OT_REGISTER_ES // es
, OT_REGISTER_AL_INDIRECT // [al]
, OT_REGISTER_BL_INDIRECT // [bl]
, OT_REGISTER_CL_INDIRECT // [cl]
, OT_REGISTER_DL_INDIRECT // [dl]
, OT_REGISTER_SP_INDIRECT // [sp]
, OT_REGISTER_BP_INDIRECT // [bp]
, OT_REGISTER_SI_INDIRECT // [si]
, OT_REGISTER_DI_INDIRECT // [di]
, OT_REGISTER_CS_INDIRECT // [cs]
, OT_REGISTER_DS_INDIRECT // [ds]
, OT_REGISTER_SS_INDIRECT // [ss]
, OT_REGISTER_ES_INDIRECT // [es]
, OT_IMMEDIATE // 立即数
, OT_SYMBOL // 符号
};
// 得到指令操作数的类型
unsigned long get_operand_type(const char* op)
{
unsigned long op_type;
if (stricmp(op, al_register_keyword) == 0)
{
op_type = OT_REGISTER_AL;
}
else if (stricmp(op, bl_register_keyword) == 0)
{
op_type = OT_REGISTER_BL;
}
else if (stricmp(op, cl_register_keyword) == 0)
{
op_type = OT_REGISTER_CL;
}
else if (stricmp(op, dl_register_keyword) == 0)
{
op_type = OT_REGISTER_DL;
}
else if (stricmp(op, sp_register_keyword) == 0)
{
op_type = OT_REGISTER_SP;
}
else if (stricmp(op, bp_register_keyword) == 0)
{
op_type = OT_REGISTER_BP;
}
else if (stricmp(op, si_register_keyword) == 0)
{
op_type = OT_REGISTER_SI;
}
else if (stricmp(op, di_register_keyword) == 0)
{
op_type = OT_REGISTER_DI;
}
else if (stricmp(op, cs_register_keyword) == 0)
{
op_type = OT_REGISTER_CS;
}
else if (stricmp(op, ds_register_keyword) == 0)
{
op_type = OT_REGISTER_DS;
}
else if (stricmp(op, ss_register_keyword) == 0)
{
op_type = OT_REGISTER_SS;
}
else if (stricmp(op, es_register_keyword) == 0)
{
op_type = OT_REGISTER_ES;
}
else if (stricmp(op, al_register_indirect_keyword) == 0)
{
op_type = OT_REGISTER_AL_INDIRECT;
}
else if (stricmp(op, bl_register_indirect_keyword) == 0)
{
op_type = OT_REGISTER_BL_INDIRECT;
}
else if (stricmp(op, cl_register_indirect_keyword) == 0)
{
op_type = OT_REGISTER_CL_INDIRECT;
}
else if (stricmp(op, dl_register_indirect_keyword) == 0)
{
op_type = OT_REGISTER_DL_INDIRECT;
}
else if (stricmp(op, sp_register_indirect_keyword) == 0)
{
op_type = OT_REGISTER_SP_INDIRECT;
}
else if (stricmp(op, bp_register_indirect_keyword) == 0)
{
op_type = OT_REGISTER_BP_INDIRECT;
}
else if (stricmp(op, si_register_indirect_keyword) == 0)
{
op_type = OT_REGISTER_SI_INDIRECT;
}
else if (stricmp(op, di_register_indirect_keyword) == 0)
{
op_type = OT_REGISTER_DI_INDIRECT;
}
else if (stricmp(op, cs_register_indirect_keyword) == 0)
{
op_type = OT_REGISTER_CS_INDIRECT;
}
else if (stricmp(op, ds_register_indirect_keyword) == 0)
{
op_type = OT_REGISTER_DS_INDIRECT;
}
else if (stricmp(op, ss_register_indirect_keyword) == 0)
{
op_type = OT_REGISTER_SS_INDIRECT;
}
else if (stricmp(op, es_register_indirect_keyword) == 0)
{
op_type = OT_REGISTER_ES_INDIRECT;
}
else if (is_immediate(op))
{
op_type = OT_IMMEDIATE;
}
else
{
op_type = OT_SYMBOL;
}
return op_type;
}
// 根据寄存器,得到一个机器码
char get_machine_code_from_r(unsigned long op_type)
{
return (char)(op_type - OT_REGISTER_AL);
}
// 根据通用寄存器和机器码的基础值,得到一个机器码
char get_machine_code_from_r_indirect(unsigned long op_type)
{
return (char)(op_type - OT_REGISTER_AL_INDIRECT);
}
// 根据立即数得到一个机器码。注意,允许使用负数,所以返回值是带符号的 8 位 char。
char get_machine_code_from_immediate(const char* immediate)
{
char* end;
int start_index = (immediate[0] == '-' ? 1 : 0);
int base = (immediate[start_index] == '0' && (immediate[start_index + 1] == 'x' || immediate[start_index + 1] == 'X')) ? 16 : 10;
return (char)strtol(immediate, &end, base);
}
// 根据立即数地址得到一个机器码。首先去除中括号,再将立即数转换为带符号的8位字符。
char get_machine_code_from_immediate_address(const char* immediate)
{
char d[7];
int i = 0;
int t = strlen(immediate);
for (; i < t - 2; i++)
{
d[i] = immediate[i + 1];
}
char* temp;
int base = (immediate[1] == '0' && (immediate[2] == 'x' || immediate[2] == 'X')) ? 16 : 10;
return (char)strtol(d, &temp, base);
}
// 向重定位表中添加一个重定位信息
void add_reallocate(const char* symbol, int line_num)
{
reallocate_table[reallocate_count].address = machine_code_address;
strcpy(reallocate_table[reallocate_count].symbol_name, symbol);
reallocate_table[reallocate_count].line_num = line_num;
reallocate_count++;
}
//////////////////////////////////////////////////////////////////////////////////////
// 汇编指令编译函数
// mov op1, op2
//
void parse_mov(int line_num)
{
char *op1, *op2;
char rs, rd;
unsigned long op1_type, op2_type;
if (assembler_state != AS_TEXT)
{
warning_msg_invalid_line(line_num);
return;
}
op1 = strtok(NULL, delimit_char_comma);
op2 = strtok(NULL, delimit_char);
if (NULL == op1 || NULL == op2)
{
error_msg_miss_op(mov_instruction_keyword, line_num);
}
op1_type = get_operand_type(op1);
op2_type = get_operand_type(op2);
if ((op1_type >= OT_REGISTER_AL && op1_type <= OT_REGISTER_ES)
&& OT_IMMEDIATE == op2_type)
{
// mov reg, immediate
// 操作码
machine_code[machine_code_address] = 0x01;
machine_code_address++;
// reg为目的寄存器操作数
machine_code[machine_code_address] = get_machine_code_from_r(op1_type);
machine_code_address++;
// 立即数机器码
machine_code[machine_code_address] = get_machine_code_from_immediate(op2);
machine_code_address++;
}
else if ((op1_type >= OT_REGISTER_AL && op1_type <= OT_REGISTER_ES)
&& (op2_type >= OT_REGISTER_AL && op2_type <= OT_REGISTER_ES))
{
// mov reg, reg
// 操作码
machine_code[machine_code_address] = 0x02;
machine_code_address++;
// 源操作数寄存器rs
rs = get_machine_code_from_r(op2_type);
rs = rs << 4;
// 目的操作数
rd = get_machine_code_from_r(op1_type);
// 操作数机器码
machine_code[machine_code_address] = rs | rd;
machine_code_address++;
}
else if ((op1_type >= OT_REGISTER_AL && op1_type <= OT_REGISTER_ES) && OT_SYMBOL == op2_type)
{
// mov reg, symbol
// 操作码
machine_code[machine_code_address] = 0x03;
machine_code_address++;
// 目的操作数机器码
machine_code[machine_code_address] = get_machine_code_from_r(op1_type);
machine_code_address++;
// 重定位
add_reallocate(op2, line_num);
machine_code_address++;
}
else if ((op1_type >= OT_REGISTER_AL && op1_type <= OT_REGISTER_ES)
&& (op2_type >= OT_REGISTER_AL_INDIRECT && op2_type <= OT_REGISTER_ES_INDIRECT))
{
// mov reg, [reg]
// 操作码
machine_code[machine_code_address] = 0x04;
machine_code_address++;
// 源操作数寄存器rs
rs = get_machine_code_from_r_indirect(op2_type);
rs = rs << 4;
// 目的操作数
rd = get_machine_code_from_r(op1_type);
// 操作数机器码
machine_code[machine_code_address] = rs | rd;
machine_code_address++;
}
else if ((op1_type >= OT_REGISTER_AL_INDIRECT && op1_type <= OT_REGISTER_ES_INDIRECT)
&& (op2_type >= OT_REGISTER_AL && op2_type <= OT_REGISTER_ES))
{
// mov [reg], reg
// 操作码
machine_code[machine_code_address] = 0x05;
machine_code_address++;
// 源操作数寄存器rs
rs = get_machine_code_from_r(op2_type);
rs = rs << 4;
// 目的操作数
rd = get_machine_code_from_r_indirect(op1_type);
// 操作数机器码
machine_code[machine_code_address] = rs | rd;
machine_code_address++;
}
else if ((op1_type >= OT_REGISTER_AL_INDIRECT && op1_type <= OT_REGISTER_ES_INDIRECT) && OT_IMMEDIATE == op2_type)
{
// mov [reg], immediate
// 操作码
machine_code[machine_code_address] = 0x06;
machine_code_address++;
// 目的操作数
machine_code[machine_code_address] = get_machine_code_from_r_indirect(op1_type);
machine_code_address++;
// 立即数机器码
machine_code[machine_code_address] = get_machine_code_from_immediate(op2);
machine_code_address++;
}
else if (OT_SYMBOL == op1_type && (op2_type >= OT_REGISTER_AL && op2_type <= OT_REGISTER_ES))
{
// mov symbol, reg
machine_code[machine_code_address] = 0x07;
machine_code_address++;
rs = get_machine_code_from_r(op2_type);
rs = rs << 4;
machine_code[machine_code_address] = rs;
machine_code_address++;
// 重定位
add_reallocate(op1, line_num);
machine_code_address++;
}
else
{
error_msg_wrong_op(mov_instruction_keyword, line_num);
}
//
// 在代码行数据库中,标记此行是一个指令行
//
line_database[line_count].flag |= LF_INSTRUCTION;
}
//////////////////////////////////////////////////////////////////////////
// 加法指令
// add op1, op2
void parse_add(int line_num)
{
char *op1, *op2;
char rs, rd;
unsigned long op1_type, op2_type;
if (assembler_state != AS_TEXT)
{
warning_msg_invalid_line(line_num);
return;
}
op1 = strtok(NULL, delimit_char_comma);
op2 = strtok(NULL, delimit_char);
if (NULL == op1 || NULL == op2)
{
error_msg_miss_op(add_instruction_keyword, line_num);
}
op1_type = get_operand_type(op1);
op2_type = get_operand_type(op2);
if ((op1_type >= OT_REGISTER_AL && op1_type <= OT_REGISTER_DI)
&& (op2_type >= OT_REGISTER_AL && op2_type <= OT_REGISTER_DI))
{
// add reg, reg
// 操作码
machine_code[machine_code_address] = 0x08;
machine_code_address++;
// 源操作数寄存器rs
rs = get_machine_code_from_r(op2_type);
rs = rs << 4;
// 目的操作数
rd = get_machine_code_from_r(op1_type);
// 操作数机器码
machine_code[machine_code_address] = rs | rd;
machine_code_address++;
}
else if ((op1_type >= OT_REGISTER_AL && op1_type <= OT_REGISTER_DI)
&& (op2_type >= OT_REGISTER_AL_INDIRECT && op2_type <= OT_REGISTER_DI_INDIRECT))
{
// add reg, [reg]
// 操作码
machine_code[machine_code_address] = 0x0a;
machine_code_address++;
// 源操作数寄存器rs
rs = get_machine_code_from_r_indirect(op2_type);
rs = rs << 4;
// 目的操作数
rd = get_machine_code_from_r(op1_type);
// 操作数机器码
machine_code[machine_code_address] = rs | rd;
machine_code_address++;
}
else if ((op1_type >= OT_REGISTER_AL && op1_type <= OT_REGISTER_DI) && OT_SYMBOL == op2_type)
{
// add reg, symbol
// 操作码
machine_code[machine_code_address] = 0x0c;
machine_code_address++;
//
machine_code[machine_code_address] = get_machine_code_from_r(op1_type);
machine_code_address++;
// 重定位
add_reallocate(op2, line_num);
machine_code_address++;
}
else if ((op1_type >= OT_REGISTER_AL && op1_type <= OT_REGISTER_DI) && OT_IMMEDIATE == op2_type)
{
// add reg, immediate
machine_code[machine_code_address] = 0x0e;
machine_code_address++;
//
machine_code[machine_code_address] = get_machine_code_from_r(op1_type);
machine_code_address++;
// 立即数
machine_code[machine_code_address] = get_machine_code_from_immediate(op2);
machine_code_address++;
}
else
{
error_msg_wrong_op(add_instruction_keyword, line_num);
}
//
// 在代码行数据库中,标记此行是一个指令行
//
line_database[line_count].flag |= LF_INSTRUCTION;
}
///////////////////////////////////////////////////////////////////////////////////////////////////////
// 带进位的加法指令
// adc op1, op2
void parse_adc(int line_num)
{
char *op1, *op2;
char rs, rd;
unsigned long op1_type, op2_type;
if (assembler_state != AS_TEXT)
{
warning_msg_invalid_line(line_num);
return;
}
op1 = strtok(NULL, delimit_char_comma);
op2 = strtok(NULL, delimit_char);
if (NULL == op1 || NULL == op2)
{
error_msg_miss_op(adc_instruction_keyword, line_num);
}
op1_type = get_operand_type(op1);
op2_type = get_operand_type(op2);
if ((op1_type >= OT_REGISTER_AL && op1_type <= OT_REGISTER_DI)
&& (op2_type >= OT_REGISTER_AL && op2_type <= OT_REGISTER_DI))
{
// adc reg, reg
// 操作码
machine_code[machine_code_address] = 0x10;
machine_code_address++;
// 源操作数寄存器rs
rs = get_machine_code_from_r(op2_type);
rs = rs << 4;
// 目的操作数
rd = get_machine_code_from_r(op1_type);
// 操作数机器码
machine_code[machine_code_address] = rs | rd;
machine_code_address++;
}
else if ((op1_type >= OT_REGISTER_AL && op1_type <= OT_REGISTER_DI)
&& (op2_type >= OT_REGISTER_AL_INDIRECT && op2_type <= OT_REGISTER_DI_INDIRECT))
{
// adc reg, [reg]
// 操作码
machine_code[machine_code_address] = 0x12;
machine_code_address++;
// 源操作数寄存器rs
rs = get_machine_code_from_r_indirect(op2_type);
rs = rs << 4;
// 目的操作数
rd = get_machine_code_from_r(op1_type);
// 操作数机器码
machine_code[machine_code_address] = rs | rd;
machine_code_address++;
}
else if ((op1_type >= OT_REGISTER_AL && op1_type <= OT_REGISTER_DI) && OT_SYMBOL == op2_type)
{
// adc reg, symbol
// 操作码
machine_code[machine_code_address] = 0x14;
machine_code_address++;
//
machine_code[machine_code_address] = get_machine_code_from_r(op1_type);
machine_code_address++;
// 重定位
add_reallocate(op2, line_num);
machine_code_address++;
}
else if ((op1_type >= OT_REGISTER_AL && op1_type <= OT_REGISTER_DI) && OT_IMMEDIATE == op2_type)
{
// adc reg, immediate
machine_code[machine_code_address] = 0x16;
machine_code_address++;
//
machine_code[machine_code_address] = get_machine_code_from_r(op1_type);
machine_code_address++;
// 立即数
machine_code[machine_code_address] = get_machine_code_from_immediate(op2);
machine_code_address++;
}
else
{
error_msg_wrong_op(adc_instruction_keyword, line_num);
}
//
// 在代码行数据库中,标记此行是一个指令行
//
line_database[line_count].flag |= LF_INSTRUCTION;
}
////////////////////////////////////////////////////////////////////////////////////////////
// 减法指令
// sub op1, op2
void parse_sub(int line_num)
{
char *op1, *op2;
char rs, rd;
unsigned long op1_type, op2_type;
if (assembler_state != AS_TEXT)
{
warning_msg_invalid_line(line_num);
return;
}
op1 = strtok(NULL, delimit_char_comma);
op2 = strtok(NULL, delimit_char);
if (NULL == op1 || NULL == op2)
{
error_msg_miss_op(sub_instruction_keyword, line_num);
}
op1_type = get_operand_type(op1);
op2_type = get_operand_type(op2);
if ((op1_type >= OT_REGISTER_AL && op1_type <= OT_REGISTER_DI)
&& (op2_type >= OT_REGISTER_AL && op2_type <= OT_REGISTER_DI))
{
// sub reg, reg
// 操作码
machine_code[machine_code_address] = 0x18;
machine_code_address++;
// 源操作数寄存器rs
rs = get_machine_code_from_r(op2_type);
rs = rs << 4;
// 目的操作数
rd = get_machine_code_from_r(op1_type);
// 操作数机器码
machine_code[machine_code_address] = rs | rd;
machine_code_address++;
}
else if ((op1_type >= OT_REGISTER_AL && op1_type <= OT_REGISTER_DI)
&& (op2_type >= OT_REGISTER_AL_INDIRECT && op2_type <= OT_REGISTER_DI_INDIRECT))
{
// sub reg, [reg]
// 操作码
machine_code[machine_code_address] = 0x1a;
machine_code_address++;
// 源操作数寄存器rs
rs = get_machine_code_from_r_indirect(op2_type);
rs = rs << 4;
// 目的操作数
rd = get_machine_code_from_r(op1_type);
// 操作数机器码
machine_code[machine_code_address] = rs | rd;
machine_code_address++;
}
else if ((op1_type >= OT_REGISTER_AL && op1_type <= OT_REGISTER_DI) && OT_SYMBOL == op2_type)
{
// sub reg, symbol
// 操作码
machine_code[machine_code_address] = 0x1c;
machine_code_address++;
//
machine_code[machine_code_address] = get_machine_code_from_r(op1_type);
machine_code_address++;
// 重定位
add_reallocate(op2, line_num);
machine_code_address++;
}
else if ((op1_type >= OT_REGISTER_AL && op1_type <= OT_REGISTER_DI) && OT_IMMEDIATE == op2_type)
{
// sub reg, immediate
machine_code[machine_code_address] = 0x1e;
machine_code_address++;
//
machine_code[machine_code_address] = get_machine_code_from_r(op1_type);
machine_code_address++;
// 立即数
machine_code[machine_code_address] = get_machine_code_from_immediate(op2);
machine_code_address++;
}
else
{
error_msg_wrong_op(sub_instruction_keyword, line_num);
}
//
// 在代码行数据库中,标记此行是一个指令行
//
line_database[line_count].flag |= LF_INSTRUCTION;
}
///////////////////////////////////////////////////////////////////////////////////////////////////////////////
// 借位减法指令
// sbb op1, op2
void parse_sbb(int line_num)
{
char *op1, *op2;
char rs, rd;
unsigned long op1_type, op2_type;
if (assembler_state != AS_TEXT)
{
warning_msg_invalid_line(line_num);
return;
}
op1 = strtok(NULL, delimit_char_comma);
op2 = strtok(NULL, delimit_char);
if (NULL == op1 || NULL == op2)
{
error_msg_miss_op(sbb_instruction_keyword, line_num);
}
op1_type = get_operand_type(op1);
op2_type = get_operand_type(op2);
if ((op1_type >= OT_REGISTER_AL && op1_type <= OT_REGISTER_DI)
&& (op2_type >= OT_REGISTER_AL && op2_type <= OT_REGISTER_DI))
{
// sbb reg, reg
// 操作码
machine_code[machine_code_address] = 0x20;
machine_code_address++;
// 源操作数寄存器rs
rs = get_machine_code_from_r(op2_type);
rs = rs << 4;
// 目的操作数
rd = get_machine_code_from_r(op1_type);
// 操作数机器码
machine_code[machine_code_address] = rs | rd;
machine_code_address++;
}
else if ((op1_type >= OT_REGISTER_AL && op1_type <= OT_REGISTER_DI)
&& (op2_type >= OT_REGISTER_AL_INDIRECT && op2_type <= OT_REGISTER_DI_INDIRECT))
{
// sbb reg, [reg]
// 操作码
machine_code[machine_code_address] = 0x22;
machine_code_address++;
// 源操作数寄存器rs
rs = get_machine_code_from_r_indirect(op2_type);
rs = rs << 4;
// 目的操作数
rd = get_machine_code_from_r(op1_type);
// 操作数机器码
machine_code[machine_code_address] = rs | rd;
machine_code_address++;
}
else if ((op1_type >= OT_REGISTER_AL && op1_type <= OT_REGISTER_DI) && OT_SYMBOL == op2_type)
{
// sbb reg, symbol
// 操作码
machine_code[machine_code_address] = 0x24;
machine_code_address++;
//
machine_code[machine_code_address] = get_machine_code_from_r(op1_type);
machine_code_address++;
// 重定位
add_reallocate(op2, line_num);
machine_code_address++;
}
else if ((op1_type >= OT_REGISTER_AL && op1_type <= OT_REGISTER_DI) && OT_IMMEDIATE == op2_type)
{
// sbb reg, immediate
machine_code[machine_code_address] = 0x26;
machine_code_address++;
//
machine_code[machine_code_address] = get_machine_code_from_r(op1_type);
machine_code_address++;
// 立即数
machine_code[machine_code_address] = get_machine_code_from_immediate(op2);
machine_code_address++;
}
else
{
error_msg_wrong_op(sbb_instruction_keyword, line_num);
}
//
// 在代码行数据库中,标记此行是一个指令行
//
line_database[line_count].flag |= LF_INSTRUCTION;
}
/////////////////////////////////////////////////////////////////////////////////////////
// 增减1指令
// inc reg
void parse_inc(int line_num)
{
char *op;
unsigned long op_type;
if (assembler_state != AS_TEXT)
{
warning_msg_invalid_line(line_num);
return;
}
op = strtok(NULL, delimit_char);
if (NULL == op)
{
error_msg_miss_op(inc_instruction_keyword, line_num);
}
op_type = get_operand_type(op);
if (op_type >= OT_REGISTER_AL && op_type <= OT_REGISTER_DI)
{
//
machine_code[machine_code_address] = 0x78;
machine_code_address++;
//
machine_code[machine_code_address] = get_machine_code_from_r(op_type);
machine_code_address++;
}
else
{
error_msg_wrong_op(inc_instruction_keyword, line_num);
}
//
// 在代码行数据库中,标记此行是一个指令行
//
line_database[line_count].flag |= LF_INSTRUCTION;
}
// dec reg
void parse_dec(int line_num)
{
char *op;
unsigned long op_type;
if (assembler_state != AS_TEXT)
{
warning_msg_invalid_line(line_num);
return;
}
op = strtok(NULL, delimit_char);
if (NULL == op)
{
error_msg_miss_op(dec_instruction_keyword, line_num);
}
op_type = get_operand_type(op);
if (op_type >= OT_REGISTER_AL && op_type <= OT_REGISTER_DI)
{
//
machine_code[machine_code_address] = 0x79;
machine_code_address++;
//
machine_code[machine_code_address] = get_machine_code_from_r(op_type);
machine_code_address++;
}
else
{
error_msg_wrong_op(dec_instruction_keyword, line_num);
}
//
// 在代码行数据库中,标记此行是一个指令行
//
line_database[line_count].flag |= LF_INSTRUCTION;
}
//////////////////////////////////////////////////////////////////////////////////////////////
// 按位与指令
// and op1, op2
void parse_and(int line_num)
{
char *op1, *op2;
char rs, rd;
unsigned long op1_type, op2_type;
if (assembler_state != AS_TEXT)
{
warning_msg_invalid_line(line_num);
return;
}
op1 = strtok(NULL, delimit_char_comma);
op2 = strtok(NULL, delimit_char);
if (NULL == op1 || NULL == op2)
{
error_msg_miss_op(and_instruction_keyword, line_num);
}
op1_type = get_operand_type(op1);
op2_type = get_operand_type(op2);
if ((op1_type >= OT_REGISTER_AL && op1_type <= OT_REGISTER_DI)
&& (op2_type >= OT_REGISTER_AL && op2_type <= OT_REGISTER_DI))
{
// and reg, reg
// 操作码
machine_code[machine_code_address] = 0x2a;
machine_code_address++;
// 源操作数寄存器rs
rs = get_machine_code_from_r(op2_type);
rs = rs << 4;
// 目的操作数
rd = get_machine_code_from_r(op1_type);
// 操作数机器码
machine_code[machine_code_address] = rs | rd;
machine_code_address++;
}
else if ((op1_type >= OT_REGISTER_AL && op1_type <= OT_REGISTER_DI)
&& (op2_type >= OT_REGISTER_AL_INDIRECT && op2_type <= OT_REGISTER_DI_INDIRECT))
{
// and reg, [reg]
// 操作码
machine_code[machine_code_address] = 0x2c;
machine_code_address++;
// 源操作数寄存器rs
rs = get_machine_code_from_r_indirect(op2_type);
rs = rs << 4;
// 目的操作数
rd = get_machine_code_from_r(op1_type);
// 操作数机器码
machine_code[machine_code_address] = rs | rd;
machine_code_address++;
}
else if ((op1_type >= OT_REGISTER_AL && op1_type <= OT_REGISTER_DI) && OT_SYMBOL == op2_type)
{
// and reg, symbol
// 操作码
machine_code[machine_code_address] = 0x2e;
machine_code_address++;
//
machine_code[machine_code_address] = get_machine_code_from_r(op1_type);
machine_code_address++;
// 重定位
add_reallocate(op2, line_num);
machine_code_address++;
}
else if ((op1_type >= OT_REGISTER_AL && op1_type <= OT_REGISTER_DI) && OT_IMMEDIATE == op2_type)
{
// and reg, immediate
machine_code[machine_code_address] = 0x30;
machine_code_address++;
//
machine_code[machine_code_address] = get_machine_code_from_r(op1_type);
machine_code_address++;
// 立即数
machine_code[machine_code_address] = get_machine_code_from_immediate(op2);
machine_code_address++;
}
else
{
error_msg_wrong_op(and_instruction_keyword, line_num);
}
//
// 在代码行数据库中,标记此行是一个指令行
//
line_database[line_count].flag |= LF_INSTRUCTION;
}
/////////////////////////////////////////////////////////////////////////////////////
// 按位或指令
// or op1, op2
void parse_or(int line_num)
{
char *op1, *op2;
char rs, rd;
unsigned long op1_type, op2_type;
if (assembler_state != AS_TEXT)
{
warning_msg_invalid_line(line_num);
return;
}
op1 = strtok(NULL, delimit_char_comma);
op2 = strtok(NULL, delimit_char);
if (NULL == op1 || NULL == op2)
{
error_msg_miss_op(or_instruction_keyword, line_num);
}
op1_type = get_operand_type(op1);
op2_type = get_operand_type(op2);
if ((op1_type >= OT_REGISTER_AL && op1_type <= OT_REGISTER_DI)
&& (op2_type >= OT_REGISTER_AL && op2_type <= OT_REGISTER_DI))
{
// or reg, reg
// 操作码
machine_code[machine_code_address] = 0x32;
machine_code_address++;
// 源操作数寄存器rs
rs = get_machine_code_from_r(op2_type);
rs = rs << 4;
// 目的操作数
rd = get_machine_code_from_r(op1_type);
// 操作数机器码
machine_code[machine_code_address] = rs | rd;
machine_code_address++;
}
else if ((op1_type >= OT_REGISTER_AL && op1_type <= OT_REGISTER_DI)
&& (op2_type >= OT_REGISTER_AL_INDIRECT && op2_type <= OT_REGISTER_DI_INDIRECT))
{
// or reg, [reg]
// 操作码
machine_code[machine_code_address] = 0x34;
machine_code_address++;
// 源操作数寄存器rs
rs = get_machine_code_from_r_indirect(op2_type);
rs = rs << 4;
// 目的操作数
rd = get_machine_code_from_r(op1_type);
// 操作数机器码
machine_code[machine_code_address] = rs | rd;
machine_code_address++;
}
else if ((op1_type >= OT_REGISTER_AL && op1_type <= OT_REGISTER_DI) && OT_SYMBOL == op2_type)
{
// or reg, symbol
// 操作码
machine_code[machine_code_address] = 0x36;
machine_code_address++;
//
machine_code[machine_code_address] = get_machine_code_from_r(op1_type);
machine_code_address++;
// 重定位
add_reallocate(op2, line_num);
machine_code_address++;
}
else if ((op1_type >= OT_REGISTER_AL && op1_type <= OT_REGISTER_DI) && OT_IMMEDIATE == op2_type)
{
// or reg, immediate
machine_code[machine_code_address] = 0x38;
machine_code_address++;
//
machine_code[machine_code_address] = get_machine_code_from_r(op1_type);
machine_code_address++;
// 立即数
machine_code[machine_code_address] = get_machine_code_from_immediate(op2);
machine_code_address++;
}
else
{
error_msg_wrong_op(or_instruction_keyword, line_num);
}
//
// 在代码行数据库中,标记此行是一个指令行
//
line_database[line_count].flag |= LF_INSTRUCTION;
}
/////////////////////////////////////////////////////////////////////////////////////
// 按位异或指令
// xor op1, op2
void parse_xor(int line_num)
{
char *op1, *op2;
char rs, rd;
unsigned long op1_type, op2_type;
if (assembler_state != AS_TEXT)
{
warning_msg_invalid_line(line_num);
return;
}
op1 = strtok(NULL, delimit_char_comma);
op2 = strtok(NULL, delimit_char);
if (NULL == op1 || NULL == op2)
{
error_msg_miss_op(xor_instruction_keyword, line_num);
}
op1_type = get_operand_type(op1);
op2_type = get_operand_type(op2);
if ((op1_type >= OT_REGISTER_AL && op1_type <= OT_REGISTER_DI)
&& (op2_type >= OT_REGISTER_AL && op2_type <= OT_REGISTER_DI))
{
// xor reg, reg
// 操作码
machine_code[machine_code_address] = 0x3a;
machine_code_address++;
// 源操作数寄存器rs
rs = get_machine_code_from_r(op2_type);
rs = rs << 4;
// 目的操作数
rd = get_machine_code_from_r(op1_type);
// 操作数机器码
machine_code[machine_code_address] = rs | rd;
machine_code_address++;
}
else if ((op1_type >= OT_REGISTER_AL && op1_type <= OT_REGISTER_DI)
&& (op2_type >= OT_REGISTER_AL_INDIRECT && op2_type <= OT_REGISTER_DI_INDIRECT))
{
// xor reg, [reg]
// 操作码
machine_code[machine_code_address] = 0x3c;
machine_code_address++;
// 源操作数寄存器rs
rs = get_machine_code_from_r_indirect(op2_type);
rs = rs << 4;
// 目的操作数
rd = get_machine_code_from_r(op1_type);
// 操作数机器码
machine_code[machine_code_address] = rs | rd;
machine_code_address++;
}
else if ((op1_type >= OT_REGISTER_AL && op1_type <= OT_REGISTER_DI) && OT_SYMBOL == op2_type)
{
// xor reg, symbol
// 操作码
machine_code[machine_code_address] = 0x3e;
machine_code_address++;
//
machine_code[machine_code_address] = get_machine_code_from_r(op1_type);
machine_code_address++;
// 重定位
add_reallocate(op2, line_num);
machine_code_address++;
}
else if ((op1_type >= OT_REGISTER_AL && op1_type <= OT_REGISTER_DI) && OT_IMMEDIATE == op2_type)
{
// xor reg, immediate
machine_code[machine_code_address] = 0x40;
machine_code_address++;
//
machine_code[machine_code_address] = get_machine_code_from_r(op1_type);
machine_code_address++;
// 立即数
machine_code[machine_code_address] = get_machine_code_from_immediate(op2);
machine_code_address++;
}
else
{
error_msg_wrong_op(xor_instruction_keyword, line_num);
}
//
// 在代码行数据库中,标记此行是一个指令行
//
line_database[line_count].flag |= LF_INSTRUCTION;
}
////////////////////////////////////////////////////
//
// push reg
void parse_push(int line_num)
{
char *op;
unsigned long op_type;
if (assembler_state != AS_TEXT)
{
warning_msg_invalid_line(line_num);
return;
}
op = strtok(NULL, delimit_char_comma);
if (NULL == op)
{
error_msg_miss_op(push_instruction_keyword, line_num);
}
op_type = get_operand_type(op);
if (op_type >= OT_REGISTER_AL && op_type <= OT_REGISTER_ES)
{
machine_code[machine_code_address] = 0x42;
machine_code_address++;
//
machine_code[machine_code_address] = get_machine_code_from_r(op_type);
machine_code_address++;
}
else
{
error_msg_wrong_op(push_instruction_keyword, line_num);
}
//
// 在代码行数据库中,标记此行是一个指令行
//
line_database[line_count].flag |= LF_INSTRUCTION;
}
/////////////////////////////////////////////////////////////////
//
// pop reg
void parse_pop(int line_num)
{
char *op;
unsigned long op_type;
if (assembler_state != AS_TEXT)
{
warning_msg_invalid_line(line_num);
return;
}
op = strtok(NULL, delimit_char_comma);
if (NULL == op)
{
error_msg_miss_op(pop_instruction_keyword, line_num);
}
op_type = get_operand_type(op);
if (op_type >= OT_REGISTER_AL && op_type <= OT_REGISTER_ES)
{
machine_code[machine_code_address] = 0x43;
machine_code_address++;
//
machine_code[machine_code_address] = get_machine_code_from_r(op_type);
machine_code_address++;
}
else
{
error_msg_wrong_op(pop_instruction_keyword, line_num);
}
//
// 在代码行数据库中,标记此行是一个指令行
//
line_database[line_count].flag |= LF_INSTRUCTION;
}
//////////////////////////////////////////////////////////////////////////
//
// not reg
void parse_not(int line_num)
{
char *op;
unsigned long op_type;
if (assembler_state != AS_TEXT)
{
warning_msg_invalid_line(line_num);
return;
}
op = strtok(NULL, delimit_char);
if (NULL == op)
{
error_msg_miss_op(not_instruction_keyword, line_num);
}
op_type = get_operand_type(op);
// 目标操作数只能是通用寄存器
if (op_type >= OT_REGISTER_AL && op_type <= OT_REGISTER_DI)
{
machine_code[machine_code_address] = 0x44;
machine_code_address++;
//
machine_code[machine_code_address] = get_machine_code_from_r(op_type);
machine_code_address++;
}
else
{
error_msg_wrong_op(not_instruction_keyword, line_num);
}
//
// 在代码行数据库中,标记此行是一个指令行
//
line_database[line_count].flag |= LF_INSTRUCTION;
}
//////////////////////////////////////////////////////////////////////
//
// cmp op1, op2
void parse_cmp(int line_num)
{
char *op1, *op2;
char rs, rd;
unsigned long op1_type, op2_type;
if (assembler_state != AS_TEXT)
{
warning_msg_invalid_line(line_num);
return;
}
op1 = strtok(NULL, delimit_char_comma);
op2 = strtok(NULL, delimit_char);
if (NULL == op1 || NULL == op2)
{
error_msg_miss_op(cmp_instruction_keyword, line_num);
}
op1_type = get_operand_type(op1);
op2_type = get_operand_type(op2);
if ((op1_type >= OT_REGISTER_AL && op1_type <= OT_REGISTER_DI) && OT_IMMEDIATE == op2_type)
{
// cmp reg, immediate
machine_code[machine_code_address] = 0x47;
machine_code_address++;
//
machine_code[machine_code_address] = get_machine_code_from_r(op1_type);
machine_code_address++;
// 立即数
machine_code[machine_code_address] = get_machine_code_from_immediate(op2);
machine_code_address++;
}
else if ((op1_type >= OT_REGISTER_AL && op1_type <= OT_REGISTER_DI)
&& (op2_type >= OT_REGISTER_AL && op2_type <= OT_REGISTER_DI))
{
// cmp reg, reg
// 操作码
machine_code[machine_code_address] = 0x49;
machine_code_address++;
// 源操作数寄存器rs
rs = get_machine_code_from_r(op2_type);
rs = rs << 4;
// 目的操作数
rd = get_machine_code_from_r(op1_type);
// 操作数机器码
machine_code[machine_code_address] = rs | rd;
machine_code_address++;
}
else
{
error_msg_wrong_op(xor_instruction_keyword, line_num);
}
//
// 在代码行数据库中,标记此行是一个指令行
//
line_database[line_count].flag |= LF_INSTRUCTION;
}
//////////////////////////////////////////////////////////////
//
// 接口访问指令
// in op1, op2
void parse_in(int line_num)
{
char *op1, *op2;
char rs, rd;
unsigned long op1_type, op2_type;
if (assembler_state != AS_TEXT)
{
warning_msg_invalid_line(line_num);
return;
}
op1 = strtok(NULL, delimit_char_comma);
op2 = strtok(NULL, delimit_char);
if (NULL == op1 || NULL == op2)
{
error_msg_miss_op(in_instruction_keyword, line_num);
}
op1_type = get_operand_type(op1);
op2_type = get_operand_type(op2);
if (OT_REGISTER_AL == op1_type && OT_IMMEDIATE == op2_type)
{
// in al, imm
machine_code[machine_code_address] = 0x4b;
machine_code_address++;
//
machine_code[machine_code_address] = get_machine_code_from_r(op1_type);
machine_code_address++;
machine_code[machine_code_address] = get_machine_code_from_immediate(op2);
machine_code_address++;
}
else if (OT_REGISTER_AL == op1_type && OT_REGISTER_DL == op2_type)
{
// in al, dl
machine_code[machine_code_address] = 0x4c;
machine_code_address++;
//
rs = get_machine_code_from_r(op2_type);
rs = rs << 4;
rd = get_machine_code_from_r(op1_type);
machine_code[machine_code_address] = rs | rd;
machine_code_address++;
}
else
{
error_msg_wrong_op(in_instruction_keyword, line_num);
}
//
// 在代码行数据库中,标记此行是一个指令行
//
line_database[line_count].flag |= LF_INSTRUCTION;
}
// out op1, op2
void parse_out(int line_num)
{
char *op1, *op2;
char rs, rd;
unsigned long op1_type, op2_type;
if (assembler_state != AS_TEXT)
{
warning_msg_invalid_line(line_num);
return;
}
op1 = strtok(NULL, delimit_char_comma);
op2 = strtok(NULL, delimit_char);
if (NULL == op1 || NULL == op2)
{
error_msg_miss_op(out_instruction_keyword, line_num);
}
op1_type = get_operand_type(op1);
op2_type = get_operand_type(op2);
if (OT_REGISTER_DL == op1_type && OT_REGISTER_AL == op2_type)
{
// out dl, al
machine_code[machine_code_address] = 0x4d;
machine_code_address++;
//
rs = get_machine_code_from_r(op2_type);
rs = rs << 4;
rd = get_machine_code_from_r(op1_type);
machine_code[machine_code_address] = rs | rd;
machine_code_address++;
}
else if (OT_IMMEDIATE == op1_type && OT_REGISTER_AL == op2_type)
{
// out imm, al
machine_code[machine_code_address] = 0x4e;
machine_code_address++;
//
machine_code[machine_code_address] = get_machine_code_from_r(op2_type);
machine_code_address++;
machine_code[machine_code_address] = get_machine_code_from_immediate(op1);
machine_code_address++;
}
else
{
error_msg_wrong_op(out_instruction_keyword, line_num);
}
//
// 在代码行数据库中,标记此行是一个指令行
//
line_database[line_count].flag |= LF_INSTRUCTION;
}
///////////////////////////////////////////////////////
//
// lea reg, symbol
void parse_lea(int line_num)
{
char *op1, *op2;
unsigned long op1_type, op2_type;
if (assembler_state != AS_TEXT)
{
warning_msg_invalid_line(line_num);
return;
}
op1 = strtok(NULL, delimit_char_comma);
op2 = strtok(NULL, delimit_char);
if (NULL == op1 || NULL == op2)
{
error_msg_miss_op(lea_instruction_keyword, line_num);
}
op1_type = get_operand_type(op1);
op2_type = get_operand_type(op2);
if ((op1_type >= OT_REGISTER_AL && op1_type <= OT_REGISTER_DI) && OT_SYMBOL == op2_type)
{
// lea reg, symbol
machine_code[machine_code_address] = 0x4f;
machine_code_address++;
machine_code[machine_code_address] = get_machine_code_from_r(op1_type);
machine_code_address++;
// 重定位
add_reallocate(op2, line_num);
machine_code_address++;
}
else
{
error_msg_wrong_op(lea_instruction_keyword, line_num);
}
//
// 在代码行数据库中,标记此行是一个指令行
//
line_database[line_count].flag |= LF_INSTRUCTION;
}
//////////////////////////////////////////////////////
//
// jz/je symbol
void parse_jz(int line_num)
{
char *op;
unsigned long op_type;
if (assembler_state != AS_TEXT)
{
warning_msg_invalid_line(line_num);
return;
}
op = strtok(NULL, delimit_char);
if (NULL == op)
{
error_msg_miss_op(jz_instruction_keyword, line_num);
}
op_type = get_operand_type(op);
if (OT_SYMBOL == op_type)
{
// jz symbol
machine_code[machine_code_address] = 0x54;
machine_code_address++;
// 重定位
add_reallocate(op, line_num);
machine_code_address++;
}
else
{
error_msg_wrong_op(jz_instruction_keyword, line_num);
}
//
// 在代码行数据库中,标记此行是一个指令行
//
line_database[line_count].flag |= LF_INSTRUCTION;
}
//////////////////////////////////////////////////////
//
// jnz/jne symbol
void parse_jnz(int line_num)
{
char *op;
unsigned long op_type;
if (assembler_state != AS_TEXT)
{
warning_msg_invalid_line(line_num);
return;
}
op = strtok(NULL, delimit_char);
if (NULL == op)
{
error_msg_miss_op(jnz_instruction_keyword, line_num);
}
op_type = get_operand_type(op);
if (OT_SYMBOL == op_type)
{
machine_code[machine_code_address] = 0x55;
machine_code_address++;
// 重定位
add_reallocate(op, line_num);
machine_code_address++;
}
else
{
error_msg_wrong_op(jnz_instruction_keyword, line_num);
}
//
// 在代码行数据库中,标记此行是一个指令行
//
line_database[line_count].flag |= LF_INSTRUCTION;
}
//////////////////////////////////////////////////////
//
// jc symbol
void parse_jc(int line_num)
{
char *op;
unsigned long op_type;
if (assembler_state != AS_TEXT)
{
warning_msg_invalid_line(line_num);
return;
}
op = strtok(NULL, delimit_char);
if (NULL == op)
{
error_msg_miss_op(jc_instruction_keyword, line_num);
}
op_type = get_operand_type(op);
if (OT_SYMBOL == op_type)
{
machine_code[machine_code_address] = 0x56;
machine_code_address++;
// 重定位
add_reallocate(op, line_num);
machine_code_address++;
}
else
{
error_msg_wrong_op(jc_instruction_keyword, line_num);
}
//
// 在代码行数据库中,标记此行是一个指令行
//
line_database[line_count].flag |= LF_INSTRUCTION;
}
//////////////////////////////////////////////////////////
// jmp symbol
void parse_jmp(int line_num)
{
char *op;
unsigned long op_type;
if (assembler_state != AS_TEXT)
{
warning_msg_invalid_line(line_num);
return;
}
op = strtok(NULL, delimit_char);
if (NULL == op)
{
error_msg_miss_op(jmp_instruction_keyword, line_num);
}
op_type = get_operand_type(op);
if (OT_SYMBOL == op_type)
{
// jmp symbol
machine_code[machine_code_address] = 0x57;
machine_code_address++;
// 重定位
add_reallocate(op, line_num);
machine_code_address++;
}
else
{
error_msg_wrong_op(jmp_instruction_keyword, line_num);
}
//
// 在代码行数据库中,标记此行是一个指令行
//
line_database[line_count].flag |= LF_INSTRUCTION;
}
////////////////////////////////////////////////////////////////////////////////////
//
// int immediate
void parse_int(int line_num)
{
char *op;
unsigned long op_type;
if (assembler_state != AS_TEXT)
{
warning_msg_invalid_line(line_num);
return;
}
op = strtok(NULL, delimit_char);
if (NULL == op)
{
error_msg_miss_op(int_instruction_keyword, line_num);
}
op_type = get_operand_type(op);
if (OT_IMMEDIATE == op_type)
{
// int immediate
machine_code[machine_code_address] = 0x5a;
machine_code_address++;
//
machine_code[machine_code_address] = 0xB4;
machine_code_address++;
machine_code[machine_code_address] = get_machine_code_from_immediate(op);
machine_code_address++;
}
else
{
error_msg_wrong_op(int_instruction_keyword, line_num);
}
//
// 在代码行数据库中,标记此行是一个指令行
//
line_database[line_count].flag |= LF_INSTRUCTION;
}
// iret
void parse_iret(int line_num)
{
machine_code[machine_code_address] = 0x5d;
machine_code_address++;
//
machine_code[machine_code_address] = 0x44;
machine_code_address++;
//
// 在代码行数据库中,标记此行是一个指令行
//
line_database[line_count].flag |= LF_INSTRUCTION;
}
/////////////////////////////////////////////////////////////////
//
// 移位指令
// sal op1, op2
void parse_sal(int line_num)
{
char *op1, *op2;
char rs, rd;
unsigned long op1_type, op2_type;
if (assembler_state != AS_TEXT)
{
warning_msg_invalid_line(line_num);
return;
}
op1 = strtok(NULL, delimit_char_comma);
op2 = strtok(NULL, delimit_char);
if (NULL == op1 || NULL == op2)
{
error_msg_miss_op(sal_instruction_keyword, line_num);
}
op1_type = get_operand_type(op1);
op2_type = get_operand_type(op2);
if ((op1_type >= OT_REGISTER_AL && op1_type <= OT_REGISTER_DI)
&& (op2_type >= OT_REGISTER_AL && op2_type <= OT_REGISTER_DI))
{
// 操作码
machine_code[machine_code_address] = 0x5f;
machine_code_address++;
// 源操作数寄存器rs
rs = get_machine_code_from_r(op2_type);
rs = rs << 4;
// 目的操作数
rd = get_machine_code_from_r(op1_type);
// 操作数机器码
machine_code[machine_code_address] = rs | rd;
machine_code_address++;
}
else
{
error_msg_wrong_op(sal_instruction_keyword, line_num);
}
//
// 在代码行数据库中,标记此行是一个指令行
//
line_database[line_count].flag |= LF_INSTRUCTION;
}
// sar op1, op2
void parse_sar(int line_num)
{
char *op1, *op2;
char rs, rd;
unsigned long op1_type, op2_type;
if (assembler_state != AS_TEXT)
{
warning_msg_invalid_line(line_num);
return;
}
op1 = strtok(NULL, delimit_char_comma);
op2 = strtok(NULL, delimit_char);
if (NULL == op1 || NULL == op2)
{
error_msg_miss_op(sar_instruction_keyword, line_num);
}
op1_type = get_operand_type(op1);
op2_type = get_operand_type(op2);
if ((op1_type >= OT_REGISTER_AL && op1_type <= OT_REGISTER_DI)
&& (op2_type >= OT_REGISTER_AL && op2_type <= OT_REGISTER_DI))
{
// 操作码
machine_code[machine_code_address] = 0x61;
machine_code_address++;
// 源操作数寄存器rs
rs = get_machine_code_from_r(op2_type);
rs = rs << 4;
// 目的操作数
rd = get_machine_code_from_r(op1_type);
// 操作数机器码
machine_code[machine_code_address] = rs | rd;
machine_code_address++;
}
else
{
error_msg_wrong_op(sar_instruction_keyword, line_num);
}
//
// 在代码行数据库中,标记此行是一个指令行
//
line_database[line_count].flag |= LF_INSTRUCTION;
}
// shl op1, op2
void parse_shl(int line_num)
{
char *op1, *op2;
char rs, rd;
unsigned long op1_type, op2_type;
if (assembler_state != AS_TEXT)
{
warning_msg_invalid_line(line_num);
return;
}
op1 = strtok(NULL, delimit_char_comma);
op2 = strtok(NULL, delimit_char);
if (NULL == op1 || NULL == op2)
{
error_msg_miss_op(shl_instruction_keyword, line_num);
}
op1_type = get_operand_type(op1);
op2_type = get_operand_type(op2);
if ((op1_type >= OT_REGISTER_AL && op1_type <= OT_REGISTER_DI)
&& (op2_type >= OT_REGISTER_AL && op2_type <= OT_REGISTER_DI))
{
// 操作码
machine_code[machine_code_address] = 0x63;
machine_code_address++;
// 源操作数寄存器rs
rs = get_machine_code_from_r(op2_type);
rs = rs << 4;
// 目的操作数
rd = get_machine_code_from_r(op1_type);
// 操作数机器码
machine_code[machine_code_address] = rs | rd;
machine_code_address++;
}
else
{
error_msg_wrong_op(shl_instruction_keyword, line_num);
}
//
// 在代码行数据库中,标记此行是一个指令行
//
line_database[line_count].flag |= LF_INSTRUCTION;
}
// shr op1, op2
void parse_shr(int line_num)
{
char *op1, *op2;
char rs, rd;
unsigned long op1_type, op2_type;
if (assembler_state != AS_TEXT)
{
warning_msg_invalid_line(line_num);
return;
}
op1 = strtok(NULL, delimit_char_comma);
op2 = strtok(NULL, delimit_char);
if (NULL == op1 || NULL == op2)
{
error_msg_miss_op(shr_instruction_keyword, line_num);
}
op1_type = get_operand_type(op1);
op2_type = get_operand_type(op2);
if ((op1_type >= OT_REGISTER_AL && op1_type <= OT_REGISTER_DI)
&& (op2_type >= OT_REGISTER_AL && op2_type <= OT_REGISTER_DI))
{
// 操作码
machine_code[machine_code_address] = 0x65;
machine_code_address++;
// 源操作数寄存器rs
rs = get_machine_code_from_r(op2_type);
rs = rs << 4;
// 目的操作数
rd = get_machine_code_from_r(op1_type);
// 操作数机器码
machine_code[machine_code_address] = rs | rd;
machine_code_address++;
}
else
{
error_msg_wrong_op(shr_instruction_keyword, line_num);
}
//
// 在代码行数据库中,标记此行是一个指令行
//
line_database[line_count].flag |= LF_INSTRUCTION;
}
// rol op1, op2
void parse_rol(int line_num)
{
char *op1, *op2;
char rs, rd;
unsigned long op1_type, op2_type;
if (assembler_state != AS_TEXT)
{
warning_msg_invalid_line(line_num);
return;
}
op1 = strtok(NULL, delimit_char_comma);
op2 = strtok(NULL, delimit_char);
if (NULL == op1 || NULL == op2)
{
error_msg_miss_op(rol_instruction_keyword, line_num);
}
op1_type = get_operand_type(op1);
op2_type = get_operand_type(op2);
if ((op1_type >= OT_REGISTER_AL && op1_type <= OT_REGISTER_DI)
&& (op2_type >= OT_REGISTER_AL && op2_type <= OT_REGISTER_DI))
{
// 操作码
machine_code[machine_code_address] = 0x67;
machine_code_address++;
// 源操作数寄存器rs
rs = get_machine_code_from_r(op2_type);
rs = rs << 4;
// 目的操作数
rd = get_machine_code_from_r(op1_type);
// 操作数机器码
machine_code[machine_code_address] = rs | rd;
machine_code_address++;
}
else
{
error_msg_wrong_op(rol_instruction_keyword, line_num);
}
//
// 在代码行数据库中,标记此行是一个指令行
//
line_database[line_count].flag |= LF_INSTRUCTION;
}
// ror op1, op2
void parse_ror(int line_num)
{
char *op1, *op2;
char rs, rd;
unsigned long op1_type, op2_type;
if (assembler_state != AS_TEXT)
{
warning_msg_invalid_line(line_num);
return;
}
op1 = strtok(NULL, delimit_char_comma);
op2 = strtok(NULL, delimit_char);
if (NULL == op1 || NULL == op2)
{
error_msg_miss_op(ror_instruction_keyword, line_num);
}
op1_type = get_operand_type(op1);
op2_type = get_operand_type(op2);
if ((op1_type >= OT_REGISTER_AL && op1_type <= OT_REGISTER_DI)
&& (op2_type >= OT_REGISTER_AL && op2_type <= OT_REGISTER_DI))
{
// 操作码
machine_code[machine_code_address] = 0x69;
machine_code_address++;
// 源操作数寄存器rs
rs = get_machine_code_from_r(op2_type);
rs = rs << 4;
// 目的操作数
rd = get_machine_code_from_r(op1_type);
// 操作数机器码
machine_code[machine_code_address] = rs | rd;
machine_code_address++;
}
else
{
error_msg_wrong_op(ror_instruction_keyword, line_num);
}
//
// 在代码行数据库中,标记此行是一个指令行
//
line_database[line_count].flag |= LF_INSTRUCTION;
}
// rcl op1, op2
void parse_rcl(int line_num)
{
char *op1, *op2;
char rs, rd;
unsigned long op1_type, op2_type;
if (assembler_state != AS_TEXT)
{
warning_msg_invalid_line(line_num);
return;
}
op1 = strtok(NULL, delimit_char_comma);
op2 = strtok(NULL, delimit_char);
if (NULL == op1 || NULL == op2)
{
error_msg_miss_op(rcl_instruction_keyword, line_num);
}
op1_type = get_operand_type(op1);
op2_type = get_operand_type(op2);
if ((op1_type >= OT_REGISTER_AL && op1_type <= OT_REGISTER_DI)
&& (op2_type >= OT_REGISTER_AL && op2_type <= OT_REGISTER_DI))
{
// 操作码
machine_code[machine_code_address] = 0x6b;
machine_code_address++;
// 源操作数寄存器rs
rs = get_machine_code_from_r(op2_type);
rs = rs << 4;
// 目的操作数
rd = get_machine_code_from_r(op1_type);
// 操作数机器码
machine_code[machine_code_address] = rs | rd;
machine_code_address++;
}
else
{
error_msg_wrong_op(rcl_instruction_keyword, line_num);
}
//
// 在代码行数据库中,标记此行是一个指令行
//
line_database[line_count].flag |= LF_INSTRUCTION;
}
// rcr op1, op2
void parse_rcr(int line_num)
{
char *op1, *op2;
char rs, rd;
unsigned long op1_type, op2_type;
if (assembler_state != AS_TEXT)
{
warning_msg_invalid_line(line_num);
return;
}
op1 = strtok(NULL, delimit_char_comma);
op2 = strtok(NULL, delimit_char);
if (NULL == op1 || NULL == op2)
{
error_msg_miss_op(rcr_instruction_keyword, line_num);
}
op1_type = get_operand_type(op1);
op2_type = get_operand_type(op2);
if ((op1_type >= OT_REGISTER_AL && op1_type <= OT_REGISTER_DI)
&& (op2_type >= OT_REGISTER_AL && op2_type <= OT_REGISTER_DI))
{
// 操作码
machine_code[machine_code_address] = 0x6d;
machine_code_address++;
// 源操作数寄存器rs
rs = get_machine_code_from_r(op2_type);
rs = rs << 4;
// 目的操作数
rd = get_machine_code_from_r(op1_type);
// 操作数机器码
machine_code[machine_code_address] = rs | rd;
machine_code_address++;
}
else
{
error_msg_wrong_op(rcr_instruction_keyword, line_num);
}
//
// 在代码行数据库中,标记此行是一个指令行
//
line_database[line_count].flag |= LF_INSTRUCTION;
}
//////////////////////////////////////////////////////////////////////////
//
// nop
void parse_nop(int line_num)
{
machine_code[machine_code_address] = 0x6f;
machine_code_address++;
//
// 在代码行数据库中,标记此行是一个指令行
//
line_database[line_count].flag |= LF_INSTRUCTION;
}
//////////////////////////////////////////////////////////////////////////
//
// call symbol
void parse_call(int line_num)
{
char *op;
unsigned long op_type;
if (assembler_state != AS_TEXT)
{
warning_msg_invalid_line(line_num);
return;
}
op = strtok(NULL, delimit_char);
if (NULL == op)
{
error_msg_miss_op(call_instruction_keyword, line_num);
}
op_type = get_operand_type(op);
if (OT_SYMBOL == op_type)
{
// call symbol
machine_code[machine_code_address] = 0x71;
machine_code_address++;
// 重定位
add_reallocate(op, line_num);
machine_code_address++;
}
else
{
error_msg_wrong_op(call_instruction_keyword, line_num);
}
//
// 在代码行数据库中,标记此行是一个指令行
//
line_database[line_count].flag |= LF_INSTRUCTION;
}
/////////////////////////////////////////////////////////////////////////////
//
// ret
void parse_ret(int line_num)
{
machine_code[machine_code_address] = 0x73;
machine_code_address++;
//
// 在代码行数据库中,标记此行是一个指令行
//
line_database[line_count].flag |= LF_INSTRUCTION;
}
/////////////////////////////////////////////////////////////////////////////
//
// cli
void parse_cli(int line_num)
{
machine_code[machine_code_address] = 0x74;
machine_code_address++;
//
// 在代码行数据库中,标记此行是一个指令行
//
line_database[line_count].flag |= LF_INSTRUCTION;
}
/////////////////////////////////////////////////////////////////////////////
//
// sti
void parse_sti(int line_num)
{
machine_code[machine_code_address] = 0x75;
machine_code_address++;
//
// 在代码行数据库中,标记此行是一个指令行
//
line_database[line_count].flag |= LF_INSTRUCTION;
}
// 向符号表中添加一个符号
void add_symbol(const char* symbol, int line_num)
{
int i;
// 符号名称不能重复
for (i = 0; i < symbol_count; i++)
{
if (stricmp(symbol, symbol_table[i].name) == 0)
{
error_msg_same_symbol(symbol, line_num, symbol_table[i].line_num);
}
}
// 符号数量有限
if (symbol_count == MAX_SYMBOL_COUNT)
{
sprintf(formated_msg, "定义了太多的符号。最多可以定义 %d 个符号。", MAX_SYMBOL_COUNT);
error_msg(formated_msg, line_num);
}
// 添加符号
strcpy(symbol_table[symbol_count].name, symbol);
symbol_table[symbol_count].address = machine_code_address;
symbol_table[symbol_count].line_num = line_num;
symbol_count++;
}
// 解析符号
void parse_symbol(const char* symbol_with_colon, int line_num)
{
char symbol[MAX_SYMBOL_LENGTH];
char* token;
// 删除符号末尾的冒号
strcpy(symbol, symbol_with_colon);
symbol[strlen(symbol) - 1] = 0;
if (AS_TEXT == assembler_state)
{
// 代码段中的标号作为符号。记录到符号表中,不产生机器码。
add_symbol(symbol, line_num);
// 标号必须单独占一行,否则报错
if (strtok(NULL, delimit_char) != NULL)
{
error_msg("标号必须单独占用一行。", line_num);
}
}
else if (AS_DATA == assembler_state)
{
// 数据段中的变量作为符号。一个变量可以包含多个字节数据。记录到符号表中,产生机器码。
add_symbol(symbol, line_num);
while ((token = strtok(NULL, delimit_char)) != NULL)
{
if (!is_immediate(token))
{
error_msg_wrong_data(token, line_num);
}
machine_code[machine_code_address] = get_machine_code_from_immediate(token);
machine_code_address++;
symbol_table[symbol_count - 1].machine_code_count++;
}
}
else
{
warning_msg_invalid_line(line_num);
}
}
// 解析中断向量
void parse_int_vector(const char* symbol_with_colon, int line_num)
{
char symbol[MAX_SYMBOL_LENGTH];
char* token;
if (AS_INT_TABLE == assembler_state)
{
// 重定位
add_reallocate(symbol_with_colon, line_num);
machine_code_address++;
// 中断向量必须单独占一行,否则报错
if (strtok(NULL, delimit_char) != NULL)
{
error_msg("中断向量必须单独占用一行。", line_num);
}
}
}
// 解析中断向量表开始标志
void parse_int_table_section_keyword(int line_num)
{
// 中断向量表标志
if (AS_TEXT == assembler_state)
{
error_msg("中断向量表不能定义在代码段的后面。", line_num);
}
else if (AS_INT_TABLE == assembler_state)
{
error_msg("定义了重复的中断向量列表。", line_num);
}
assembler_state = AS_INT_TABLE;
}
// 解析代码段开始标志
void parse_code_section_keyword(int line_num)
{
// 代码段标志
if (AS_DATA == assembler_state)
{
error_msg("代码段不能定义在数据段的后面。", line_num);
}
else if (AS_TEXT == assembler_state)
{
error_msg("定义了重复的代码段。", line_num);
}
//若当前地址小于0x10,则补充空行
for (; machine_code_address < 0x10;)
{
line_database[line_count].line_num = line_num;
line_database[line_count].address = machine_code_address;
machine_code_address++;
machine_code_old_address++;
}
// 代码段的起始地址为0x10
assembler_state = AS_TEXT;
}
// 解析数据段开始标志
void parse_data_section_keyword(int line_num)
{
// 数据段标志
if (AS_DATA == assembler_state)
{
error_msg("定义了重复的数据段。", line_num);
}
else if (AS_BEGIN == assembler_state)
{
error_msg("数据段不能定义在代码段的前面。", line_num);
}
assembler_state = AS_DATA;
}
// 定义关键字和解析函数的对应关系
typedef void(*PARSE_FUNCTION)(int line_num);
struct KEYWORD_FUNCTION_ENTRY
{
const char** keyword;
PARSE_FUNCTION parse_function;
};
//
// 必须将关键字及其解析函数放在下面的表中。从而可以使用“表驱动”的编程模式。
//
struct KEYWORD_FUNCTION_ENTRY keyword_function_table[] =
{
{ NULL, NULL } // 未用
,{ &int_table_section_keyword, parse_int_table_section_keyword }
,{ &code_section_keyword, parse_code_section_keyword }
,{ &data_section_keyword, parse_data_section_keyword }
,{ &mov_instruction_keyword, parse_mov }
,{ &jmp_instruction_keyword, parse_jmp }
,{ &add_instruction_keyword, parse_add }
,{ &adc_instruction_keyword, parse_adc }
,{ &sub_instruction_keyword, parse_sub }
,{ &sbb_instruction_keyword, parse_sbb }
,{ &and_instruction_keyword, parse_and }
,{ &or_instruction_keyword, parse_or }
,{ &jc_instruction_keyword, parse_jc }
,{ &jz_instruction_keyword, parse_jz }
,{ &je_instruction_keyword, parse_jz }
,{ &jnz_instruction_keyword, parse_jnz }
,{ &jne_instruction_keyword, parse_jnz }
,{ &call_instruction_keyword, parse_call }
,{ &push_instruction_keyword, parse_push }
,{ &pop_instruction_keyword, parse_pop }
,{ &in_instruction_keyword, parse_in }
,{ &out_instruction_keyword, parse_out }
,{ &ret_instruction_keyword, parse_ret }
,{ &shr_instruction_keyword, parse_shr }
,{ &shl_instruction_keyword, parse_shl }
,{ &rcr_instruction_keyword, parse_rcr }
,{ &rcl_instruction_keyword, parse_rcl }
,{ &sal_instruction_keyword, parse_sal }
,{ &sar_instruction_keyword, parse_sar }
,{ &rol_instruction_keyword, parse_rol }
,{ &ror_instruction_keyword, parse_ror }
,{ &not_instruction_keyword, parse_not }
,{ &iret_instruction_keyword, parse_iret }
,{ &nop_instruction_keyword, parse_nop }
,{ &int_instruction_keyword, parse_int }
,{ &lea_instruction_keyword, parse_lea }
,{ &inc_instruction_keyword, parse_inc }
,{ &dec_instruction_keyword, parse_dec }
,{ &cmp_instruction_keyword, parse_cmp }
,{ &cli_instruction_keyword, parse_cli }
,{ &sti_instruction_keyword, parse_sti }
,{ &al_register_keyword, NULL }
,{ &bl_register_keyword, NULL }
,{ &cl_register_keyword, NULL }
,{ &dl_register_keyword, NULL }
,{ &sp_register_keyword, NULL }
,{ &bp_register_keyword, NULL }
,{ &si_register_keyword, NULL }
,{ &di_register_keyword, NULL }
,{ &cs_register_keyword, NULL }
,{ &ds_register_keyword, NULL }
,{ &ss_register_keyword, NULL }
,{ &es_register_keyword, NULL }
,{ &al_register_indirect_keyword, NULL }
,{ &bl_register_indirect_keyword, NULL }
,{ &cl_register_indirect_keyword, NULL }
,{ &dl_register_indirect_keyword, NULL }
,{ &sp_register_indirect_keyword, NULL }
,{ &bp_register_indirect_keyword, NULL }
,{ &si_register_indirect_keyword, NULL }
,{ &di_register_indirect_keyword, NULL }
,{ &cs_register_indirect_keyword, NULL }
,{ &ds_register_indirect_keyword, NULL }
,{ &ss_register_indirect_keyword, NULL }
,{ &es_register_indirect_keyword, NULL }
};
// 判断是否是一个关键字。返回0,不是关键字;返回非0,是关键字,并且返回值就是关键字在表中的下标。
int match_keyword(const char* token)
{
int i;
for (i = 1; i < sizeof(keyword_function_table) / sizeof(keyword_function_table[0]); i++)
{
if (stricmp(token, *keyword_function_table[i].keyword) == 0)
{
return i;
}
}
return 0;
}
// 判断是否是一个符号
int is_symbol(const char* token, int line_num)
{
int i;
char symbol_name[MAX_SYMBOL_LENGTH];
// 最后一个字符必须是冒号
if (token[strlen(token) - 1] != ':')
{
return 0;
}
// 第一个字符必须是字母或者下划线
if (token[0] != '_' && !isalpha(token[0]))
{
return 0;
}
// 后面的字符必须是字母、数字、下划线
for (i = 0; i < (int)strlen(token) - 2; i++)
{
if (token[i] != '_' && !isalpha(token[i]) && !isdigit(token[i]))
{
return 0;
}
}
// 不能与关键字相同
strcpy(symbol_name, token);
symbol_name[strlen(symbol_name) - 1] = 0;
if (match_keyword(symbol_name) != 0)
{
error_msg_keyword_symbol(symbol_name, line_num);
}
return 1;
}
// 判断是否是一个中断向量
int is_int_vector(const char* token, int line_num)
{
int i;
char vector_name[MAX_SYMBOL_LENGTH];
// 第一个字符必须是字母或者下划线
if (token[0] != '_' && !isalpha(token[0]))
{
return 0;
}
// 后面的字符必须是字母、数字、下划线
for (i = 0; i < (int)strlen(token) - 2; i++)
{
if (token[i] != '_' && !isalpha(token[i]) && !isdigit(token[i]))
{
return 0;
}
}
// 不能与关键字相同
strcpy(vector_name, token);
if (match_keyword(vector_name) != 0)
{
error_msg_keyword_int_vector(vector_name, line_num);
}
return 1;
}
// 输出版本信息
void version_msg()
{
printf(
"Engintime 8086 汇编器 [版本 2.0]\n"
);
}
// 输出帮助信息
void help_msg()
{
printf(
"Engintime 8086 汇编器。\n\n"
"用法:\n\n"
" dmasm.exe assembly_file_name [options]\n\n"
"选项:\n\n"
" -g debug_file_name\t指定生成的调试信息文件路径。\n"
" -h\t\t\t打印此帮助信息。\n"
" -l list_file_name\t指定生成的列表文件路径。\n"
" -o target_file_name\t指定生成的目标文件路径。若未指定,默认生成 a.obj 文件。\n"
" -v\t\t\t打印版本信息。\n"
);
printf("\n");
version_msg();
exit(1);
}
void argument_error_msg()
{
printf("命令行参数错误。\n\n");
help_msg();
}
// 处理器用户输入的命令行参数
void process_argument(int argc, char* argv[])
{
int i;
// argv[0] 是 "easm.exe",所以可以忽略。
for (i = 1; i < argc; i++)
{
if (strcmp(argv[i], "-v") == 0)
{
version_msg();
exit(1);
}
else if (strcmp(argv[i], "-h") == 0)
{
help_msg();
}
else if (strcmp(argv[i], "-o") == 0)
{
if (i + 1 < argc)
{
i++;
target_file_name = argv[i];
}
else
{
argument_error_msg();
}
}
else if (strcmp(argv[i], "-l") == 0)
{
if (i + 1 < argc)
{
i++;
list_file_name = argv[i];
}
else
{
argument_error_msg();
}
}
else if (strcmp(argv[i], "-g") == 0)
{
if (i + 1 < argc)
{
i++;
dbg_file_name = argv[i];
}
else
{
argument_error_msg();
}
}
else if (NULL == assembly_file_name && argv[i][0] != '-')
{
// 输入的汇编源代码文件路径。
assembly_file_name = argv[i];
}
else
{
argument_error_msg();
}
}
//
// 如果命令行参数中没有指定输入的汇编文件,就打印错误信息后退出
//
if (NULL == assembly_file_name)
{
printf("命令行参数错误。没有指定汇编源代码文件的路径。\n");
help_msg();
}
}
// 将一个字符串写入二进制文件中。先将字符串长度写入文件,然后将字符串中的
// 每个字符依次写入文件,不包括字符串末尾的 0.
void write_string_to_binary_file(const char* str, FILE* fp)
{
int str_length;
if (str != NULL)
{
str_length = strlen(str);
fwrite(&str_length, 1, sizeof(str_length), fp);
fwrite(str, 1, str_length, fp);
}
else
{
str_length = 0;
fwrite(&str_length, 1, sizeof(str_length), fp);
}
}
int main(int argc, char* argv[])
{
FILE* fp;
char* token;
char line[MAX_LINE_LENGTH];
int i, j;
int line_num = 1; // 行号从第一行开始计数
int keyword_index;
//
// 处理命令行参数
//
process_argument(argc, argv);
//
// 打开汇编源代码文件
//
fp = fopen(assembly_file_name, "r");
if (NULL == fp)
{
printf("无法打开源代码文件 %s\n", assembly_file_name);
return 1;
}
//////////////////////////////////////////////////////////////////////////
// 第一遍扫描
version_msg();
printf("\n正在汇编 %s...\n", assembly_file_name);
//
// 一次读取一行文本,同时记录所有的代码行信息
//
while (fgets(line, sizeof(line), fp) != NULL)
{
//
// 将一行代码的信息记录到代码行数据库中
//
strcpy(line_database[line_count].line_string, line);
line_database[line_count].line_num = line_num;
line_database[line_count].address = machine_code_address;
//
// 将代码行中的注释剥离
//
line[strcspn(line, ";")] = 0;
//
// 开始解析代码行
//
token = strtok(line, delimit_char);
if (NULL == token)
{
// 如果是空行,不做任何处理
}
else if ((keyword_index = match_keyword(token)) != 0
&& keyword_function_table[keyword_index].parse_function != NULL)
{
// 根据关键字进行相应的处理
keyword_function_table[keyword_index].parse_function(line_num);
}
else if (is_int_vector(token, line_num))
{
// 必须首先判断是否是中断向量,然后再判断是否是标号。因为判断标号的时候会删除最后一个标志字符“:”,而中断向量名称后是没有冒号的
// 中断向量
parse_int_vector(token, line_num);
// 判断符号
if (is_symbol(token, line_num))
{
// 处理符号
parse_symbol(token, line_num);
}
}
else
{
error_msg("无法识别的代码行。", line_num);
}
//
// 补充代码行数据库信息
//
line_database[line_count].machine_code_count = machine_code_address - machine_code_old_address;
machine_code_old_address = machine_code_address;
//
// 检查机器码地址是否超过了最大地址,若超过则报错(一个地址单元存储一个字节机器码)
//
//
if (MAX_MACHINE_CODE_BYTE_COUNT == machine_code_address)
{
sprintf(formated_msg, "汇编代码的机器码过多,最多只能有 %d 个字节机器码。", MAX_MACHINE_CODE_BYTE_COUNT);
error_msg(formated_msg, -1);
}
//
// 记录产生了机器码的代码行数量
//
if (line_database[line_count].machine_code_count != 0)
{
machine_code_line_count++;
}
//
// 增加行号
//
line_count++;
line_num++;
if (line_count == MAX_LINE_COUNT)
{
sprintf(formated_msg, "汇编文件中的代码行过多,最多只能有 %d 行代码。", MAX_LINE_COUNT);
error_msg(formated_msg, -1);
}
}
fclose(fp);
//////////////////////////////////////////////////////////////////////////
// 第二遍扫描
//
// 根据符号表更新重定位表
//
for (i = 0; i < reallocate_count; i++)
{
for (j = 0; j < symbol_count; j++)
{
if (stricmp(symbol_table[j].name, reallocate_table[i].symbol_name) == 0)
{
machine_code[reallocate_table[i].address] = (BYTE)symbol_table[j].address;
symbol_table[j].ref_count++;
break;
}
}
if (j == symbol_count)
{
// 重定位表中使用的符号在符号表中未定义,报错
sprintf(formated_msg, "使用了未定义的符号 %s。", reallocate_table[i].symbol_name);
error_msg(formated_msg, reallocate_table[i].line_num);
}
}
//
// 如果存在未引用的符号,输出警告信息。
//
for (i = 0; i < symbol_count; i++)
{
if (0 == symbol_table[i].ref_count)
{
warning_msg_unref_symbol(symbol_table[i].name, symbol_table[i].line_num);
}
}
//////////////////////////////////////////////////////////////////////////
// 产生各种输出文件
//
// 将机器码写入二进制文件
//
if (NULL == target_file_name)
{
target_file_name = "a.obj";
}
fp = fopen(target_file_name, "wb");
if (NULL == fp)
{
printf("无法打开输出文件 %s\n", target_file_name);
return 1;
}
fwrite(machine_code, 1, machine_code_address, fp);
fclose(fp);
printf("\n生成目标文件 %s\n", target_file_name);
//
// 将代码行数据库中的信息写入列表文件
//
if (list_file_name != NULL)
{
fp = fopen(list_file_name, "w");
if (NULL == fp)
{
printf("无法打开列表文件 %s\n", list_file_name);
return 1;
}
for (i = 0; i < line_count; i++)
{
// 行号
fprintf(fp, "%04d ", line_database[i].line_num);
// 地址和机器码
if (line_database[i].machine_code_count > 0)
{
fprintf(fp, "%02X ", line_database[i].address);
for (j = 0; j < line_database[i].machine_code_count; j++)
{
// 确保每行最多写三个字节的机器码
if (j != 0 && j % 3 == 0)
{
if (3 == j)
{
fprintf(fp, " ");
}
else
{
fprintf(fp, "\n ");
}
}
fprintf(fp, "%02X ", machine_code[line_database[i].address + j]);
if (2 == j)
{
fprintf(fp, " ");
fprintf(fp, line_database[i].line_string);
}
}
if (1 == j)
{
// 单字节指令
fprintf(fp, " ");
fprintf(fp, line_database[i].line_string);
}
else if (2 == j)
{
fprintf(fp, " ");
fprintf(fp, line_database[i].line_string);
}
else if (j > 3)
{
fprintf(fp, "\n");
}
}
else
{
fprintf(fp, " ");
// 源代码
fprintf(fp, line_database[i].line_string);
}
}
fclose(fp);
printf("生成列表文件 %s\n", list_file_name);
}
//
// 将代码行数据库中的信息写入二进制的调试信息文件。
//
// 调试信息的基本格式为:
// 魔数(4字节),固定不可改变
// 版本号(4字节),固定不可改变
// 源代码文件绝对路径字符串长度(4字节)
// 源代码文件绝对路径字符串(不包括字符串结尾的0)
// 列表文件绝对路径字符串长度(4字节)
// 列表文件绝对路径字符串(不包括字符串结尾的0)
//
// 代码行数据库中元素的数量(4字节)
// 代码行数据库中的所有元素
//
// 符号表元素的数量(4字节)
// 符号表中的所有元素
//
if (dbg_file_name != NULL)
{
fp = fopen(dbg_file_name, "wb");
if (NULL == fp)
{
printf("无法打开调试信息文件 %s\n", dbg_file_name);
return 1;
}
// 魔数
fwrite(&dbg_file_magic, 1, sizeof(dbg_file_magic), fp);
// 版本号
fwrite(&dbg_file_version, 1, sizeof(dbg_file_version), fp);
// 源代码文件路径
write_string_to_binary_file(assembly_file_name, fp);
// 列表文件路径
write_string_to_binary_file(list_file_name, fp);
// 代码行数据库中的所有元素
fwrite(&machine_code_line_count, 1, sizeof(machine_code_line_count), fp);
for (i = 0; i < line_count; i++)
{
// 跳过没有产生机器码的代码行
if (0 == line_database[i].machine_code_count)
{
continue;
}
fwrite(&line_database[i].line_num, 1, sizeof(unsigned long), fp);
fwrite(&line_database[i].address, 1, sizeof(unsigned long), fp);
fwrite(&line_database[i].machine_code_count, 1, sizeof(unsigned long), fp);
fwrite(&line_database[i].flag, 1, sizeof(unsigned long), fp);
}
// 符号表中的所有元素
fwrite(&symbol_count, 1, sizeof(symbol_count), fp);
for (i = 0; i < symbol_count; i++)
{
write_string_to_binary_file(symbol_table[i].name, fp);
fwrite(&symbol_table[i].address, 1, sizeof(unsigned long), fp);
fwrite(&symbol_table[i].machine_code_count, 1, sizeof(int), fp);
fwrite(&symbol_table[i].line_num, 1, sizeof(int), fp);
}
fclose(fp);
printf("生成调试信息文件 %s\n", dbg_file_name);
}
return 0;
}
添加文件
; 0~15号存储单元存放中断向量,即中断向量表
.int_table
int0
int1
int2
int3
int4
int5
int6
int7
.text
cli ; 关中断
; 初始化栈顶地址
mov sp, 0
; 初始化主片8259A
mov al, 0x13
out 0x80, al ; 写ICW1,边沿触发,单片,需要设置ICW4
mov al, 0
out 0x81, al ; 写ICW2,设定IRQ0的中断号为0
out 0x81, al ; 写入ICW4,设定普通全嵌套方式,普通EOI方式(通过发EOI命令结束中断)
out 0x81, al ; 写OCW1,允许全部8级中断请求
sti ; 开中断
mov dl, 0
mov bl, 0
NEXT:
inc dl
cmp dl, 0xff
jnz NEXT
DEAD_LOOP:
jmp DEAD_LOOP
;================================================
; 主片的中断服务程序
int0:
mov bl, 0
mov cl, 1
shr cl, bl
mov al, 0x20
out 0x80, al ;中断结束命令eoi
iret
int1: ;1 interrupt
mov bl, 0
add bl, 1
mov al, 0x20
out 0x80, al ;中断结束命令eoi
iret
int2: ;2 interrupt
mov bl, 0
add bl, 2
mov al, 0x20
out 0x80, al ;中断结束命令eoi
iret
int3: ;3 interrupt
mov bl, 0
add bl, 3
mov al, 0x20
out 0x80, al ;中断结束命令eoi
iret
int4: ;
mov bl, 0
add bl, 4
mov al, 0x20
out 0x80, al ;中断结束命令eoi
iret
int5: ;
mov bl, 0
add bl, 5
mov al, 0x20
out 0x80, al ;中断结束命令eoi
iret
int6: ;
mov bl, 0
add bl, 6
mov al, 0x20
out 0x80, al ;中断结束命令eoi
iret
int7: ;
mov bl, 0
add bl, 7
mov al, 0x20
out 0x80, al ;中断结束命令eoi
iret
@echo off
dmasm.exe ram.asm -o ram.rxm -l ram.lst -g ram.dbg
pause
添加文件
0001 ; 0~15号存储单元存放中断向量,即中断向量表
0002
0003 .int_table
0004 00 36 int0
0005 01 46 int1
0006 02 54 int2
0007 03 62 int3
0008 04 70 int4
0009 05 7E int5
0010 06 8C int6
0011 07 9A int7
0012
0013 .text
0014
0015 10 74 cli ; 关中断
0016
0017 ; 初始化栈顶地址
0018 11 01 04 00 mov sp, 0
0019
0020 ; 初始化主片8259A
0021 14 01 00 13 mov al, 0x13
0022 17 4E 00 80 out 0x80, al ; 写ICW1,边沿触发,单片,需要设置ICW4
0023 1A 01 00 00 mov al, 0
0024 1D 4E 00 81 out 0x81, al ; 写ICW2,设定IRQ0的中断号为0
0025 20 4E 00 81 out 0x81, al ; 写入ICW4,设定普通全嵌套方式,普通EOI方式(通过发EOI命令结束中断)
0026 23 4E 00 81 out 0x81, al ; 写OCW1,允许全部8级中断请求
0027
0028 26 75 sti ; 开中断
0029
0030 27 01 03 00 mov dl, 0
0031 2A 01 01 00 mov bl, 0
0032
0033 NEXT:
0034 2D 78 03 inc dl
0035 2F 47 03 FF cmp dl, 0xff
0036 32 55 2D jnz NEXT
0037
0038 DEAD_LOOP:
0039 34 57 34 jmp DEAD_LOOP
0040
0041
0042 ;================================================
0043 ; 主片的中断服务程序
0044 int0:
0045 36 01 01 00 mov bl, 0
0046 39 01 02 01 mov cl, 1
0047 3C 65 12 shr cl, bl
0048 3E 01 00 20 mov al, 0x20
0049 41 4E 00 80 out 0x80, al ;中断结束命令eoi
0050 44 5D 44 iret
0051
0052 int1: ;1 interrupt
0053 46 01 01 00 mov bl, 0
0054 49 0E 01 01 add bl, 1
0055 4C 01 00 20 mov al, 0x20
0056 4F 4E 00 80 out 0x80, al ;中断结束命令eoi
0057 52 5D 44 iret
0058
0059 int2: ;2 interrupt
0060 54 01 01 00 mov bl, 0
0061 57 0E 01 02 add bl, 2
0062 5A 01 00 20 mov al, 0x20
0063 5D 4E 00 80 out 0x80, al ;中断结束命令eoi
0064 60 5D 44 iret
0065
0066
0067 int3: ;3 interrupt
0068 62 01 01 00 mov bl, 0
0069 65 0E 01 03 add bl, 3
0070 68 01 00 20 mov al, 0x20
0071 6B 4E 00 80 out 0x80, al ;中断结束命令eoi
0072 6E 5D 44 iret
0073
0074 int4: ;
0075 70 01 01 00 mov bl, 0
0076 73 0E 01 04 add bl, 4
0077 76 01 00 20 mov al, 0x20
0078 79 4E 00 80 out 0x80, al ;中断结束命令eoi
0079 7C 5D 44 iret
0080
0081 int5: ;
0082 7E 01 01 00 mov bl, 0
0083 81 0E 01 05 add bl, 5
0084 84 01 00 20 mov al, 0x20
0085 87 4E 00 80 out 0x80, al ;中断结束命令eoi
0086 8A 5D 44 iret
0087
0088 int6: ;
0089 8C 01 01 00 mov bl, 0
0090 8F 0E 01 06 add bl, 6
0091 92 01 00 20 mov al, 0x20
0092 95 4E 00 80 out 0x80, al ;中断结束命令eoi
0093 98 5D 44 iret
0094
0095 int7: ;
0096 9A 01 01 00 mov bl, 0
0097 9D 0E 01 07 add bl, 7
0098 A0 01 00 20 mov al, 0x20
0099 A3 4E 00 80 out 0x80, al ;中断结束命令eoi
0100 A6 5D 44 iret
0101
添加文件
# 说明
可编程中断控制器实验
# 原理图
![raw svg](top.dlsche.svg)
![raw svg](top1.dlsche.svg)
\ No newline at end of file
添加文件
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<svg height="4683" version="1.1" width="12189" xmlns="http://www.w3.org/2000/svg">
<text alignment-baseline="after-edge" fill="#800000" font-family="微软雅黑" font-size="200" font-weight="700" text-anchor="start" x="27" y="3906">DBUS[7..0]</text>
<text alignment-baseline="after-edge" fill="#800000" font-family="微软雅黑" font-size="200" font-weight="700" text-anchor="start" x="57" y="1136">ABUS[7..0]</text>
<text alignment-baseline="after-edge" fill="#800000" font-family="微软雅黑" font-size="65" font-weight="700" text-anchor="start" x="1777" y="2606">CLK</text>
<line stroke="#000000" stroke-linecap="round" stroke-width="5" x1="1167" x2="1267" y1="2606" y2="2606"/>
<rect fill="#ffffb0" height="100" stroke="#800000" stroke-width="5" width="100" x="1067" y="2556"/>
<polyline fill="none" points="1077 2506, 1157 2506" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="1117 2506, 1117 2556" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="1087 2636, 1117 2636, 1117 2576, 1147 2576" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/>
<text alignment-baseline="after-edge" fill="#000000" font-family="Arial" font-size="180" font-weight="700" text-anchor="start" x="687" y="2493">CLOCK</text>
<text alignment-baseline="after-edge" fill="#000000" font-family="Arial" font-size="25" font-weight="700" text-anchor="start" x="977" y="2616">SCLK</text>
<text alignment-baseline="after-edge" fill="#000080" font-family="微软雅黑" font-size="65" font-weight="700" text-anchor="start" x="977" y="2726">Key = C</text>
<text alignment-baseline="after-edge" fill="#800000" font-family="微软雅黑" font-size="90" font-weight="700" text-anchor="start" x="1447" y="1826">RESET</text>
<line stroke="#000000" stroke-linecap="round" stroke-width="5" x1="1347" x2="1447" y1="1826" y2="1826"/>
<rect fill="#ffffb0" height="100" stroke="#800000" stroke-width="5" width="100" x="1247" y="1776"/>
<polyline fill="none" points="1257 1726, 1337 1726" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="1297 1726, 1297 1776" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="1267 1856, 1297 1856, 1297 1796, 1327 1796" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/>
<text alignment-baseline="after-edge" fill="#000000" font-family="Arial" font-size="180" font-weight="700" text-anchor="start" x="1027" y="1703">RESET</text>
<text alignment-baseline="after-edge" fill="#000000" font-family="Arial" font-size="25" font-weight="700" text-anchor="start" x="1157" y="1836">SCLK</text>
<text alignment-baseline="after-edge" fill="#000080" font-family="微软雅黑" font-size="180" font-weight="700" text-anchor="start" x="997" y="2126">Key = R</text>
<polyline fill="none" points="4817 206, 4817 4636" stroke="#000000" stroke-dasharray="200,100" stroke-linecap="round" stroke-linejoin="round" stroke-width="50"/>
<rect fill="#80ff80" height="1700" stroke="#800000" stroke-width="1" width="700" x="3217" y="1606"/>
<text alignment-baseline="after-edge" fill="#000000" font-family="微软雅黑" font-size="250" font-weight="700" text-anchor="start" x="3217" y="1506">8086</text>
<text alignment-baseline="after-edge" fill="#000080" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="3217" y="1556">8086\8086.dlsche</text>
<polygon fill="#ffff80" points="3217 1706, 3242 1681, 3292 1681, 3317 1706, 3292 1731, 3242 1731, 3217 1706" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="3327" y="1706">CLK</text>
<polygon fill="#ffff80" points="3217 1806, 3242 1781, 3292 1781, 3317 1806, 3292 1831, 3242 1831, 3217 1806" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="3327" y="1806">RESET</text>
<polygon fill="#ffff80" points="3217 1906, 3242 1881, 3292 1881, 3317 1906, 3292 1931, 3242 1931, 3217 1906" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="3327" y="1906">INTR</text>
<polygon fill="#ffff80" points="3217 2006, 3242 1981, 3292 1981, 3317 2006, 3292 2031, 3242 2031, 3217 2006" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="3327" y="2006">READY</text>
<polygon fill="#ffff80" points="3217 2106, 3242 2081, 3292 2081, 3317 2106, 3292 2131, 3242 2131, 3217 2106" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="3327" y="2106">HOLD</text>
<polygon fill="#ffff80" points="3217 2206, 3242 2181, 3292 2181, 3317 2206, 3292 2231, 3242 2231, 3217 2206" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="3327" y="2206">NMI</text>
<polygon fill="#ffff80" points="3217 2306, 3242 2281, 3292 2281, 3317 2306, 3292 2331, 3242 2331, 3217 2306" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="3327" y="2306">TESET</text>
<polygon fill="#ffff80" points="3217 2406, 3242 2381, 3292 2381, 3317 2406, 3292 2431, 3242 2431, 3217 2406" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="3327" y="2406">D0</text>
<polygon fill="#ffff80" points="3217 2506, 3242 2481, 3292 2481, 3317 2506, 3292 2531, 3242 2531, 3217 2506" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="3327" y="2506">D1</text>
<polygon fill="#ffff80" points="3217 2606, 3242 2581, 3292 2581, 3317 2606, 3292 2631, 3242 2631, 3217 2606" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="3327" y="2606">D2</text>
<polygon fill="#ffff80" points="3217 2706, 3242 2681, 3292 2681, 3317 2706, 3292 2731, 3242 2731, 3217 2706" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="3327" y="2706">D3</text>
<polygon fill="#ffff80" points="3217 2806, 3242 2781, 3292 2781, 3317 2806, 3292 2831, 3242 2831, 3217 2806" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="3327" y="2806">D4</text>
<polygon fill="#ffff80" points="3217 2906, 3242 2881, 3292 2881, 3317 2906, 3292 2931, 3242 2931, 3217 2906" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="3327" y="2906">D5</text>
<polygon fill="#ffff80" points="3217 3006, 3242 2981, 3292 2981, 3317 3006, 3292 3031, 3242 3031, 3217 3006" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="3327" y="3006">D6</text>
<polygon fill="#ffff80" points="3217 3106, 3242 3081, 3292 3081, 3317 3106, 3292 3131, 3242 3131, 3217 3106" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="3327" y="3106">D7</text>
<polygon fill="#ffff80" points="3917 1706, 3892 1681, 3842 1681, 3817 1706, 3842 1731, 3892 1731, 3917 1706" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="3707" y="1706">A0</text>
<polygon fill="#ffff80" points="3917 1806, 3892 1781, 3842 1781, 3817 1806, 3842 1831, 3892 1831, 3917 1806" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="3707" y="1806">A1</text>
<polygon fill="#ffff80" points="3917 1906, 3892 1881, 3842 1881, 3817 1906, 3842 1931, 3892 1931, 3917 1906" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="3707" y="1906">A2</text>
<polygon fill="#ffff80" points="3917 2006, 3892 1981, 3842 1981, 3817 2006, 3842 2031, 3892 2031, 3917 2006" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="3707" y="2006">A3</text>
<polygon fill="#ffff80" points="3917 2106, 3892 2081, 3842 2081, 3817 2106, 3842 2131, 3892 2131, 3917 2106" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="3707" y="2106">A4</text>
<polygon fill="#ffff80" points="3917 2206, 3892 2181, 3842 2181, 3817 2206, 3842 2231, 3892 2231, 3917 2206" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="3707" y="2206">A5</text>
<polygon fill="#ffff80" points="3917 2306, 3892 2281, 3842 2281, 3817 2306, 3842 2331, 3892 2331, 3917 2306" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="3707" y="2306">A6</text>
<polygon fill="#ffff80" points="3917 2406, 3892 2381, 3842 2381, 3817 2406, 3842 2431, 3892 2431, 3917 2406" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="3707" y="2406">A7</text>
<polygon fill="#ffff80" points="3917 2506, 3892 2481, 3842 2481, 3817 2506, 3842 2531, 3892 2531, 3917 2506" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="3687" y="2506">WR_OUT</text>
<polygon fill="#ffff80" points="3917 2606, 3892 2581, 3842 2581, 3817 2606, 3842 2631, 3892 2631, 3917 2606" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="3687" y="2606">READ_OUT</text>
<polygon fill="#ffff80" points="3917 2706, 3892 2681, 3842 2681, 3817 2706, 3842 2731, 3892 2731, 3917 2706" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="3707" y="2706">MIO</text>
<polygon fill="#ffff80" points="3917 2806, 3892 2781, 3842 2781, 3817 2806, 3842 2831, 3892 2831, 3917 2806" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="3707" y="2806">INTA</text>
<polygon fill="#ffff80" points="3917 2906, 3892 2881, 3842 2881, 3817 2906, 3842 2931, 3892 2931, 3917 2906" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="3707" y="2906">HLDA</text>
<polygon fill="#ffff80" points="3917 3006, 3892 2981, 3842 2981, 3817 3006, 3842 3031, 3892 3031, 3917 3006" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="3707" y="3006">ALE</text>
<polygon fill="#ffff80" points="3917 3106, 3892 3081, 3842 3081, 3817 3106, 3842 3131, 3892 3131, 3917 3106" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="3707" y="3106">DEN</text>
<polygon fill="#ffff80" points="3917 3206, 3892 3181, 3842 3181, 3817 3206, 3842 3231, 3892 3231, 3917 3206" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="3707" y="3206">DTR</text>
<polyline fill="none" points="3217 2406, 2867 2406" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="3217 3106, 2867 3106" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<line stroke="#000080" stroke-linecap="round" stroke-width="5" x1="2817" x2="2867" y1="3156" y2="3106"/>
<polyline fill="none" points="2867 2506, 3217 2506" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="2867 2606, 3217 2606" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="2867 2706, 3217 2706" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="2867 2806, 3217 2806" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="2867 2906, 3217 2906" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="2867 3006, 3217 3006" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<line stroke="#000080" stroke-linecap="round" stroke-width="5" x1="2817" x2="2867" y1="3056" y2="3006"/>
<line stroke="#000080" stroke-linecap="round" stroke-width="5" x1="2817" x2="2867" y1="2956" y2="2906"/>
<line stroke="#000080" stroke-linecap="round" stroke-width="5" x1="2817" x2="2867" y1="2856" y2="2806"/>
<line stroke="#000080" stroke-linecap="round" stroke-width="5" x1="2817" x2="2867" y1="2756" y2="2706"/>
<line stroke="#000080" stroke-linecap="round" stroke-width="5" x1="2817" x2="2867" y1="2656" y2="2606"/>
<line stroke="#000080" stroke-linecap="round" stroke-width="5" x1="2817" x2="2867" y1="2556" y2="2506"/>
<line stroke="#000080" stroke-linecap="round" stroke-width="5" x1="2817" x2="2867" y1="2456" y2="2406"/>
<text alignment-baseline="after-edge" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="2867" y="2406">DBUS0</text>
<text alignment-baseline="after-edge" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="2867" y="2506">DBUS1</text>
<text alignment-baseline="after-edge" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="2867" y="2606">DBUS2</text>
<text alignment-baseline="after-edge" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="2867" y="2706">DBUS3</text>
<text alignment-baseline="after-edge" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="2867" y="2806">DBUS4</text>
<text alignment-baseline="after-edge" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="2867" y="2906">DBUS5</text>
<text alignment-baseline="after-edge" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="2867" y="3006">DBUS6</text>
<text alignment-baseline="after-edge" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="2867" y="3106">DBUS7</text>
<polyline fill="none" points="3907 1706, 4157 1706" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="3917 1806, 4167 1806" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="3917 1906, 4167 1906" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="3917 2006, 4167 2006" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="3917 2106, 4167 2106" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="3917 2206, 4167 2206" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="3917 2306, 4167 2306" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="3917 2406, 4167 2406" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<line stroke="#000080" stroke-linecap="round" stroke-width="5" x1="4157" x2="4207" y1="1706" y2="1656"/>
<line stroke="#000080" stroke-linecap="round" stroke-width="5" x1="4167" x2="4217" y1="1806" y2="1756"/>
<line stroke="#000080" stroke-linecap="round" stroke-width="5" x1="4167" x2="4217" y1="1906" y2="1856"/>
<line stroke="#000080" stroke-linecap="round" stroke-width="5" x1="4167" x2="4217" y1="2006" y2="1956"/>
<line stroke="#000080" stroke-linecap="round" stroke-width="5" x1="4167" x2="4217" y1="2106" y2="2056"/>
<line stroke="#000080" stroke-linecap="round" stroke-width="5" x1="4167" x2="4217" y1="2206" y2="2156"/>
<line stroke="#000080" stroke-linecap="round" stroke-width="5" x1="4167" x2="4217" y1="2306" y2="2256"/>
<line stroke="#000080" stroke-linecap="round" stroke-width="5" x1="4167" x2="4217" y1="2406" y2="2356"/>
<text alignment-baseline="after-edge" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="4007" y="1706">ABUS0</text>
<text alignment-baseline="after-edge" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="4017" y="1806">ABUS1</text>
<text alignment-baseline="after-edge" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="4017" y="1906">ABUS2</text>
<text alignment-baseline="after-edge" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="4017" y="2006">ABUS3</text>
<text alignment-baseline="after-edge" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="4017" y="2106">ABUS4</text>
<text alignment-baseline="after-edge" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="4017" y="2206">ABUS5</text>
<text alignment-baseline="after-edge" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="4017" y="2306">ABUS6</text>
<text alignment-baseline="after-edge" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="4017" y="2406">ABUS7</text>
<line stroke="#000000" stroke-linecap="round" stroke-width="5" x1="1167" x2="1267" y1="2806" y2="2806"/>
<rect fill="#ffffb0" height="100" stroke="#800000" stroke-width="5" width="100" x="1067" y="2756"/>
<polyline fill="none" points="1077 2816, 1087 2816, 1087 2786, 1107 2786, 1107 2816, 1127 2816, 1127 2786, 1147 2786, 1147 2816" stroke="#000080" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/>
<text alignment-baseline="after-edge" fill="#000000" font-family="Arial" font-size="25" font-weight="700" text-anchor="start" x="1107" y="2746">C1</text>
<text alignment-baseline="after-edge" fill="#000000" font-family="Arial" font-size="25" font-weight="700" text-anchor="start" x="1063" y="2902">CLOCK11</text>
<text alignment-baseline="after-edge" fill="#000080" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="1207" y="2786">100Hz</text>
<line stroke="#000000" stroke-linecap="round" stroke-width="5" x1="1167" x2="1267" y1="3006" y2="3006"/>
<text alignment-baseline="after-edge" fill="#000080" font-family="Times New Roman" font-size="30" font-weight="400" text-anchor="start" x="1108" y="3026">1</text>
<rect fill="#ffffff" fill-opacity="0.5" height="60" stroke="#800000" stroke-width="5" width="100" x="1067" y="2976"/>
<text alignment-baseline="after-edge" fill="#000000" font-family="Arial" font-size="25" font-weight="700" text-anchor="start" x="1111" y="2967">2</text>
<text alignment-baseline="after-edge" fill="#000000" font-family="Arial" font-size="25" font-weight="700" text-anchor="start" x="998" y="3028">DCT</text>
<text alignment-baseline="after-edge" fill="#000080" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="1068" y="3079">Key = S</text>
<line stroke="#000000" stroke-linecap="round" stroke-width="5" x1="1627" x2="1567" y1="2606" y2="2606"/>
<line stroke="#000000" stroke-linecap="round" stroke-width="5" x1="1707" x2="1767" y1="2606" y2="2606"/>
<line stroke="#000000" stroke-linecap="round" stroke-width="5" x1="1667" x2="1667" y1="2646" y2="2706"/>
<circle cx="1667" cy="2638" fill="none" r="5" stroke="#000000" stroke-width="5"/>
<polygon fill="#ffffff" fill-opacity="0.5" points="1627 2556, 1627 2656, 1707 2606, 1627 2556" 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="1677" y="2526">U3</text>
<text alignment-baseline="after-edge" fill="#000000" font-family="Arial" font-size="25" font-weight="700" text-anchor="start" x="1627" y="2556">NBUFFER</text>
<line stroke="#000000" stroke-linecap="round" stroke-width="5" x1="1627" x2="1567" y1="2806" y2="2806"/>
<line stroke="#000000" stroke-linecap="round" stroke-width="5" x1="1707" x2="1767" y1="2806" y2="2806"/>
<line stroke="#000000" stroke-linecap="round" stroke-width="5" x1="1667" x2="1667" y1="2846" y2="2906"/>
<circle cx="1667" cy="2838" fill="none" r="5" stroke="#000000" stroke-width="5"/>
<polygon fill="#ffffff" fill-opacity="0.5" points="1627 2756, 1627 2856, 1707 2806, 1627 2756" 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="1677" y="2726">U4</text>
<text alignment-baseline="after-edge" fill="#000000" font-family="Arial" font-size="25" font-weight="700" text-anchor="start" x="1627" y="2756">NBUFFER</text>
<line stroke="#000000" stroke-linecap="round" stroke-width="5" x1="1527" x2="1467" y1="2706" y2="2706"/>
<line stroke="#000000" stroke-linecap="round" stroke-width="5" x1="1607" x2="1667" y1="2706" y2="2706"/>
<circle cx="1603" cy="2706" fill="none" r="5" stroke="#000000" stroke-width="5"/>
<polygon fill="#ffffff" fill-opacity="0.5" points="1527 2656, 1527 2756, 1597 2706, 1527 2656" 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="1547" y="2670">U5</text>
<text alignment-baseline="after-edge" fill="#000000" font-family="Arial" font-size="25" font-weight="700" text-anchor="start" x="1527" y="2802">NOT</text>
<rect fill="#80ff80" height="600" stroke="#800000" stroke-width="1" width="700" x="5517" y="2706"/>
<text alignment-baseline="after-edge" fill="#000000" font-family="微软雅黑" font-size="250" font-weight="700" text-anchor="start" x="5517" y="2606">MEM</text>
<text alignment-baseline="after-edge" fill="#000080" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="5517" y="2656">MEM\MEM.dlsche</text>
<polygon fill="#ffff80" points="5517 2806, 5542 2781, 5592 2781, 5617 2806, 5592 2831, 5542 2831, 5517 2806" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="5627" y="2806">WR_OUT</text>
<polygon fill="#ffff80" points="5517 2906, 5542 2881, 5592 2881, 5617 2906, 5592 2931, 5542 2931, 5517 2906" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="5627" y="2906">CLK</text>
<polygon fill="#ffff80" points="5517 3006, 5542 2981, 5592 2981, 5617 3006, 5592 3031, 5542 3031, 5517 3006" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="5627" y="3006">MIO</text>
<polygon fill="#ffff80" points="5517 3106, 5542 3081, 5592 3081, 5617 3106, 5592 3131, 5542 3131, 5517 3106" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="5627" y="3106">READ_OUT</text>
<polygon fill="#ffff80" points="5517 3206, 5542 3181, 5592 3181, 5617 3206, 5592 3231, 5542 3231, 5517 3206" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="5627" y="3206">ABUS[7..0]</text>
<polygon fill="#ffff80" points="6217 2806, 6192 2781, 6142 2781, 6117 2806, 6142 2831, 6192 2831, 6217 2806" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="6007" y="2806">DBUS[7..0]</text>
<polyline fill="none" points="4217 2356, 4217 1136" stroke="#ff8057" stroke-linecap="round" stroke-linejoin="round" stroke-width="20"/>
<polyline fill="none" points="5517 3206, 5317 3206, 5317 1136" stroke="#ff8057" stroke-linecap="round" stroke-linejoin="round" stroke-width="20"/>
<polyline fill="none" points="7417 2706, 7217 2706, 7217 1136" stroke="#ff8057" stroke-linecap="round" stroke-linejoin="round" stroke-width="20"/>
<polyline fill="none" points="2817 2456, 2817 3906" stroke="#000080" stroke-linecap="round" stroke-linejoin="round" stroke-width="20"/>
<polyline fill="none" points="6217 2806, 6417 2806, 6417 3906" stroke="#000080" stroke-linecap="round" stroke-linejoin="round" stroke-width="20"/>
<rect fill="#80ff80" height="1100" stroke="#800000" stroke-width="1" width="700" x="7417" y="2206"/>
<text alignment-baseline="after-edge" fill="#000000" font-family="微软雅黑" font-size="250" font-weight="700" text-anchor="start" x="7417" y="2106">IO</text>
<text alignment-baseline="after-edge" fill="#000080" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="7417" y="2156">IO\IO.dlsche</text>
<polygon fill="#ffff80" points="7417 2306, 7442 2281, 7492 2281, 7517 2306, 7492 2331, 7442 2331, 7417 2306" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="7527" y="2306">MIO</text>
<polygon fill="#ffff80" points="7417 2406, 7442 2381, 7492 2381, 7517 2406, 7492 2431, 7442 2431, 7417 2406" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="7527" y="2406">WR_OUT</text>
<polygon fill="#ffff80" points="7417 2506, 7442 2481, 7492 2481, 7517 2506, 7492 2531, 7442 2531, 7417 2506" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="7527" y="2506">READ_OUT</text>
<polygon fill="#ffff80" points="7417 2606, 7442 2581, 7492 2581, 7517 2606, 7492 2631, 7442 2631, 7417 2606" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="7527" y="2606">MIO</text>
<polygon fill="#ffff80" points="7417 2706, 7442 2681, 7492 2681, 7517 2706, 7492 2731, 7442 2731, 7417 2706" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="7527" y="2706">A[7..0]</text>
<polygon fill="#ffff80" points="8117 2306, 8092 2281, 8042 2281, 8017 2306, 8042 2331, 8092 2331, 8117 2306" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="7907" y="2306">IOW</text>
<polygon fill="#ffff80" points="8117 2406, 8092 2381, 8042 2381, 8017 2406, 8042 2431, 8092 2431, 8117 2406" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="7907" y="2406">IOR</text>
<polygon fill="#ffff80" points="8117 2506, 8092 2481, 8042 2481, 8017 2506, 8042 2531, 8092 2531, 8117 2506" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="7907" y="2506">CS0</text>
<polygon fill="#ffff80" points="8117 2606, 8092 2581, 8042 2581, 8017 2606, 8042 2631, 8092 2631, 8117 2606" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="7907" y="2606">CS1</text>
<polygon fill="#ffff80" points="8117 2706, 8092 2681, 8042 2681, 8017 2706, 8042 2731, 8092 2731, 8117 2706" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="7907" y="2706">CS2</text>
<polygon fill="#ffff80" points="8117 2806, 8092 2781, 8042 2781, 8017 2806, 8042 2831, 8092 2831, 8117 2806" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="7907" y="2806">CS3</text>
<polygon fill="#ffff80" points="8117 2906, 8092 2881, 8042 2881, 8017 2906, 8042 2931, 8092 2931, 8117 2906" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="7907" y="2906">CS4</text>
<polygon fill="#ffff80" points="8117 3006, 8092 2981, 8042 2981, 8017 3006, 8042 3031, 8092 3031, 8117 3006" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="7907" y="3006">CS5</text>
<polygon fill="#ffff80" points="8117 3106, 8092 3081, 8042 3081, 8017 3106, 8042 3131, 8092 3131, 8117 3106" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="7907" y="3106">CS6</text>
<polygon fill="#ffff80" points="8117 3206, 8092 3181, 8042 3181, 8017 3206, 8042 3231, 8092 3231, 8117 3206" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="7907" y="3206">CS7</text>
<text alignment-baseline="after-edge" fill="#000000" font-family="微软雅黑" font-size="250" font-weight="700" text-anchor="start" x="97" y="316">实验四:可编程中断控制器8259单片实验</text>
<polyline fill="none" points="57 1136, 8117 1136" stroke="#ff8057" stroke-linecap="round" stroke-linejoin="round" stroke-width="20"/>
<polyline fill="none" points="27 3906, 8117 3906, 9467 3906, 9467 2456" stroke="#000080" stroke-linecap="round" stroke-linejoin="round" stroke-width="20"/>
<polyline fill="none" points="1767 2606, 1867 2606, 1867 2806, 1767 2806" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="1567 2806, 1267 2806" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="1267 3006, 1667 3006, 1667 2906" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="1467 2706, 1467 3006" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="1567 2606, 1267 2606" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<rect fill="#80ff80" height="1400" stroke="#800000" stroke-width="1" width="700" x="9717" y="2006"/>
<text alignment-baseline="after-edge" fill="#000080" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="9717" y="1906">8259A</text>
<text alignment-baseline="after-edge" fill="#000080" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="9717" y="1956">8259A\8259A.dlsche</text>
<polygon fill="#ffff80" points="9717 2106, 9742 2081, 9792 2081, 9817 2106, 9792 2131, 9742 2131, 9717 2106" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="9827" y="2106">CS</text>
<polygon fill="#ffff80" points="9717 2206, 9742 2181, 9792 2181, 9817 2206, 9792 2231, 9742 2231, 9717 2206" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="9827" y="2206">WR</text>
<polygon fill="#ffff80" points="9717 2306, 9742 2281, 9792 2281, 9817 2306, 9792 2331, 9742 2331, 9717 2306" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="9827" y="2306">RD</text>
<polygon fill="#ffff80" points="9717 2406, 9742 2381, 9792 2381, 9817 2406, 9792 2431, 9742 2431, 9717 2406" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="9827" y="2406">D7</text>
<polygon fill="#ffff80" points="9717 2506, 9742 2481, 9792 2481, 9817 2506, 9792 2531, 9742 2531, 9717 2506" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="9827" y="2506">D6</text>
<polygon fill="#ffff80" points="9717 2606, 9742 2581, 9792 2581, 9817 2606, 9792 2631, 9742 2631, 9717 2606" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="9827" y="2606">D5</text>
<polygon fill="#ffff80" points="9717 2706, 9742 2681, 9792 2681, 9817 2706, 9792 2731, 9742 2731, 9717 2706" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="9827" y="2706">D4</text>
<polygon fill="#ffff80" points="9717 2806, 9742 2781, 9792 2781, 9817 2806, 9792 2831, 9742 2831, 9717 2806" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="9827" y="2806">D3</text>
<polygon fill="#ffff80" points="9717 2906, 9742 2881, 9792 2881, 9817 2906, 9792 2931, 9742 2931, 9717 2906" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="9827" y="2906">D2</text>
<polygon fill="#ffff80" points="9717 3006, 9742 2981, 9792 2981, 9817 3006, 9792 3031, 9742 3031, 9717 3006" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="9827" y="3006">D1</text>
<polygon fill="#ffff80" points="9717 3106, 9742 3081, 9792 3081, 9817 3106, 9792 3131, 9742 3131, 9717 3106" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="9827" y="3106">D0</text>
<polygon fill="#ffff80" points="9717 3206, 9742 3181, 9792 3181, 9817 3206, 9792 3231, 9742 3231, 9717 3206" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="9827" y="3206">CAS0</text>
<polygon fill="#ffff80" points="9717 3306, 9742 3281, 9792 3281, 9817 3306, 9792 3331, 9742 3331, 9717 3306" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="9827" y="3306">CAS1</text>
<polygon fill="#ffff80" points="10417 2106, 10392 2081, 10342 2081, 10317 2106, 10342 2131, 10392 2131, 10417 2106" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="10207" y="2106">A0</text>
<polygon fill="#ffff80" points="10417 2206, 10392 2181, 10342 2181, 10317 2206, 10342 2231, 10392 2231, 10417 2206" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="10207" y="2206">INTA</text>
<polygon fill="#ffff80" points="10417 2306, 10392 2281, 10342 2281, 10317 2306, 10342 2331, 10392 2331, 10417 2306" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="10207" y="2306">IR7</text>
<polygon fill="#ffff80" points="10417 2406, 10392 2381, 10342 2381, 10317 2406, 10342 2431, 10392 2431, 10417 2406" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="10207" y="2406">IR6</text>
<polygon fill="#ffff80" points="10417 2506, 10392 2481, 10342 2481, 10317 2506, 10342 2531, 10392 2531, 10417 2506" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="10207" y="2506">IR5</text>
<polygon fill="#ffff80" points="10417 2606, 10392 2581, 10342 2581, 10317 2606, 10342 2631, 10392 2631, 10417 2606" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="10207" y="2606">IR4</text>
<polygon fill="#ffff80" points="10417 2706, 10392 2681, 10342 2681, 10317 2706, 10342 2731, 10392 2731, 10417 2706" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="10207" y="2706">IR3</text>
<polygon fill="#ffff80" points="10417 2806, 10392 2781, 10342 2781, 10317 2806, 10342 2831, 10392 2831, 10417 2806" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="10207" y="2806">IR2</text>
<polygon fill="#ffff80" points="10417 2906, 10392 2881, 10342 2881, 10317 2906, 10342 2931, 10392 2931, 10417 2906" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="10207" y="2906">IR1</text>
<polygon fill="#ffff80" points="10417 3006, 10392 2981, 10342 2981, 10317 3006, 10342 3031, 10392 3031, 10417 3006" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="10207" y="3006">IR0</text>
<polygon fill="#ffff80" points="10417 3106, 10392 3081, 10342 3081, 10317 3106, 10342 3131, 10392 3131, 10417 3106" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="10207" y="3106">INT</text>
<polygon fill="#ffff80" points="10417 3206, 10392 3181, 10342 3181, 10317 3206, 10342 3231, 10392 3231, 10417 3206" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="10207" y="3206">SP</text>
<polygon fill="#ffff80" points="10417 3306, 10392 3281, 10342 3281, 10317 3306, 10342 3331, 10392 3331, 10417 3306" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="10207" y="3306">CAS2</text>
<polyline fill="none" points="9717 2406, 9517 2406" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="9717 2506, 9517 2506" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="9717 2606, 9517 2606" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="9717 2706, 9517 2706" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="9717 2806, 9517 2806" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="9717 2906, 9517 2906" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="9717 3006, 9517 3006" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="9717 3106, 9517 3106" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<line stroke="#000080" stroke-linecap="round" stroke-width="5" x1="9467" x2="9517" y1="2456" y2="2406"/>
<line stroke="#000080" stroke-linecap="round" stroke-width="5" x1="9467" x2="9517" y1="2556" y2="2506"/>
<line stroke="#000080" stroke-linecap="round" stroke-width="5" x1="9467" x2="9517" y1="2656" y2="2606"/>
<line stroke="#000080" stroke-linecap="round" stroke-width="5" x1="9467" x2="9517" y1="2756" y2="2706"/>
<line stroke="#000080" stroke-linecap="round" stroke-width="5" x1="9467" x2="9517" y1="2856" y2="2806"/>
<line stroke="#000080" stroke-linecap="round" stroke-width="5" x1="9467" x2="9517" y1="2956" y2="2906"/>
<line stroke="#000080" stroke-linecap="round" stroke-width="5" x1="9467" x2="9517" y1="3056" y2="3006"/>
<line stroke="#000080" stroke-linecap="round" stroke-width="5" x1="9467" x2="9517" y1="3156" y2="3106"/>
<text alignment-baseline="after-edge" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="9517" y="2406">DBUS7</text>
<text alignment-baseline="after-edge" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="9517" y="2506">DBUS6</text>
<text alignment-baseline="after-edge" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="9517" y="2606">DBUS5</text>
<text alignment-baseline="after-edge" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="9517" y="2706">DBUS4</text>
<text alignment-baseline="after-edge" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="9517" y="2806">DBUS3</text>
<text alignment-baseline="after-edge" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="9517" y="2906">DBUS2</text>
<text alignment-baseline="after-edge" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="9517" y="3006">DBUS1</text>
<text alignment-baseline="after-edge" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="9517" y="3106">DBUS0</text>
<polyline fill="none" points="9717 2106, 8517 2106, 8517 2506, 8117 2506" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="9717 2206, 8467 2206, 8467 2306, 8117 2306" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="9717 2306, 8567 2306, 8567 2406, 8117 2406" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="10417 2106, 10617 2106" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<text alignment-baseline="after-edge" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="10457" y="2106">ABUS0</text>
<polyline fill="none" points="10417 3206, 10617 3206" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<line stroke="#000000" stroke-linecap="round" stroke-width="5" x1="10667" x2="10617" y1="3206" y2="3206"/>
<polygon fill="#ffffff" fill-opacity="0.5" points="10667 3206, 10717 3256, 10717 3156, 10667 3206" stroke="#000000" stroke-width="5"/>
<text alignment-baseline="after-edge" fill="#000000" font-family="微软雅黑" font-size="30" font-weight="700" text-anchor="start" transform="rotate(90 10677 3196)" x="10677" y="3196">1</text>
<text alignment-baseline="after-edge" fill="#000000" font-family="Arial" font-size="25" font-weight="700" text-anchor="start" transform="rotate(90 10747 3196)" x="10747" y="3196">U1</text>
<text alignment-baseline="after-edge" fill="#000000" font-family="Arial" font-size="25" font-weight="700" text-anchor="start" transform="rotate(90 10717 3136)" x="10717" y="3136">DIGITAL1</text>
<polyline fill="none" points="3917 2806, 4617 2806, 4617 1006, 10717 1006, 10717 2206, 10417 2206" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="10417 3106, 10817 3106, 10817 906, 3117 906, 3117 1906, 3217 1906" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<text alignment-baseline="after-edge" fill="#000080" font-family="宋体" font-size="25" font-weight="400" text-anchor="start" x="10517" y="3106">高电平,中断请求</text>
<text alignment-baseline="after-edge" fill="#000080" font-family="宋体" font-size="25" font-weight="400" text-anchor="start" x="10427" y="2206">低电平,中断应答</text>
<text alignment-baseline="after-edge" fill="#000080" font-family="宋体" font-size="25" font-weight="400" text-anchor="start" x="10817" y="3226">SP=1,主片</text>
<polyline fill="none" points="10417 2306, 11017 2306, 11217 2306, 11217 2206" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="10417 2406, 11017 2406, 11517 2406, 11517 2306" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="10417 2506, 11017 2506, 11817 2506, 11817 2406" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="10417 2606, 11017 2606, 12117 2606, 12117 2506" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="10417 2706, 11017 2706, 12167 2706, 12167 2856" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="10417 2806, 11017 2806, 11867 2806, 11867 2956" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="10417 2906, 11017 2906, 11567 2906, 11567 3056" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="10417 3006, 11017 3006, 11267 3006, 11267 3156" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<line stroke="#000000" stroke-linecap="round" stroke-width="5" x1="11117" x2="11217" y1="2206" y2="2206"/>
<rect fill="#ffffb0" height="100" stroke="#800000" stroke-width="5" width="100" x="11017" y="2156"/>
<polyline fill="none" points="11027 2106, 11107 2106" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="11067 2106, 11067 2156" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="11037 2236, 11067 2236, 11067 2176, 11097 2176" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/>
<text alignment-baseline="after-edge" fill="#000000" font-family="Arial" font-size="25" font-weight="700" text-anchor="start" x="11057" y="2093">C2</text>
<text alignment-baseline="after-edge" fill="#000000" font-family="Arial" font-size="25" font-weight="700" text-anchor="start" x="10927" y="2216">SCLK</text>
<text alignment-baseline="after-edge" fill="#000080" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="11017" y="2306">Key = 7</text>
<line stroke="#000000" stroke-linecap="round" stroke-width="5" x1="11417" x2="11517" y1="2306" y2="2306"/>
<rect fill="#ffffb0" height="100" stroke="#800000" stroke-width="5" width="100" x="11317" y="2256"/>
<polyline fill="none" points="11327 2206, 11407 2206" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="11367 2206, 11367 2256" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="11337 2336, 11367 2336, 11367 2276, 11397 2276" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/>
<text alignment-baseline="after-edge" fill="#000000" font-family="Arial" font-size="25" font-weight="700" text-anchor="start" x="11357" y="2193">C3</text>
<text alignment-baseline="after-edge" fill="#000000" font-family="Arial" font-size="25" font-weight="700" text-anchor="start" x="11227" y="2316">SCLK</text>
<text alignment-baseline="after-edge" fill="#000080" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="11317" y="2406">Key = 6</text>
<line stroke="#000000" stroke-linecap="round" stroke-width="5" x1="11717" x2="11817" y1="2406" y2="2406"/>
<rect fill="#ffffb0" height="100" stroke="#800000" stroke-width="5" width="100" x="11617" y="2356"/>
<polyline fill="none" points="11627 2306, 11707 2306" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="11667 2306, 11667 2356" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="11637 2436, 11667 2436, 11667 2376, 11697 2376" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/>
<text alignment-baseline="after-edge" fill="#000000" font-family="Arial" font-size="25" font-weight="700" text-anchor="start" x="11657" y="2293">C4</text>
<text alignment-baseline="after-edge" fill="#000000" font-family="Arial" font-size="25" font-weight="700" text-anchor="start" x="11527" y="2416">SCLK</text>
<text alignment-baseline="after-edge" fill="#000080" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="11617" y="2506">Key = 5</text>
<line stroke="#000000" stroke-linecap="round" stroke-width="5" x1="12017" x2="12117" y1="2506" y2="2506"/>
<rect fill="#ffffb0" height="100" stroke="#800000" stroke-width="5" width="100" x="11917" y="2456"/>
<polyline fill="none" points="11927 2406, 12007 2406" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="11967 2406, 11967 2456" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="11937 2536, 11967 2536, 11967 2476, 11997 2476" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/>
<text alignment-baseline="after-edge" fill="#000000" font-family="Arial" font-size="25" font-weight="700" text-anchor="start" x="11957" y="2393">C5</text>
<text alignment-baseline="after-edge" fill="#000000" font-family="Arial" font-size="25" font-weight="700" text-anchor="start" x="11827" y="2516">SCLK</text>
<text alignment-baseline="after-edge" fill="#000080" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="11917" y="2606">Key = 4</text>
<line stroke="#000000" stroke-linecap="round" stroke-width="5" x1="11167" x2="11267" y1="3156" y2="3156"/>
<rect fill="#ffffb0" height="100" stroke="#800000" stroke-width="5" width="100" x="11067" y="3106"/>
<polyline fill="none" points="11077 3056, 11157 3056" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="11117 3056, 11117 3106" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="11087 3186, 11117 3186, 11117 3126, 11147 3126" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/>
<text alignment-baseline="after-edge" fill="#000000" font-family="Arial" font-size="25" font-weight="700" text-anchor="start" x="11107" y="3043">C6</text>
<text alignment-baseline="after-edge" fill="#000000" font-family="Arial" font-size="25" font-weight="700" text-anchor="start" x="10977" y="3166">SCLK</text>
<text alignment-baseline="after-edge" fill="#000080" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="11067" y="3256">Key = 0</text>
<line stroke="#000000" stroke-linecap="round" stroke-width="5" x1="11467" x2="11567" y1="3056" y2="3056"/>
<rect fill="#ffffb0" height="100" stroke="#800000" stroke-width="5" width="100" x="11367" y="3006"/>
<polyline fill="none" points="11377 2956, 11457 2956" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="11417 2956, 11417 3006" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="11387 3086, 11417 3086, 11417 3026, 11447 3026" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/>
<text alignment-baseline="after-edge" fill="#000000" font-family="Arial" font-size="25" font-weight="700" text-anchor="start" x="11407" y="2943">C7</text>
<text alignment-baseline="after-edge" fill="#000000" font-family="Arial" font-size="25" font-weight="700" text-anchor="start" x="11277" y="3066">SCLK</text>
<text alignment-baseline="after-edge" fill="#000080" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="11367" y="3156">Key = 1</text>
<line stroke="#000000" stroke-linecap="round" stroke-width="5" x1="11767" x2="11867" y1="2956" y2="2956"/>
<rect fill="#ffffb0" height="100" stroke="#800000" stroke-width="5" width="100" x="11667" y="2906"/>
<polyline fill="none" points="11677 2856, 11757 2856" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="11717 2856, 11717 2906" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="11687 2986, 11717 2986, 11717 2926, 11747 2926" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/>
<text alignment-baseline="after-edge" fill="#000000" font-family="Arial" font-size="25" font-weight="700" text-anchor="start" x="11707" y="2843">C8</text>
<text alignment-baseline="after-edge" fill="#000000" font-family="Arial" font-size="25" font-weight="700" text-anchor="start" x="11577" y="2966">SCLK</text>
<text alignment-baseline="after-edge" fill="#000080" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="11667" y="3056">Key = 2</text>
<line stroke="#000000" stroke-linecap="round" stroke-width="5" x1="12067" x2="12167" y1="2856" y2="2856"/>
<rect fill="#ffffb0" height="100" stroke="#800000" stroke-width="5" width="100" x="11967" y="2806"/>
<polyline fill="none" points="11977 2756, 12057 2756" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="12017 2756, 12017 2806" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="11987 2886, 12017 2886, 12017 2826, 12047 2826" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/>
<text alignment-baseline="after-edge" fill="#000000" font-family="Arial" font-size="25" font-weight="700" text-anchor="start" x="12007" y="2743">C9</text>
<text alignment-baseline="after-edge" fill="#000000" font-family="Arial" font-size="25" font-weight="700" text-anchor="start" x="11877" y="2866">SCLK</text>
<text alignment-baseline="after-edge" fill="#000080" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="11967" y="2956">Key = 3</text>
<text alignment-baseline="after-edge" fill="#000080" font-family="宋体" font-size="25" font-weight="400" text-anchor="start" x="10917" y="2696">上升沿触发中断请求</text>
<circle cx="7217" cy="1136" fill="#000080" r="25" stroke="#000080" stroke-width="5"/>
<circle cx="5317" cy="1136" fill="#000080" r="25" stroke="#000080" stroke-width="5"/>
<circle cx="4217" cy="1136" fill="#000080" r="25" stroke="#000080" stroke-width="5"/>
<circle cx="6417" cy="3906" fill="#000080" r="25" stroke="#000080" stroke-width="5"/>
<circle cx="2817" cy="3906" fill="#000080" r="25" stroke="#000080" stroke-width="5"/>
<circle cx="1467" cy="3006" fill="#0000ff" r="8" stroke="#0000ff" stroke-width="5"/>
</svg>
添加文件
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<svg height="4683" version="1.1" width="15339" xmlns="http://www.w3.org/2000/svg">
<text alignment-baseline="after-edge" fill="#800000" font-family="微软雅黑" font-size="200" font-weight="700" text-anchor="start" x="27" y="3906">DBUS[7..0]</text>
<text alignment-baseline="after-edge" fill="#800000" font-family="微软雅黑" font-size="200" font-weight="700" text-anchor="start" x="57" y="1136">ABUS[7..0]</text>
<text alignment-baseline="after-edge" fill="#800000" font-family="微软雅黑" font-size="65" font-weight="700" text-anchor="start" x="1777" y="2606">CLK</text>
<line stroke="#000000" stroke-linecap="round" stroke-width="5" x1="1167" x2="1267" y1="2606" y2="2606"/>
<rect fill="#ffffb0" height="100" stroke="#800000" stroke-width="5" width="100" x="1067" y="2556"/>
<polyline fill="none" points="1077 2506, 1157 2506" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="1117 2506, 1117 2556" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="1087 2636, 1117 2636, 1117 2576, 1147 2576" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/>
<text alignment-baseline="after-edge" fill="#000000" font-family="Arial" font-size="180" font-weight="700" text-anchor="start" x="687" y="2493">CLOCK</text>
<text alignment-baseline="after-edge" fill="#000000" font-family="Arial" font-size="25" font-weight="700" text-anchor="start" x="977" y="2616">SCLK</text>
<text alignment-baseline="after-edge" fill="#000080" font-family="微软雅黑" font-size="65" font-weight="700" text-anchor="start" x="977" y="2726">Key = C</text>
<text alignment-baseline="after-edge" fill="#800000" font-family="微软雅黑" font-size="90" font-weight="700" text-anchor="start" x="1447" y="1826">RESET</text>
<line stroke="#000000" stroke-linecap="round" stroke-width="5" x1="1347" x2="1447" y1="1826" y2="1826"/>
<rect fill="#ffffb0" height="100" stroke="#800000" stroke-width="5" width="100" x="1247" y="1776"/>
<polyline fill="none" points="1257 1726, 1337 1726" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="1297 1726, 1297 1776" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="1267 1856, 1297 1856, 1297 1796, 1327 1796" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/>
<text alignment-baseline="after-edge" fill="#000000" font-family="Arial" font-size="180" font-weight="700" text-anchor="start" x="1027" y="1703">RESET</text>
<text alignment-baseline="after-edge" fill="#000000" font-family="Arial" font-size="25" font-weight="700" text-anchor="start" x="1157" y="1836">SCLK</text>
<text alignment-baseline="after-edge" fill="#000080" font-family="微软雅黑" font-size="180" font-weight="700" text-anchor="start" x="997" y="2126">Key = R</text>
<polyline fill="none" points="4817 206, 4817 4636" stroke="#000000" stroke-dasharray="200,100" stroke-linecap="round" stroke-linejoin="round" stroke-width="50"/>
<rect fill="#80ff80" height="1700" stroke="#800000" stroke-width="1" width="700" x="3217" y="1606"/>
<text alignment-baseline="after-edge" fill="#000000" font-family="微软雅黑" font-size="250" font-weight="700" text-anchor="start" x="3217" y="1506">8086</text>
<text alignment-baseline="after-edge" fill="#000080" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="3217" y="1556">8086\8086.dlsche</text>
<polygon fill="#ffff80" points="3217 1706, 3242 1681, 3292 1681, 3317 1706, 3292 1731, 3242 1731, 3217 1706" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="3327" y="1706">CLK</text>
<polygon fill="#ffff80" points="3217 1806, 3242 1781, 3292 1781, 3317 1806, 3292 1831, 3242 1831, 3217 1806" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="3327" y="1806">RESET</text>
<polygon fill="#ffff80" points="3217 1906, 3242 1881, 3292 1881, 3317 1906, 3292 1931, 3242 1931, 3217 1906" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="3327" y="1906">INTR</text>
<polygon fill="#ffff80" points="3217 2006, 3242 1981, 3292 1981, 3317 2006, 3292 2031, 3242 2031, 3217 2006" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="3327" y="2006">READY</text>
<polygon fill="#ffff80" points="3217 2106, 3242 2081, 3292 2081, 3317 2106, 3292 2131, 3242 2131, 3217 2106" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="3327" y="2106">HOLD</text>
<polygon fill="#ffff80" points="3217 2206, 3242 2181, 3292 2181, 3317 2206, 3292 2231, 3242 2231, 3217 2206" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="3327" y="2206">NMI</text>
<polygon fill="#ffff80" points="3217 2306, 3242 2281, 3292 2281, 3317 2306, 3292 2331, 3242 2331, 3217 2306" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="3327" y="2306">TESET</text>
<polygon fill="#ffff80" points="3217 2406, 3242 2381, 3292 2381, 3317 2406, 3292 2431, 3242 2431, 3217 2406" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="3327" y="2406">D0</text>
<polygon fill="#ffff80" points="3217 2506, 3242 2481, 3292 2481, 3317 2506, 3292 2531, 3242 2531, 3217 2506" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="3327" y="2506">D1</text>
<polygon fill="#ffff80" points="3217 2606, 3242 2581, 3292 2581, 3317 2606, 3292 2631, 3242 2631, 3217 2606" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="3327" y="2606">D2</text>
<polygon fill="#ffff80" points="3217 2706, 3242 2681, 3292 2681, 3317 2706, 3292 2731, 3242 2731, 3217 2706" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="3327" y="2706">D3</text>
<polygon fill="#ffff80" points="3217 2806, 3242 2781, 3292 2781, 3317 2806, 3292 2831, 3242 2831, 3217 2806" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="3327" y="2806">D4</text>
<polygon fill="#ffff80" points="3217 2906, 3242 2881, 3292 2881, 3317 2906, 3292 2931, 3242 2931, 3217 2906" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="3327" y="2906">D5</text>
<polygon fill="#ffff80" points="3217 3006, 3242 2981, 3292 2981, 3317 3006, 3292 3031, 3242 3031, 3217 3006" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="3327" y="3006">D6</text>
<polygon fill="#ffff80" points="3217 3106, 3242 3081, 3292 3081, 3317 3106, 3292 3131, 3242 3131, 3217 3106" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="3327" y="3106">D7</text>
<polygon fill="#ffff80" points="3917 1706, 3892 1681, 3842 1681, 3817 1706, 3842 1731, 3892 1731, 3917 1706" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="3707" y="1706">A0</text>
<polygon fill="#ffff80" points="3917 1806, 3892 1781, 3842 1781, 3817 1806, 3842 1831, 3892 1831, 3917 1806" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="3707" y="1806">A1</text>
<polygon fill="#ffff80" points="3917 1906, 3892 1881, 3842 1881, 3817 1906, 3842 1931, 3892 1931, 3917 1906" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="3707" y="1906">A2</text>
<polygon fill="#ffff80" points="3917 2006, 3892 1981, 3842 1981, 3817 2006, 3842 2031, 3892 2031, 3917 2006" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="3707" y="2006">A3</text>
<polygon fill="#ffff80" points="3917 2106, 3892 2081, 3842 2081, 3817 2106, 3842 2131, 3892 2131, 3917 2106" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="3707" y="2106">A4</text>
<polygon fill="#ffff80" points="3917 2206, 3892 2181, 3842 2181, 3817 2206, 3842 2231, 3892 2231, 3917 2206" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="3707" y="2206">A5</text>
<polygon fill="#ffff80" points="3917 2306, 3892 2281, 3842 2281, 3817 2306, 3842 2331, 3892 2331, 3917 2306" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="3707" y="2306">A6</text>
<polygon fill="#ffff80" points="3917 2406, 3892 2381, 3842 2381, 3817 2406, 3842 2431, 3892 2431, 3917 2406" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="3707" y="2406">A7</text>
<polygon fill="#ffff80" points="3917 2506, 3892 2481, 3842 2481, 3817 2506, 3842 2531, 3892 2531, 3917 2506" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="3687" y="2506">WR_OUT</text>
<polygon fill="#ffff80" points="3917 2606, 3892 2581, 3842 2581, 3817 2606, 3842 2631, 3892 2631, 3917 2606" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="3687" y="2606">READ_OUT</text>
<polygon fill="#ffff80" points="3917 2706, 3892 2681, 3842 2681, 3817 2706, 3842 2731, 3892 2731, 3917 2706" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="3707" y="2706">MIO</text>
<polygon fill="#ffff80" points="3917 2806, 3892 2781, 3842 2781, 3817 2806, 3842 2831, 3892 2831, 3917 2806" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="3707" y="2806">INTA</text>
<polygon fill="#ffff80" points="3917 2906, 3892 2881, 3842 2881, 3817 2906, 3842 2931, 3892 2931, 3917 2906" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="3707" y="2906">HLDA</text>
<polygon fill="#ffff80" points="3917 3006, 3892 2981, 3842 2981, 3817 3006, 3842 3031, 3892 3031, 3917 3006" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="3707" y="3006">ALE</text>
<polygon fill="#ffff80" points="3917 3106, 3892 3081, 3842 3081, 3817 3106, 3842 3131, 3892 3131, 3917 3106" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="3707" y="3106">DEN</text>
<polygon fill="#ffff80" points="3917 3206, 3892 3181, 3842 3181, 3817 3206, 3842 3231, 3892 3231, 3917 3206" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="3707" y="3206">DTR</text>
<polyline fill="none" points="3217 2406, 2867 2406" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="3217 3106, 2867 3106" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<line stroke="#000080" stroke-linecap="round" stroke-width="5" x1="2817" x2="2867" y1="3156" y2="3106"/>
<polyline fill="none" points="2867 2506, 3217 2506" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="2867 2606, 3217 2606" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="2867 2706, 3217 2706" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="2867 2806, 3217 2806" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="2867 2906, 3217 2906" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="2867 3006, 3217 3006" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<line stroke="#000080" stroke-linecap="round" stroke-width="5" x1="2817" x2="2867" y1="3056" y2="3006"/>
<line stroke="#000080" stroke-linecap="round" stroke-width="5" x1="2817" x2="2867" y1="2956" y2="2906"/>
<line stroke="#000080" stroke-linecap="round" stroke-width="5" x1="2817" x2="2867" y1="2856" y2="2806"/>
<line stroke="#000080" stroke-linecap="round" stroke-width="5" x1="2817" x2="2867" y1="2756" y2="2706"/>
<line stroke="#000080" stroke-linecap="round" stroke-width="5" x1="2817" x2="2867" y1="2656" y2="2606"/>
<line stroke="#000080" stroke-linecap="round" stroke-width="5" x1="2817" x2="2867" y1="2556" y2="2506"/>
<line stroke="#000080" stroke-linecap="round" stroke-width="5" x1="2817" x2="2867" y1="2456" y2="2406"/>
<text alignment-baseline="after-edge" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="2867" y="2406">DBUS0</text>
<text alignment-baseline="after-edge" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="2867" y="2506">DBUS1</text>
<text alignment-baseline="after-edge" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="2867" y="2606">DBUS2</text>
<text alignment-baseline="after-edge" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="2867" y="2706">DBUS3</text>
<text alignment-baseline="after-edge" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="2867" y="2806">DBUS4</text>
<text alignment-baseline="after-edge" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="2867" y="2906">DBUS5</text>
<text alignment-baseline="after-edge" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="2867" y="3006">DBUS6</text>
<text alignment-baseline="after-edge" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="2867" y="3106">DBUS7</text>
<polyline fill="none" points="3907 1706, 4157 1706" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="3917 1806, 4167 1806" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="3917 1906, 4167 1906" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="3917 2006, 4167 2006" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="3917 2106, 4167 2106" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="3917 2206, 4167 2206" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="3917 2306, 4167 2306" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="3917 2406, 4167 2406" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<line stroke="#000080" stroke-linecap="round" stroke-width="5" x1="4157" x2="4207" y1="1706" y2="1656"/>
<line stroke="#000080" stroke-linecap="round" stroke-width="5" x1="4167" x2="4217" y1="1806" y2="1756"/>
<line stroke="#000080" stroke-linecap="round" stroke-width="5" x1="4167" x2="4217" y1="1906" y2="1856"/>
<line stroke="#000080" stroke-linecap="round" stroke-width="5" x1="4167" x2="4217" y1="2006" y2="1956"/>
<line stroke="#000080" stroke-linecap="round" stroke-width="5" x1="4167" x2="4217" y1="2106" y2="2056"/>
<line stroke="#000080" stroke-linecap="round" stroke-width="5" x1="4167" x2="4217" y1="2206" y2="2156"/>
<line stroke="#000080" stroke-linecap="round" stroke-width="5" x1="4167" x2="4217" y1="2306" y2="2256"/>
<line stroke="#000080" stroke-linecap="round" stroke-width="5" x1="4167" x2="4217" y1="2406" y2="2356"/>
<text alignment-baseline="after-edge" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="4007" y="1706">ABUS0</text>
<text alignment-baseline="after-edge" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="4017" y="1806">ABUS1</text>
<text alignment-baseline="after-edge" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="4017" y="1906">ABUS2</text>
<text alignment-baseline="after-edge" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="4017" y="2006">ABUS3</text>
<text alignment-baseline="after-edge" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="4017" y="2106">ABUS4</text>
<text alignment-baseline="after-edge" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="4017" y="2206">ABUS5</text>
<text alignment-baseline="after-edge" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="4017" y="2306">ABUS6</text>
<text alignment-baseline="after-edge" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="4017" y="2406">ABUS7</text>
<line stroke="#000000" stroke-linecap="round" stroke-width="5" x1="1167" x2="1267" y1="2806" y2="2806"/>
<rect fill="#ffffb0" height="100" stroke="#800000" stroke-width="5" width="100" x="1067" y="2756"/>
<polyline fill="none" points="1077 2816, 1087 2816, 1087 2786, 1107 2786, 1107 2816, 1127 2816, 1127 2786, 1147 2786, 1147 2816" stroke="#000080" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/>
<text alignment-baseline="after-edge" fill="#000000" font-family="Arial" font-size="25" font-weight="700" text-anchor="start" x="1107" y="2746">C1</text>
<text alignment-baseline="after-edge" fill="#000000" font-family="Arial" font-size="25" font-weight="700" text-anchor="start" x="1063" y="2902">CLOCK11</text>
<text alignment-baseline="after-edge" fill="#000080" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="1207" y="2786">100Hz</text>
<line stroke="#000000" stroke-linecap="round" stroke-width="5" x1="1167" x2="1267" y1="3006" y2="3006"/>
<text alignment-baseline="after-edge" fill="#000080" font-family="Times New Roman" font-size="30" font-weight="400" text-anchor="start" x="1108" y="3026">1</text>
<rect fill="#ffffff" fill-opacity="0.5" height="60" stroke="#800000" stroke-width="5" width="100" x="1067" y="2976"/>
<text alignment-baseline="after-edge" fill="#000000" font-family="Arial" font-size="25" font-weight="700" text-anchor="start" x="1111" y="2967">2</text>
<text alignment-baseline="after-edge" fill="#000000" font-family="Arial" font-size="25" font-weight="700" text-anchor="start" x="998" y="3028">DCT</text>
<text alignment-baseline="after-edge" fill="#000080" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="1068" y="3079">Key = S</text>
<line stroke="#000000" stroke-linecap="round" stroke-width="5" x1="1627" x2="1567" y1="2606" y2="2606"/>
<line stroke="#000000" stroke-linecap="round" stroke-width="5" x1="1707" x2="1767" y1="2606" y2="2606"/>
<line stroke="#000000" stroke-linecap="round" stroke-width="5" x1="1667" x2="1667" y1="2646" y2="2706"/>
<circle cx="1667" cy="2638" fill="none" r="5" stroke="#000000" stroke-width="5"/>
<polygon fill="#ffffff" fill-opacity="0.5" points="1627 2556, 1627 2656, 1707 2606, 1627 2556" 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="1677" y="2526">U3</text>
<text alignment-baseline="after-edge" fill="#000000" font-family="Arial" font-size="25" font-weight="700" text-anchor="start" x="1627" y="2556">NBUFFER</text>
<line stroke="#000000" stroke-linecap="round" stroke-width="5" x1="1627" x2="1567" y1="2806" y2="2806"/>
<line stroke="#000000" stroke-linecap="round" stroke-width="5" x1="1707" x2="1767" y1="2806" y2="2806"/>
<line stroke="#000000" stroke-linecap="round" stroke-width="5" x1="1667" x2="1667" y1="2846" y2="2906"/>
<circle cx="1667" cy="2838" fill="none" r="5" stroke="#000000" stroke-width="5"/>
<polygon fill="#ffffff" fill-opacity="0.5" points="1627 2756, 1627 2856, 1707 2806, 1627 2756" 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="1677" y="2726">U4</text>
<text alignment-baseline="after-edge" fill="#000000" font-family="Arial" font-size="25" font-weight="700" text-anchor="start" x="1627" y="2756">NBUFFER</text>
<line stroke="#000000" stroke-linecap="round" stroke-width="5" x1="1527" x2="1467" y1="2706" y2="2706"/>
<line stroke="#000000" stroke-linecap="round" stroke-width="5" x1="1607" x2="1667" y1="2706" y2="2706"/>
<circle cx="1603" cy="2706" fill="none" r="5" stroke="#000000" stroke-width="5"/>
<polygon fill="#ffffff" fill-opacity="0.5" points="1527 2656, 1527 2756, 1597 2706, 1527 2656" 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="1547" y="2670">U5</text>
<text alignment-baseline="after-edge" fill="#000000" font-family="Arial" font-size="25" font-weight="700" text-anchor="start" x="1527" y="2802">NOT</text>
<rect fill="#80ff80" height="600" stroke="#800000" stroke-width="1" width="700" x="5517" y="2706"/>
<text alignment-baseline="after-edge" fill="#000000" font-family="微软雅黑" font-size="250" font-weight="700" text-anchor="start" x="5517" y="2606">MEM</text>
<text alignment-baseline="after-edge" fill="#000080" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="5517" y="2656">MEM\MEM.dlsche</text>
<polygon fill="#ffff80" points="5517 2806, 5542 2781, 5592 2781, 5617 2806, 5592 2831, 5542 2831, 5517 2806" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="5627" y="2806">WR_OUT</text>
<polygon fill="#ffff80" points="5517 2906, 5542 2881, 5592 2881, 5617 2906, 5592 2931, 5542 2931, 5517 2906" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="5627" y="2906">CLK</text>
<polygon fill="#ffff80" points="5517 3006, 5542 2981, 5592 2981, 5617 3006, 5592 3031, 5542 3031, 5517 3006" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="5627" y="3006">MIO</text>
<polygon fill="#ffff80" points="5517 3106, 5542 3081, 5592 3081, 5617 3106, 5592 3131, 5542 3131, 5517 3106" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="5627" y="3106">READ_OUT</text>
<polygon fill="#ffff80" points="5517 3206, 5542 3181, 5592 3181, 5617 3206, 5592 3231, 5542 3231, 5517 3206" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="5627" y="3206">ABUS[7..0]</text>
<polygon fill="#ffff80" points="6217 2806, 6192 2781, 6142 2781, 6117 2806, 6142 2831, 6192 2831, 6217 2806" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="6007" y="2806">DBUS[7..0]</text>
<polyline fill="none" points="4217 2356, 4217 1136" stroke="#ff8057" stroke-linecap="round" stroke-linejoin="round" stroke-width="20"/>
<polyline fill="none" points="5517 3206, 5317 3206, 5317 1136" stroke="#ff8057" stroke-linecap="round" stroke-linejoin="round" stroke-width="20"/>
<polyline fill="none" points="7417 2706, 7217 2706, 7217 1136" stroke="#ff8057" stroke-linecap="round" stroke-linejoin="round" stroke-width="20"/>
<polyline fill="none" points="2817 2456, 2817 3906" stroke="#000080" stroke-linecap="round" stroke-linejoin="round" stroke-width="20"/>
<polyline fill="none" points="6217 2806, 6417 2806, 6417 3906" stroke="#000080" stroke-linecap="round" stroke-linejoin="round" stroke-width="20"/>
<rect fill="#80ff80" height="1100" stroke="#800000" stroke-width="1" width="700" x="7417" y="2206"/>
<text alignment-baseline="after-edge" fill="#000000" font-family="微软雅黑" font-size="250" font-weight="700" text-anchor="start" x="7417" y="2106">IO</text>
<text alignment-baseline="after-edge" fill="#000080" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="7417" y="2156">IO\IO.dlsche</text>
<polygon fill="#ffff80" points="7417 2306, 7442 2281, 7492 2281, 7517 2306, 7492 2331, 7442 2331, 7417 2306" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="7527" y="2306">MIO</text>
<polygon fill="#ffff80" points="7417 2406, 7442 2381, 7492 2381, 7517 2406, 7492 2431, 7442 2431, 7417 2406" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="7527" y="2406">WR_OUT</text>
<polygon fill="#ffff80" points="7417 2506, 7442 2481, 7492 2481, 7517 2506, 7492 2531, 7442 2531, 7417 2506" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="7527" y="2506">READ_OUT</text>
<polygon fill="#ffff80" points="7417 2606, 7442 2581, 7492 2581, 7517 2606, 7492 2631, 7442 2631, 7417 2606" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="7527" y="2606">MIO</text>
<polygon fill="#ffff80" points="7417 2706, 7442 2681, 7492 2681, 7517 2706, 7492 2731, 7442 2731, 7417 2706" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="7527" y="2706">A[7..0]</text>
<polygon fill="#ffff80" points="8117 2306, 8092 2281, 8042 2281, 8017 2306, 8042 2331, 8092 2331, 8117 2306" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="7907" y="2306">IOW</text>
<polygon fill="#ffff80" points="8117 2406, 8092 2381, 8042 2381, 8017 2406, 8042 2431, 8092 2431, 8117 2406" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="7907" y="2406">IOR</text>
<polygon fill="#ffff80" points="8117 2506, 8092 2481, 8042 2481, 8017 2506, 8042 2531, 8092 2531, 8117 2506" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="7907" y="2506">CS0</text>
<polygon fill="#ffff80" points="8117 2606, 8092 2581, 8042 2581, 8017 2606, 8042 2631, 8092 2631, 8117 2606" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="7907" y="2606">CS1</text>
<polygon fill="#ffff80" points="8117 2706, 8092 2681, 8042 2681, 8017 2706, 8042 2731, 8092 2731, 8117 2706" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="7907" y="2706">CS2</text>
<polygon fill="#ffff80" points="8117 2806, 8092 2781, 8042 2781, 8017 2806, 8042 2831, 8092 2831, 8117 2806" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="7907" y="2806">CS3</text>
<polygon fill="#ffff80" points="8117 2906, 8092 2881, 8042 2881, 8017 2906, 8042 2931, 8092 2931, 8117 2906" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="7907" y="2906">CS4</text>
<polygon fill="#ffff80" points="8117 3006, 8092 2981, 8042 2981, 8017 3006, 8042 3031, 8092 3031, 8117 3006" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="7907" y="3006">CS5</text>
<polygon fill="#ffff80" points="8117 3106, 8092 3081, 8042 3081, 8017 3106, 8042 3131, 8092 3131, 8117 3106" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="7907" y="3106">CS6</text>
<polygon fill="#ffff80" points="8117 3206, 8092 3181, 8042 3181, 8017 3206, 8042 3231, 8092 3231, 8117 3206" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="7907" y="3206">CS7</text>
<text alignment-baseline="after-edge" fill="#000000" font-family="微软雅黑" font-size="250" font-weight="700" text-anchor="start" x="97" y="316">实验四:可编程中断控制器8259级联实验</text>
<polyline fill="none" points="57 1136, 8117 1136, 14027 1136" stroke="#ff8057" stroke-linecap="round" stroke-linejoin="round" stroke-width="20"/>
<polyline fill="none" points="27 3906, 8117 3906, 9467 3906, 9467 2456" stroke="#000080" stroke-linecap="round" stroke-linejoin="round" stroke-width="20"/>
<polyline fill="none" points="1767 2606, 1867 2606, 1867 2806, 1767 2806" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="1567 2806, 1267 2806" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="1267 3006, 1667 3006, 1667 2906" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="1467 2706, 1467 3006" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="1567 2606, 1267 2606" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<rect fill="#80ff80" height="1400" stroke="#800000" stroke-width="1" width="700" x="9717" y="2006"/>
<text alignment-baseline="after-edge" fill="#000000" font-family="微软雅黑" font-size="250" font-weight="700" text-anchor="start" x="9427" y="1946">8259A_M</text>
<text alignment-baseline="after-edge" fill="#000080" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="9717" y="1956">8259A\8259A.dlsche</text>
<polygon fill="#ffff80" points="9717 2106, 9742 2081, 9792 2081, 9817 2106, 9792 2131, 9742 2131, 9717 2106" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="9827" y="2106">CS</text>
<polygon fill="#ffff80" points="9717 2206, 9742 2181, 9792 2181, 9817 2206, 9792 2231, 9742 2231, 9717 2206" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="9827" y="2206">WR</text>
<polygon fill="#ffff80" points="9717 2306, 9742 2281, 9792 2281, 9817 2306, 9792 2331, 9742 2331, 9717 2306" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="9827" y="2306">RD</text>
<polygon fill="#ffff80" points="9717 2406, 9742 2381, 9792 2381, 9817 2406, 9792 2431, 9742 2431, 9717 2406" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="9827" y="2406">D7</text>
<polygon fill="#ffff80" points="9717 2506, 9742 2481, 9792 2481, 9817 2506, 9792 2531, 9742 2531, 9717 2506" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="9827" y="2506">D6</text>
<polygon fill="#ffff80" points="9717 2606, 9742 2581, 9792 2581, 9817 2606, 9792 2631, 9742 2631, 9717 2606" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="9827" y="2606">D5</text>
<polygon fill="#ffff80" points="9717 2706, 9742 2681, 9792 2681, 9817 2706, 9792 2731, 9742 2731, 9717 2706" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="9827" y="2706">D4</text>
<polygon fill="#ffff80" points="9717 2806, 9742 2781, 9792 2781, 9817 2806, 9792 2831, 9742 2831, 9717 2806" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="9827" y="2806">D3</text>
<polygon fill="#ffff80" points="9717 2906, 9742 2881, 9792 2881, 9817 2906, 9792 2931, 9742 2931, 9717 2906" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="9827" y="2906">D2</text>
<polygon fill="#ffff80" points="9717 3006, 9742 2981, 9792 2981, 9817 3006, 9792 3031, 9742 3031, 9717 3006" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="9827" y="3006">D1</text>
<polygon fill="#ffff80" points="9717 3106, 9742 3081, 9792 3081, 9817 3106, 9792 3131, 9742 3131, 9717 3106" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="9827" y="3106">D0</text>
<polygon fill="#ffff80" points="9717 3206, 9742 3181, 9792 3181, 9817 3206, 9792 3231, 9742 3231, 9717 3206" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="9827" y="3206">CAS0</text>
<polygon fill="#ffff80" points="9717 3306, 9742 3281, 9792 3281, 9817 3306, 9792 3331, 9742 3331, 9717 3306" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="9827" y="3306">CAS1</text>
<polygon fill="#ffff80" points="10417 2106, 10392 2081, 10342 2081, 10317 2106, 10342 2131, 10392 2131, 10417 2106" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="10207" y="2106">A0</text>
<polygon fill="#ffff80" points="10417 2206, 10392 2181, 10342 2181, 10317 2206, 10342 2231, 10392 2231, 10417 2206" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="10207" y="2206">INTA</text>
<polygon fill="#ffff80" points="10417 2306, 10392 2281, 10342 2281, 10317 2306, 10342 2331, 10392 2331, 10417 2306" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="10207" y="2306">IR7</text>
<polygon fill="#ffff80" points="10417 2406, 10392 2381, 10342 2381, 10317 2406, 10342 2431, 10392 2431, 10417 2406" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="10207" y="2406">IR6</text>
<polygon fill="#ffff80" points="10417 2506, 10392 2481, 10342 2481, 10317 2506, 10342 2531, 10392 2531, 10417 2506" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="10207" y="2506">IR5</text>
<polygon fill="#ffff80" points="10417 2606, 10392 2581, 10342 2581, 10317 2606, 10342 2631, 10392 2631, 10417 2606" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="10207" y="2606">IR4</text>
<polygon fill="#ffff80" points="10417 2706, 10392 2681, 10342 2681, 10317 2706, 10342 2731, 10392 2731, 10417 2706" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="10207" y="2706">IR3</text>
<polygon fill="#ffff80" points="10417 2806, 10392 2781, 10342 2781, 10317 2806, 10342 2831, 10392 2831, 10417 2806" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="10207" y="2806">IR2</text>
<polygon fill="#ffff80" points="10417 2906, 10392 2881, 10342 2881, 10317 2906, 10342 2931, 10392 2931, 10417 2906" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="10207" y="2906">IR1</text>
<polygon fill="#ffff80" points="10417 3006, 10392 2981, 10342 2981, 10317 3006, 10342 3031, 10392 3031, 10417 3006" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="10207" y="3006">IR0</text>
<polygon fill="#ffff80" points="10417 3106, 10392 3081, 10342 3081, 10317 3106, 10342 3131, 10392 3131, 10417 3106" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="10207" y="3106">INT</text>
<polygon fill="#ffff80" points="10417 3206, 10392 3181, 10342 3181, 10317 3206, 10342 3231, 10392 3231, 10417 3206" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="10207" y="3206">SP</text>
<polygon fill="#ffff80" points="10417 3306, 10392 3281, 10342 3281, 10317 3306, 10342 3331, 10392 3331, 10417 3306" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="10207" y="3306">CAS2</text>
<polyline fill="none" points="9717 2406, 9517 2406" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="9717 2506, 9517 2506" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="9717 2606, 9517 2606" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="9717 2706, 9517 2706" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="9717 2806, 9517 2806" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="9717 2906, 9517 2906" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="9717 3006, 9517 3006" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="9717 3106, 9517 3106" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<line stroke="#000080" stroke-linecap="round" stroke-width="5" x1="9467" x2="9517" y1="2456" y2="2406"/>
<line stroke="#000080" stroke-linecap="round" stroke-width="5" x1="9467" x2="9517" y1="2556" y2="2506"/>
<line stroke="#000080" stroke-linecap="round" stroke-width="5" x1="9467" x2="9517" y1="2656" y2="2606"/>
<line stroke="#000080" stroke-linecap="round" stroke-width="5" x1="9467" x2="9517" y1="2756" y2="2706"/>
<line stroke="#000080" stroke-linecap="round" stroke-width="5" x1="9467" x2="9517" y1="2856" y2="2806"/>
<line stroke="#000080" stroke-linecap="round" stroke-width="5" x1="9467" x2="9517" y1="2956" y2="2906"/>
<line stroke="#000080" stroke-linecap="round" stroke-width="5" x1="9467" x2="9517" y1="3056" y2="3006"/>
<line stroke="#000080" stroke-linecap="round" stroke-width="5" x1="9467" x2="9517" y1="3156" y2="3106"/>
<text alignment-baseline="after-edge" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="9517" y="2406">DBUS7</text>
<text alignment-baseline="after-edge" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="9517" y="2506">DBUS6</text>
<text alignment-baseline="after-edge" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="9517" y="2606">DBUS5</text>
<text alignment-baseline="after-edge" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="9517" y="2706">DBUS4</text>
<text alignment-baseline="after-edge" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="9517" y="2806">DBUS3</text>
<text alignment-baseline="after-edge" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="9517" y="2906">DBUS2</text>
<text alignment-baseline="after-edge" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="9517" y="3006">DBUS1</text>
<text alignment-baseline="after-edge" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="9517" y="3106">DBUS0</text>
<polyline fill="none" points="9717 2106, 8517 2106, 8517 2506, 8117 2506" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="9717 2206, 8467 2206, 8467 2306, 8117 2306" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="9717 2306, 8567 2306, 8567 2406, 8117 2406" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="10417 2106, 10617 2106, 10917 2106" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<text alignment-baseline="after-edge" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="10457" y="2106">ABUS0</text>
<polyline fill="none" points="10417 3206, 10617 3206" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<line stroke="#000000" stroke-linecap="round" stroke-width="5" x1="10667" x2="10617" y1="3206" y2="3206"/>
<polygon fill="#ffffff" fill-opacity="0.5" points="10667 3206, 10717 3256, 10717 3156, 10667 3206" stroke="#000000" stroke-width="5"/>
<text alignment-baseline="after-edge" fill="#000000" font-family="微软雅黑" font-size="30" font-weight="700" text-anchor="start" transform="rotate(90 10677 3196)" x="10677" y="3196">1</text>
<text alignment-baseline="after-edge" fill="#000000" font-family="Arial" font-size="25" font-weight="700" text-anchor="start" transform="rotate(90 10747 3196)" x="10747" y="3196">U1</text>
<text alignment-baseline="after-edge" fill="#000000" font-family="Arial" font-size="25" font-weight="700" text-anchor="start" transform="rotate(90 10717 3136)" x="10717" y="3136">DIGITAL1</text>
<polyline fill="none" points="3917 2806, 4617 2806, 4617 1006, 10717 1006, 10717 2206, 10417 2206" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="10417 3106, 10817 3106, 10817 906, 3117 906, 3117 1906, 3217 1906" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<text alignment-baseline="after-edge" fill="#000080" font-family="宋体" font-size="25" font-weight="400" text-anchor="start" x="10687" y="3086">高电平,中断请求</text>
<text alignment-baseline="after-edge" fill="#000080" font-family="宋体" font-size="25" font-weight="400" text-anchor="start" x="10427" y="2206">低电平,中断应答</text>
<text alignment-baseline="after-edge" fill="#000080" font-family="宋体" font-size="25" font-weight="400" text-anchor="start" x="10817" y="3226">SP=1,主片</text>
<polyline fill="none" points="13617 2806, 14217 2806, 14717 2806, 14717 2706" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="13617 2906, 14217 2906, 15017 2906, 15017 2806" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="13617 3006, 14217 3006, 15317 3006, 15317 2906" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="10417 2806, 11017 2806, 11867 2806, 11867 2956" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="10417 2906, 11017 2906, 11567 2906, 11567 3056, 11567 3806, 13917 3806, 13917 3106, 13617 3106" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="10417 3006, 11017 3006, 11267 3006, 11267 3156" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<line stroke="#000000" stroke-linecap="round" stroke-width="5" x1="14617" x2="14717" y1="2706" y2="2706"/>
<rect fill="#ffffb0" height="100" stroke="#800000" stroke-width="5" width="100" x="14517" y="2656"/>
<polyline fill="none" points="14527 2606, 14607 2606" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="14567 2606, 14567 2656" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="14537 2736, 14567 2736, 14567 2676, 14597 2676" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/>
<text alignment-baseline="after-edge" fill="#000000" font-family="Arial" font-size="25" font-weight="700" text-anchor="start" x="14557" y="2593">C3</text>
<text alignment-baseline="after-edge" fill="#000000" font-family="Arial" font-size="25" font-weight="700" text-anchor="start" x="14427" y="2716">SCLK</text>
<text alignment-baseline="after-edge" fill="#000080" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="14517" y="2806">Key = 2</text>
<line stroke="#000000" stroke-linecap="round" stroke-width="5" x1="14917" x2="15017" y1="2806" y2="2806"/>
<rect fill="#ffffb0" height="100" stroke="#800000" stroke-width="5" width="100" x="14817" y="2756"/>
<polyline fill="none" points="14827 2706, 14907 2706" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="14867 2706, 14867 2756" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="14837 2836, 14867 2836, 14867 2776, 14897 2776" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/>
<text alignment-baseline="after-edge" fill="#000000" font-family="Arial" font-size="25" font-weight="700" text-anchor="start" x="14857" y="2693">C4</text>
<text alignment-baseline="after-edge" fill="#000000" font-family="Arial" font-size="25" font-weight="700" text-anchor="start" x="14727" y="2816">SCLK</text>
<text alignment-baseline="after-edge" fill="#000080" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="14817" y="2906">Key = 1</text>
<line stroke="#000000" stroke-linecap="round" stroke-width="5" x1="15217" x2="15317" y1="2906" y2="2906"/>
<rect fill="#ffffb0" height="100" stroke="#800000" stroke-width="5" width="100" x="15117" y="2856"/>
<polyline fill="none" points="15127 2806, 15207 2806" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="15167 2806, 15167 2856" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="15137 2936, 15167 2936, 15167 2876, 15197 2876" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/>
<text alignment-baseline="after-edge" fill="#000000" font-family="Arial" font-size="25" font-weight="700" text-anchor="start" x="15157" y="2793">C5</text>
<text alignment-baseline="after-edge" fill="#000000" font-family="Arial" font-size="25" font-weight="700" text-anchor="start" x="15027" y="2916">SCLK</text>
<text alignment-baseline="after-edge" fill="#000080" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="15117" y="3006">Key = 0</text>
<line stroke="#000000" stroke-linecap="round" stroke-width="5" x1="11167" x2="11267" y1="3156" y2="3156"/>
<rect fill="#ffffb0" height="100" stroke="#800000" stroke-width="5" width="100" x="11067" y="3106"/>
<polyline fill="none" points="11077 3056, 11157 3056" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="11117 3056, 11117 3106" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="11087 3186, 11117 3186, 11117 3126, 11147 3126" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/>
<text alignment-baseline="after-edge" fill="#000000" font-family="Arial" font-size="25" font-weight="700" text-anchor="start" x="11107" y="3043">C6</text>
<text alignment-baseline="after-edge" fill="#000000" font-family="Arial" font-size="25" font-weight="700" text-anchor="start" x="10977" y="3166">SCLK</text>
<text alignment-baseline="after-edge" fill="#000080" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="11067" y="3256">Key = A</text>
<line stroke="#000000" stroke-linecap="round" stroke-width="5" x1="11767" x2="11867" y1="2956" y2="2956"/>
<rect fill="#ffffb0" height="100" stroke="#800000" stroke-width="5" width="100" x="11667" y="2906"/>
<polyline fill="none" points="11677 2856, 11757 2856" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="11717 2856, 11717 2906" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="11687 2986, 11717 2986, 11717 2926, 11747 2926" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/>
<text alignment-baseline="after-edge" fill="#000000" font-family="Arial" font-size="25" font-weight="700" text-anchor="start" x="11707" y="2843">C8</text>
<text alignment-baseline="after-edge" fill="#000000" font-family="Arial" font-size="25" font-weight="700" text-anchor="start" x="11577" y="2966">SCLK</text>
<text alignment-baseline="after-edge" fill="#000080" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="11667" y="3056">Key = B</text>
<text alignment-baseline="after-edge" fill="#000080" font-family="宋体" font-size="25" font-weight="400" text-anchor="start" x="10917" y="2696">上升沿触发中断请求</text>
<rect fill="#80ff80" height="1400" stroke="#800000" stroke-width="1" width="700" x="12917" y="2006"/>
<text alignment-baseline="after-edge" fill="#000000" font-family="微软雅黑" font-size="250" font-weight="700" text-anchor="start" x="12677" y="1956">8259A_S</text>
<text alignment-baseline="after-edge" fill="#000080" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="12917" y="1956">8259A\8259A.dlsche</text>
<polygon fill="#ffff80" points="12917 2106, 12942 2081, 12992 2081, 13017 2106, 12992 2131, 12942 2131, 12917 2106" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="13027" y="2106">CS</text>
<polygon fill="#ffff80" points="12917 2206, 12942 2181, 12992 2181, 13017 2206, 12992 2231, 12942 2231, 12917 2206" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="13027" y="2206">WR</text>
<polygon fill="#ffff80" points="12917 2306, 12942 2281, 12992 2281, 13017 2306, 12992 2331, 12942 2331, 12917 2306" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="13027" y="2306">RD</text>
<polygon fill="#ffff80" points="12917 2406, 12942 2381, 12992 2381, 13017 2406, 12992 2431, 12942 2431, 12917 2406" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="13027" y="2406">D7</text>
<polygon fill="#ffff80" points="12917 2506, 12942 2481, 12992 2481, 13017 2506, 12992 2531, 12942 2531, 12917 2506" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="13027" y="2506">D6</text>
<polygon fill="#ffff80" points="12917 2606, 12942 2581, 12992 2581, 13017 2606, 12992 2631, 12942 2631, 12917 2606" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="13027" y="2606">D5</text>
<polygon fill="#ffff80" points="12917 2706, 12942 2681, 12992 2681, 13017 2706, 12992 2731, 12942 2731, 12917 2706" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="13027" y="2706">D4</text>
<polygon fill="#ffff80" points="12917 2806, 12942 2781, 12992 2781, 13017 2806, 12992 2831, 12942 2831, 12917 2806" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="13027" y="2806">D3</text>
<polygon fill="#ffff80" points="12917 2906, 12942 2881, 12992 2881, 13017 2906, 12992 2931, 12942 2931, 12917 2906" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="13027" y="2906">D2</text>
<polygon fill="#ffff80" points="12917 3006, 12942 2981, 12992 2981, 13017 3006, 12992 3031, 12942 3031, 12917 3006" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="13027" y="3006">D1</text>
<polygon fill="#ffff80" points="12917 3106, 12942 3081, 12992 3081, 13017 3106, 12992 3131, 12942 3131, 12917 3106" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="13027" y="3106">D0</text>
<polygon fill="#ffff80" points="12917 3206, 12942 3181, 12992 3181, 13017 3206, 12992 3231, 12942 3231, 12917 3206" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="13027" y="3206">CAS0</text>
<polygon fill="#ffff80" points="12917 3306, 12942 3281, 12992 3281, 13017 3306, 12992 3331, 12942 3331, 12917 3306" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="13027" y="3306">CAS1</text>
<polygon fill="#ffff80" points="13617 2106, 13592 2081, 13542 2081, 13517 2106, 13542 2131, 13592 2131, 13617 2106" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="13407" y="2106">A0</text>
<polygon fill="#ffff80" points="13617 2206, 13592 2181, 13542 2181, 13517 2206, 13542 2231, 13592 2231, 13617 2206" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="13407" y="2206">INTA</text>
<polygon fill="#ffff80" points="13617 2306, 13592 2281, 13542 2281, 13517 2306, 13542 2331, 13592 2331, 13617 2306" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="13407" y="2306">IR7</text>
<polygon fill="#ffff80" points="13617 2406, 13592 2381, 13542 2381, 13517 2406, 13542 2431, 13592 2431, 13617 2406" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="13407" y="2406">IR6</text>
<polygon fill="#ffff80" points="13617 2506, 13592 2481, 13542 2481, 13517 2506, 13542 2531, 13592 2531, 13617 2506" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="13407" y="2506">IR5</text>
<polygon fill="#ffff80" points="13617 2606, 13592 2581, 13542 2581, 13517 2606, 13542 2631, 13592 2631, 13617 2606" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="13407" y="2606">IR4</text>
<polygon fill="#ffff80" points="13617 2706, 13592 2681, 13542 2681, 13517 2706, 13542 2731, 13592 2731, 13617 2706" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="13407" y="2706">IR3</text>
<polygon fill="#ffff80" points="13617 2806, 13592 2781, 13542 2781, 13517 2806, 13542 2831, 13592 2831, 13617 2806" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="13407" y="2806">IR2</text>
<polygon fill="#ffff80" points="13617 2906, 13592 2881, 13542 2881, 13517 2906, 13542 2931, 13592 2931, 13617 2906" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="13407" y="2906">IR1</text>
<polygon fill="#ffff80" points="13617 3006, 13592 2981, 13542 2981, 13517 3006, 13542 3031, 13592 3031, 13617 3006" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="13407" y="3006">IR0</text>
<polygon fill="#ffff80" points="13617 3106, 13592 3081, 13542 3081, 13517 3106, 13542 3131, 13592 3131, 13617 3106" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="13407" y="3106">INT</text>
<polygon fill="#ffff80" points="13617 3206, 13592 3181, 13542 3181, 13517 3206, 13542 3231, 13592 3231, 13617 3206" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="13407" y="3206">SP</text>
<polygon fill="#ffff80" points="13617 3306, 13592 3281, 13542 3281, 13517 3306, 13542 3331, 13592 3331, 13617 3306" stroke="#800000" stroke-width="1"/>
<text alignment-baseline="central" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="13407" y="3306">CAS2</text>
<polyline fill="none" points="9717 3206, 9617 3206, 9617 3606, 12817 3606, 12817 3206, 12917 3206" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="9717 3306, 9667 3306, 9667 3556, 12767 3556, 12767 3306, 12917 3306" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="10417 3306, 10517 3306, 10517 3506, 13717 3506, 13717 3306, 13617 3306" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="12917 2406, 12717 2406" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="12917 2506, 12717 2506" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="12917 2606, 12717 2606" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="12917 2706, 12717 2706" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="12917 2806, 12717 2806" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="12917 2906, 12717 2906" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="12917 3006, 12717 3006" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="12917 3106, 12717 3106" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<text alignment-baseline="after-edge" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="12717" y="2406">DBUS7</text>
<text alignment-baseline="after-edge" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="12717" y="2506">DBUS6</text>
<text alignment-baseline="after-edge" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="12717" y="2606">DBUS5</text>
<text alignment-baseline="after-edge" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="12717" y="2706">DBUS4</text>
<text alignment-baseline="after-edge" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="12717" y="2806">DBUS3</text>
<text alignment-baseline="after-edge" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="12717" y="2906">DBUS2</text>
<text alignment-baseline="after-edge" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="12717" y="3006">DBUS1</text>
<text alignment-baseline="after-edge" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="12717" y="3106">DBUS0</text>
<polyline fill="none" points="10717 1006, 13817 1006, 13817 2206, 13617 2206" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="12917 2306, 12717 2306" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="12917 2206, 12717 2206" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<polyline fill="none" points="12917 2106, 12717 2106, 12617 2106, 12617 1606, 8417 1606, 8417 2706, 8117 2706" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<text alignment-baseline="after-edge" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="12717" y="2106">CS2</text>
<text alignment-baseline="after-edge" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="12717" y="2206">IOW</text>
<text alignment-baseline="after-edge" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="12717" y="2306">IOR</text>
<text alignment-baseline="after-edge" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="9517" y="2206">IOW</text>
<text alignment-baseline="after-edge" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="9517" y="2306">IOR</text>
<text alignment-baseline="after-edge" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="9517" y="2106">CS0</text>
<polyline fill="none" points="13617 2106, 13747 2106, 13917 2106" stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"/>
<text alignment-baseline="after-edge" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="13637" y="2106">ABUS0</text>
<text alignment-baseline="after-edge" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="10467" y="3106">INTR</text>
<text alignment-baseline="after-edge" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="10467" y="3006">IR0_M</text>
<text alignment-baseline="after-edge" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="10467" y="2906">IR1_M</text>
<text alignment-baseline="after-edge" fill="#800000" font-family="Times New Roman" font-size="25" font-weight="400" text-anchor="start" x="10467" y="2806">IR2_M</text>
<line stroke="#000080" stroke-linecap="round" stroke-width="5" x1="12667" x2="12717" y1="2456" y2="2406"/>
<line stroke="#000080" stroke-linecap="round" stroke-width="5" x1="12667" x2="12717" y1="2556" y2="2506"/>
<line stroke="#000080" stroke-linecap="round" stroke-width="5" x1="12667" x2="12717" y1="2656" y2="2606"/>
<line stroke="#000080" stroke-linecap="round" stroke-width="5" x1="12667" x2="12717" y1="2756" y2="2706"/>
<line stroke="#000080" stroke-linecap="round" stroke-width="5" x1="12667" x2="12717" y1="2856" y2="2806"/>
<line stroke="#000080" stroke-linecap="round" stroke-width="5" x1="12667" x2="12717" y1="2956" y2="2906"/>
<line stroke="#000080" stroke-linecap="round" stroke-width="5" x1="12667" x2="12717" y1="3056" y2="3006"/>
<line stroke="#000080" stroke-linecap="round" stroke-width="5" x1="12667" x2="12717" y1="3156" y2="3106"/>
<polyline fill="none" points="9467 3906, 12667 3906, 12667 2456" stroke="#000080" stroke-linecap="round" stroke-linejoin="round" stroke-width="20"/>
<polyline fill="none" points="12667 3906, 14117 3906" stroke="#000080" stroke-linecap="round" stroke-linejoin="round" stroke-width="20"/>
<line stroke="#000080" stroke-linecap="round" stroke-width="5" x1="10917" x2="10967" y1="2106" y2="2056"/>
<polyline fill="none" points="10967 2056, 10967 1136" stroke="#ff8057" stroke-linecap="round" stroke-linejoin="round" stroke-width="20"/>
<line stroke="#000080" stroke-linecap="round" stroke-width="5" x1="13917" x2="13967" y1="2106" y2="2056"/>
<polyline fill="none" points="13967 2056, 13967 1136" stroke="#ff8057" stroke-linecap="round" stroke-linejoin="round" stroke-width="20"/>
<circle cx="7217" cy="1136" fill="#000080" r="25" stroke="#000080" stroke-width="5"/>
<circle cx="5317" cy="1136" fill="#000080" r="25" stroke="#000080" stroke-width="5"/>
<circle cx="4217" cy="1136" fill="#000080" r="25" stroke="#000080" stroke-width="5"/>
<circle cx="6417" cy="3906" fill="#000080" r="25" stroke="#000080" stroke-width="5"/>
<circle cx="2817" cy="3906" fill="#000080" r="25" stroke="#000080" stroke-width="5"/>
<circle cx="1467" cy="3006" fill="#0000ff" r="8" stroke="#0000ff" stroke-width="5"/>
<circle cx="10717" cy="1006" fill="#0000ff" r="8" stroke="#0000ff" stroke-width="5"/>
<circle cx="9467" cy="3906" fill="#000080" r="25" stroke="#000080" stroke-width="5"/>
<circle cx="12667" cy="3906" fill="#000080" r="25" stroke="#000080" stroke-width="5"/>
<circle cx="10967" cy="1136" fill="#000080" r="25" stroke="#000080" stroke-width="5"/>
<circle cx="13967" cy="1136" fill="#000080" r="25" stroke="#000080" stroke-width="5"/>
</svg>
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论