微机原理及接口技术a模块实验指导书内容摘要:

3 C4 56BAD7 8 91 91 81 71 62 22 12 0+=清“ 0 ”O F E / C S 5 5P B 08 2 5 5P B 5...L hY 5P C 0P C 3...X 0X 3P A 0...L aP A 7Y 02 0 0 H~2 0 3 HA 2 A 1 A 0地 址 译 码 说明: A 键为加法键, B 键为减法键, C 键为等于键, D 键为清零键。 11 三、主要试验步骤: 根据实验要求设计实验原理图,并标明端口地址。 画出程序框图。 根据框图编写程序。 根据原理图连线,并确保连线正确,接触可靠。 输入程序进行调试,实现实验题目要求。 写出实验报告。 四、试验参考程序: title code segment assume cs:code,ds:code start: jmp start1 buff db 1,2,3,4,5,6 tablek dw 3e07h,3e0bh,3d0bh,3b0bh,3e0dh,3d0dh,3b0dh,3e0eh,3d0eh,3b0eh dw 370eh,370dh,370bh,3707h,3b07h,3d07h,2f07h,2f0bh,2f0dh,2f0eh,1f07h,1f0bh,1f0dh table db 3fh,6,5bh,4fh,66h,6dh,7dh,7,7fh,6fh,46h,40h,48h,00 x dw 0 y dw 0 f db 0 n db 0 c db 0 addf db 0 subf db 0 start1: mov ax,cs mov ds,ax call clear again: mov dx,203h mov al,10001001b out dx,al call led call key cmp f,1 jne again cmp bl,9 jle d_proce cmp bl,10 je to_add cmp bl,11 je to_sub cmp bl,12 je to_equ cmp bl,13 je clear1 jmp again clear1: call clear call clbuf jmp again 12 d_proce: cmp n,1 je d_p_y mov cl,4 shl x,cl mov bh,0 add x,bx call bshift mov buff+5,bl jmp again d_p_y: mov cl,4 shl y,cl mov bh,0 add y,bx call bshift mov buff+5,bl jmp again to_add: call bshift mov buff+5,bl mov f,0 mov n,1 mov addf,1 jmp again to_sub: call bshift mov buff+5,bl mov f,0 mov n,1 mov subf,1 jmp again to_equ: mov ax,x cmp subf,1 je to_s mov bx,y add al,bl daa mov bl,al mov al,ah adc al,bh daa mov bh,al mov x,0 mov y,0 mov addf,0 call store jmp again to_s: mov bx,y sub al,bl 13 das mov bl,al mov al,ah sbb al,bh das mov bh,al mov x,0 mov y,0 mov subf,0 call store jmp again key proc mov dx,203h mov al,10001001b。 c_in,b_out out dx,al mov f,0 mov dx,201h mov al,0 out dx,al mov dx,202h in al,dx and al,0fh cmp al,0fh je k_exit mov cx,3000 loop $。 10ms in al,dx and al,0fh push ax mov dx,203h mov al,10000010b。 b_in,c_out out dx,al pop ax mov bl,al mov dx,202h out dx,al mov dx,201h in al,dx and al,3fh mov bh,al lea si,tablek mov cx,23 mov ah,0 nk: cmp bx,[si] je found inc ah add si,2 loop nk 14 found: mov al,0 mov dx,202h out dx,al mov dx,201h in al,dx and al,3fh cmp al,3fh jne found mov cx,3000 loop $ mov f,1 mov bl,ah。 键值 k_exit: ret key endp store proc mov word ptr buff,1414h。 no display lea si。
阅读剩余 0%
本站所有文章资讯、展示的图片素材等内容均为注册用户上传(部分报媒/平媒内容转载自网络合作媒体),仅供学习参考。 用户通过本站上传、发布的任何内容的知识产权归属用户或原始著作权人所有。如有侵犯您的版权,请联系我们反馈本站将在三个工作日内改正。