学历改变命运
24小时客服:4008135555/010-82335555
当前位置:首页> 历年试题 > 北大接口所有上机类型题目和答案(4)

北大接口所有上机类型题目和答案(4)

2007年03月06日    来源:   字体:   打印
成绩查询

  9. 8255方式0,C口输入0~Fh,A口输出在数码管上显示对应数,计算机显示器显示该数加1, 有键按下返回DOS,无键按下继续执行。(在计算机显示器上即输入0显示1,输入F时显示G)。

  data segment

  led db 3fh,06h,5bh,4fh,66h,6dh,7dh,07h,7fh,67h,77h,7ch,39h,5eh,79h,71h

  data ends

  code segment

  assume cs:code,ds:data

  start: mov dx.,28bh

  mov al,89h

  out dx,al

  lea bx,led

  l1: mov dx,28ah

  in al,dx

  and al,0fh

  call disp

  xlat

  mov dx,288h

  out dx,al

  mov ah,1

  int 16h

  jz l1

  mov ah,4ch

  int 21h

  disp proc near

  push dx

  push ax

  add al,1

  mov dl,al

  cmp dl,0ah

  jb d1

  add dl,7

  d1: add dl,30h

  mov ah,02

  int 21h

  mov dl,0dh

  int 21h

  mov dl,0ah

  int 21h

  pop ax

  pop dx

  disp endp

  code ends

  end start

  10. 8253通道0方式0,计数值为0Fh,手动逐个输入脉冲,从计算机显示器上显示对应的数。

  code segment

  assume cs:code

  start: mov dx,283h

  mov al,10h

  out dx,al

  mov dx,280h

  mov al,0fh

  out dx,al

  l1: mov dx,280h

  in al,dx

  call disp

  mov ah,1

  int 16h

  jz l1

  mov ah,4ch

  int 21h

  disp proc near

  push dx

  and al,0fh

  mov dl,al

  cmp dl,9

  jbe num

  add dl,7

  num: add dl,30h

  mov ah,02h

  int 21h

  mov dl,0dh

  int 21h

  mov dl,0ah

  int 21h

  pop dx

  ret

  disp endp

  code ends

  end start

关注添加

扫码添加学习顾问

了解考试计划,进行学习规划
备战考试,获取试题及资料

扫码下载APP

海量历年试题、备考资料
免费下载领取

扫码进入微信小程序

每日练题巩固、考前模拟实战
免费体验自考365海量试题

免费题库

新人有礼
关闭