📄 微机原理实验内容.htm
字号:
mov ax,0<BR> mov
bx,0<BR> mov
cx,0<BR> push
ax<BR> push
bx<BR> push
cx ; time in
ax,bx,cx<BR> mov
ax,sp<BR> mov
bp,ax<BR>;------------------------------------show number<BR>kplay2:call
disply<BR> call
dislay<BR><BR> mov dx,04c0h ; check
ctc<BR>in11: in al,dx<BR> test
al,1<BR> jz in11<BR>in12: in
al,dx<BR> test
al,1<BR> jnz
in12<BR> mov
cx,[bp]<BR> inc
cl<BR> cmp
cl,10<BR> jne
nextcm<BR> mov
cl,0<BR> inc
ch<BR> cmp
ch,10<BR> jne
nextcm<BR> mov
ch,0<BR> mov
bx,[bp+2]<BR> inc
bl<BR> cmp
bl,10<BR> jne
nextbx<BR> mov
bl,0<BR> inc
bh<BR> cmp
bh,6<BR> jne
nextbx<BR> mov
bh,0<BR> mov
ax,[bp+4]<BR> inc
al<BR> cmp
al,10<BR> jne
nextax<BR> mov
al,0<BR> inc
ah<BR> cmp
ah,6<BR> jne
nextax<BR> mov
ah,0<BR> jmp nextax<BR>nextcm:jmp
nextcx<BR>nextax:mov [bp+4],ax<BR>showah:push
cx<BR> push
bx<BR> mov
bl,ah<BR> mov
bh,0<BR> mov
si,bx<BR> mov bx,offset
table1<BR> mov
cl,es:[bx+si]<BR> mov di,offset
disbuf<BR> mov es:[di],cl<BR>showal:mov
ah,0<BR> mov
si,ax<BR> mov bx,offset
table1<BR> mov
al,es:[bx+si]<BR> mov di,offset
disbuf<BR> mov
es:[di+1],al<BR> pop
bx<BR> pop cx<BR>nextbx:mov
[bp+2],bx<BR>showbh:push cx<BR> mov
ax,bx<BR> mov
bl,ah<BR> mov
bh,0<BR> mov
si,bx<BR> mov bx,offset
table1<BR> mov
cl,es:[bx+si]<BR> mov di,offset
disbuf<BR> mov es:[di+2],cl<BR>showbl:mov
ah,0<BR> mov
si,ax<BR> mov bx,offset
table1<BR> mov
al,es:[bx+si]<BR> mov di,offset
disbuf<BR> mov
es:[di+3],al<BR> pop cx<BR>nextcx:mov
[bp],cx<BR>showch:mov bl,ch<BR> mov
bh,0<BR> mov
si,bx<BR> mov bx,offset
table1<BR> mov
al,es:[bx+si]<BR> mov di,offset
disbuf<BR> mov es:[di+4],al<BR>showcl:mov
ch,0<BR> mov
si,cx<BR> mov bx,offset
table1<BR> mov
al,es:[bx+si]<BR> mov di,offset
disbuf<BR>mov
es:[di+5],al<BR>;-----------------------------------<BR>
jmp kplay2<BR>;-----------------------------------<BR>dislay:mov
bx,2eeh<BR>disla2:dec bx<BR> jnz
disla2<BR> mov
ax,0c2h<BR> mov
dx,con8279<BR> out
dx,ax<BR>
ret<BR>;-----------------------------------<BR>disply:call
black<BR> mov
ax,90h<BR> mov
dx,con8279<BR> out
dx,ax<BR> mov
dx,dat8279<BR> mov
cx,8<BR> mov di,offset
disbuf<BR>dlo: mov
al,es:[di]<BR> mov
ah,0<BR> out
dx,ax<BR> inc
di<BR> loop
dlo<BR>
ret<BR>;----------------------------------<BR>black: mov
dx,con8279<BR> mov
ax,0d1h<BR> out
dx,ax<BR> mov cx,80h<BR>clsb:
nop<BR> ;
nop<BR> loop
clsb<BR> ret<BR><BR>code
ends<BR> end
start<BR>!设计实验:给实验六加上暂停功能,即开关控制计时可暂停、继续。</P>
<P style="MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px"
align=left> <A
name=7></A>
<A
href="http://home.jznu.net/lbnet/sy/synr.htm#top">返回目录</A><BR>----------------------------------------------------------------<BR>
实验八 模拟交通灯显示综合实验<BR> 硬件连线:
8253OUT0接74LS244的SI<SUB>0</SUB>,地址译码输出CS<SUB>0</SUB>与8253的片选CS相连;</P>
<P style="MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px"
align=left>
8个发光二极管与74LS273的SO相连,地址译码输出CS<SUB>1</SUB>与74LS273的片选CS相连<BR>
地址译码输出CS<SUB>2</SUB>与74LS244的片选CS相连</P>
<P style="MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px" align=left> 实验效果:
类似路口交通灯显示,LED显示时间。<BR>----------------------------------------------------------------</P>
<P style="MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px"
align=left>汇编程序:<BR>;==================================================================<BR>;<BR>;
This program use 8253 show time and control
light<BR>;<BR>;==================================================================<BR>con8279
equ 0492h<BR>dat8279 equ 0490h<BR>assume cs:code<BR>code segment public<BR>org
100h<BR>start: jmp start1</P>
<P style="MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px" align=left>table1 db
3fh,06h,5bh,4fh,66h,6dh,7dh,07h,7fh,6fh<BR>disbuf db 6 dup(0)<BR>second db
9<BR>;------------------------------------start initial<BR>start1: mov di,offset
disbuf<BR>mov cx,6<BR>ini0: mov byte ptr es:[di],0h<BR>inc di<BR>loop ini0 ;
show 00:00:00 first<BR><BR>mov dx,04a6h ; initial ctc8253<BR>mov al,36h ; ctc0
16bits mode3 cycle<BR>out dx,al<BR>mov dx,04a0h<BR>mov al,24h<BR>out
dx,al<BR>mov al,0fh<BR>out dx,al ; out ctc data 16
bits<BR>;------------------------------------show number<BR>kplay2: mov
cl,9<BR>mov second,cl<BR>mov ch,0<BR>mov si,cx<BR>mov bx,offset table1<BR>mov
al,es:[bx+si]<BR>mov di,offset disbuf<BR>mov es:[di+3],al<BR>call disply<BR>call
dislay<BR>;---------------------------------cycle 1<BR>mov dx,04b0h<BR>mov
al,21h<BR>out dx,al ; show 1<BR>mov bx,4<BR>push bx<BR>c11: mov cx,100<BR>c12:
call c100s<BR>loop c12 ; 1 second<BR>mov cl,second<BR>dec cl<BR>mov ch,0<BR>mov
si,cx<BR>mov bx,offset table1<BR>mov al,es:[bx+si]<BR>mov di,offset
disbuf<BR>mov es:[di+3],al<BR>mov second,cl<BR>call disply<BR>call dislay<BR>pop
bx<BR>dec bx<BR>push bx<BR>jnz c11<BR>pop bx<BR>mov bx,5<BR>push bx<BR>c13: mov
dx,04b0h<BR>mov al,1h<BR>out dx,al ; flash<BR>mov cx,30<BR>c14: call
c100s<BR>loop c14 ; 0.3 second<BR>mov dx,04b0h<BR>mov al,21h<BR>out dx,al ; show
1<BR>mov cx,70<BR>c15: call c100s<BR>loop c15 ; 0.7 second<BR>mov
cl,second<BR>dec cl<BR>mov ch,0<BR>mov si,cx<BR>mov bx,offset table1<BR>mov
al,es:[bx+si]<BR>mov di,offset disbuf<BR>mov es:[di+3],al<BR>mov
second,cl<BR>call disply<BR>call dislay<BR>pop bx<BR>dec bx<BR>push bx<BR>jnz
c13<BR>;---------------------------------cycle 2<BR>mov cl,8<BR>mov
second,cl<BR>mov dx,04b0h<BR>mov al,12h<BR>out dx,al ; show 2<BR>mov ch,0<BR>mov
si,cx<BR>mov bx,offset table1<BR>mov al,es:[bx+si]<BR>mov di,offset
disbuf<BR>mov es:[di+3],al<BR>call disply<BR>call dislay<BR>pop bx<BR>mov
bx,3<BR>push bx<BR>c21: mov cx,100<BR>c22: call c100s<BR>loop c22 ; 1
second<BR>mov cl,second<BR>dec cl<BR>mov ch,0<BR>mov si,cx<BR>mov bx,offset
table1<BR>mov al,es:[bx+si]<BR>mov di,offset disbuf<BR>mov es:[di+3],al<BR>mov
second,cl<BR>call disply<BR>call dislay<BR>pop bx<BR>dec bx<BR>push bx<BR>jnz
c21<BR>pop bx<BR>mov bx,5<BR>push bx<BR>c23: mov dx,04b0h<BR>mov al,2h<BR>out
dx,al ; flash<BR>mov cx,30<BR>c24: call c100s<BR>loop c24 ; 0.3 second<BR>mov
dx,04b0h<BR>mov al,12h<BR>out dx,al ; show 2<BR>mov cx,70<BR>c25: call
c100s<BR>loop c25 ; 0.7 second<BR>mov cl,second<BR>dec cl<BR>mov ch,0<BR>mov
si,cx<BR>mov bx,offset table1<BR>mov al,es:[bx+si]<BR>mov di,offset
disbuf<BR>mov es:[di+3],al<BR>mov second,cl<BR>call disply<BR>call dislay<BR>pop
bx<BR>dec bx<BR>push bx<BR>jnz c23<BR>pop bx<BR>jmp kplay2<BR><BR>c100s: mov
dx,04c0h ; ctc 1/100 s<BR>in11: in al,dx<BR>test al,1<BR>jz in11<BR>in12: in
al,dx<BR>test al,1<BR>jnz in12<BR>ret<BR><BR>dislay: mov bx,2eeh<BR>disla2: dec
bx<BR>jnz disla2<BR>mov ax,0c2h<BR>mov dx,con8279<BR>out
dx,ax<BR>ret<BR><BR>disply: call black<BR>mov ax,90h<BR>mov dx,con8279<BR>out
dx,ax<BR>mov dx,dat8279<BR>mov cx,8<BR>mov di,offset disbuf<BR>dlo: mov
al,es:[di]<BR>mov ah,0<BR>out dx,ax<BR>inc di<BR>loop dlo<BR>ret<BR><BR>black:
mov dx,con8279<BR>mov ax,0d1h<BR>out dx,ax<BR>mov cx,80h<BR>clsb: nop<BR>;
nop<BR>loop clsb<BR>ret<BR><BR>code ends<BR>end
start<BR>;=====================================================<BR>
<A href="http://home.jznu.net/lbnet/sy/synr.htm#top">返回目录</A></P>
<P style="MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px" align=center><IMG height=498
src="微机原理实验内容_files/synr1.gif" width=1058 border=0></P><FONT size=3>
<P style="LINE-HEIGHT: 150%" align=justify>
</FONT><I><FONT face=8514fix size=3>TCP and IP were developed by a Department of
Defense (DOD) research project to connect a <U>number different networks
designed by different vendors into a network of networks (the</U> "Internet").
It was initially successful because it delivered a few basic services that
everyone <U>needs (file transfer, electronic mail, remote logon) across a very
large number of client and</U> server systems. Several computers in a small
department can use TCP/IP (along with other <U>protocols) on a single LAN. The
IP component provides routing from the department to the</U> enterprise network,
then to regional networks, and finally to the global Internet. On the
<U>battlefield a communications network will sustain damage, so the DOD designed
TCP/IP to be robust</U> and automatically recover from any node or phone line
failure. This design allows the <U>construction of very large networks with less
central management. However, because of the</U> automatic recovery, network
problems can go undiagnosed and uncorrected for long periods of
time.</FONT></I></P><FONT lang=ZH-CN face=宋体 size=3></FONT>
<P style="LINE-HEIGHT: 150%" align=justify><I><FONT face=8514fix
size=3> <U>Network of Lowest Bidders: The
Army puts out a bid on a computer and DEC wins the bid. The</U> Air Force puts
out a bid and IBM wins. The Navy bid is won by Unisys. Then the President
decides t<U>o invade Grenada and the armed forces discover that their computers
cannot talk to each other.</U> The DOD must build a "network" out of systems
each of which, by law, was delivered by the lowest <U>bidder on a single
contract. The Internet Protocol was developed to create a Network of
Networks</U> (the "Internet"). Individual machines are first connected to a LAN
(Ethernet or Token Ring). <U>TCP/IP shares the LAN with other uses (a Novell
file server, Windows for Workgroups peer</U> systems). One device provides the
TCP/IP connection between the LAN and the rest of the world. To <U>insure that
all types of systems from all vendors can communicate, TCP/IP is absolutely</U>
standardized on the LAN. However, larger networks based on long distances and
phone lines are <U>more volatile. In the US, many large corporations would wish
to reuse large internal networks</U> based on IBM's SNA. In Europe, the national
phone companies traditionally standardize on X.25. <U>However, the sudden
explosion of high speed microprocessors, fiber optics, and digital phone</U>
systems has created a burst of new options: ISDN, frame relay, FDDI,
Asynchronous Transfer Mode <U>(ATM). New technologies arise and become obsolete
within a few years. With cable TV and phone</U> companies competing to build the
National Information Superhighway, no single standard can govern <U>citywide,
nationwide, or worldwide communications.</U></FONT></I></P></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -