欢迎来到广东自考在线!广东自考在线为广大广东省自考生提供自考资讯、备考资源等,助力通过自考提升学历,点亮人生梦想!

">广东自考在线

您现在的位置:首页 > 备战自考 > 模拟试题

2018年自考微型计算机及接口技术题四

2020-04-22 10:40:50本文标签:

2018年自考微型计算机及接口技术题四

题目:用计数器/定时器8253,通道1,方式0,计数器初值为0fh,手动单脉冲控制从8255a口输出到数码器,以递增的顺序显示0~f。要求:写出控制方式字,初值和连线图。 

程序如下: 

1:8255方式字=10000000=80h; 

8253方式字=01010000=50h; 

2:初值=0fh; 

3:连线图略; 

4:程序: 

data segment 

led  db 71h,79h,3fh,39h,7fh,77h,67h,7fh 

db 07h,7ch,6dh,6eh,4fh,5bh,06h,3fh 

data ends 

code segment 

assume  cs:code,ds:data 

start: mov ax,data 

mov ds,ax 

mov dx,28bh 

mov al,80h 

out dx,al 

mov dx,283h 

mov al,50h 

out dx,al 

mov dx,281h 

mov al,0fh 

out dx,al 

inout:in al,dx 

and al,0fh 

mov bx,offset led 

xlat 

mov dx,288h 

out dx,al 

mov ah,1 

int 16h 

je inout 

mov ah,4ch 

int 21h 

code ends 

  end start 

学历
咨询