北大微型计算机及其接口技术上机考题汇编_理学-查字典自考网
 
请输入您要查询的关键词
  查字典自考网 >> 理学 >> 北大微型计算机及其接口技术上机考题汇编

北大微型计算机及其接口技术上机考题汇编

发布时间: 2016-06-29 来源:查字典自考网

这几天北大上机考试都开始了,这几天考的接口上机考题都有一些难度,至少比上次考的难些!今天下午的考题是:8255的A口交替输出AAh和55h,时间间隔为1秒。当8253方式0输入三个单脉冲事终止。8253为通道1.

9月11号上午的考题

8253性质通道1方式0,手动输入单脉冲,out1给8255的pa0,8255a口输入c口输出给8个指示灯。

当pa0=0的时候指示灯每隔一个亮,且间隔一秒当

pa0=1的时候指示灯每隔两个亮,且间隔一秒

9月10日下午考题

8253通道1方式0,记数初值3,out1输出到pa0口,8255方式0,a口输入,c 口输出到LED灯上,当PA0=0时,01010101-10101010循环,当PA0=1时,00110011-11001100循环,有键按下返回DOS.

9月6日上午题

8255A c口低四位输入,a口输出到数码段,当pc0=0 时,a口输出是加一循环(0~f),pc0=1时,a口输出是减一循环(f~0),输出时延一秒钟,有键按下就退出……

data segment

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

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

count db 0(定义循环初始值为零)

data ends

code segment

assume cs:code,ds:data

start: mov ax,data

mov ds,ax

mov dx,28bh

mov al,81h

out dx,al(8255初始化)

input:mov dx,28ah

in al,dx and al,0fh

and al,01h(判断pc0)

jz a1 mov al,count

and al,0fh(要屏蔽高四位,以免超过15后出乱码)

lea bx,led

xlat

mov dx,288h

out dx,al

call delay(延迟子程序老师会给出)

dec count

mov ah,1

int 16h

jzinput(判断是否有键按下,无则继续判断pc0)

jmp a2(有则返回dos)

a1: mov al,count

and al,0fh

lea bx,led

xlat

mov dx,288h

out dx,al

call delay

inc count

mov ah,1

int 16h

jz input

a2: mov ah,4ch

int 21h

delay proc near.

.

.

.

delay endp

code ends

end start

9月8日接口上午题

8253方式0,通道1,计数初值来自8255A口低四位,将计数结果从8255C口显示至七段数码管,并从8255A口高四位输出到指示灯高四位,键盘有键按下返回DOS,否则继续执行。

9月7号下午考题

8253clk0输入1MHZ脉冲,OUT1输出1HZ到8255C囗,若PC0=1,则PA囗输出11001100,

若PC0=0,则PA囗输出00110011.

不难吧!我二十分钟就搞定了。答案太长了,我给出一部分吧。

初始化部分

l1:mov dx,281h

in al,dx

mov dx,28ah

out dx,al

mov dx,28ah

in al,dx

test al,01

jz l2

mov dx,288h

mov al,cch

out dx,al

jmp l3

l2: mov dx,288h

mov al,33h

out dx,al

l3:mov ah.01h

int 16h

jz l1

mov ah,4ch

int 21h

9月7日上午考题

8255方式0,从C口输入一个数最大值为0FFH,再检测C0输入的数据,如为1,则+1,从A口输出,如为0,则—1从A口输出,延时一秒,有键按下则退出

code segment

assume cs:code

start:mov al,89h

mov dx,28bh

out dx ,al

mov dx,28ah

in al,dx

mov bl,al

mov cl,al

l:mov dx,28ah

in al,dx

test al,1

jz a

inc bl

mov al,bl

jmp b

a:dec cl

mov al,cl

b:mov dx,288h

out dx.al

mov ah,16h

int 21h

jz l

mov ah,4ch

int 21h

delay proc near

.

.

.

dalay endp

code ends

end start

点击显示
推荐文章
猜你喜欢
附近的人在看
推荐阅读
拓展阅读

当前热点关注

  • 大家都在看
  • 小编推荐
  • 猜你喜欢
  • [相关地区]