网站公告列表

  没有公告

加入收藏
设为首页
联系站长
您现在的位置: 范文网 >> 自考和成人高考 >> 自考复习资料 >> 正文
  北大“接口技术”上机类型题目及答案(3)            【字体:
北大“接口技术”上机类型题目及答案(3)
作者:佚名    资料来源:不详    点击数:    更新时间:2008-3-21    
  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

  11. 8253通道0方式0,从8255C口读入计数值,手动逐个输入脉冲,从A口输出在数码管显示其值。

  code segment

  assume cs:code

  start: mov dx,28bh

  mov al,88h

  out dx,al

  mov dx,28ah

  in al,dx

  mov cl,4

  shr al,cl

  and al,0fh

  mov bl,al

  mov dx,283h

  mov al,10h

  out dx,al

  mov al,bl

  mov dx,280h

  out dx,al

  l1: mov dx,280h

  in al,dx

  mov dx,288h

  out dx,al

  mov ah,1

  int 16h

  jz l1

  mov ah,4ch

  int 21h

  code ends

  end start

  12. 8253通道1方式1(硬件可重触发),计数值0Fh,用8255A口输出在数码管显示值,有键按下返回DOS,无键按下继续执行。

  data segment

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

  data ends

  code segment

  assume cs:code,ds:data

  start: mov ax,data

  mov ds,ax

  lea bx,led

  mov dx,28bh

  mov al,80h

  out dx,al

  mov dx,283h

  mov al,52h

  out dx,al

  mov al,0fh

  mov dx,281h

  out dx,al

  l1: mov dx,281h

  in al,dx

  xlat

  mov dx,288h

  out dx,al

  push dx

  mov ah,06h

  mov dl,0ffh

  int 21h

  pop dx

  jz l1

  mov ah,4ch

  int 21h

  code ends

  end start

  13. 8253通道1方式0,计数值为0Fh,手动逐个输入脉冲,用8255C口输出在数码管显示其值,并在计算机显示器显示,但计算机上显示顺序为0~F递增。

  data segment

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

  data ends

  code segment

  assume cs:code,ds:data

  start: mov ax,data

  mov ds,ax

  lea bx,led

  mov dx,28bh

  mov al,80h

  out dx,al

  mov dx,283h

  mov al,50h

  out dx,al

  mov al,0fh

  mov dx,281h

  out dx,al

  l2: mov dx,281h

  in al,dx

  call disp

  xlat

  mov dx,28ah

  out dx,al

  mov ah,1

  int 16h

  jz l2

  mov ah,4ch

  int 21h

  disp proc near

  push dx

  push ax

  mov cl,0fh

  sub cl,al

  mov al,cl

  cmp al,0ah

  jb d1

  add al,07h

  d1: add al,30h

  mov dl,al

  mov ah,02h

  int 21h

  mov dl,0dh

  int 21h

  mov dl,0ah

  int 21h

  pop ax

  pop dx

  ret

  disp endp

  code ends

  end start

资料录入:admin    责任编辑:admin 
  • 上一个资料:

  • 下一个资料:
  • 发表评论】【加入收藏】【告诉好友】【打印此文】【关闭窗口
    最新热点 最新推荐 相关文章
    北大“接口技术”上机类型题…
    北大“接口技术”上机类型题…
    07年北大自考“心理测验学”…
    07年北大自考“心理测验学”…
    07年北大自考“心理测验学”…
    07年北大自考“心理测验学”…
    07年北大自考“心理测验学”…
    07年10月自考“心理治疗”北…
    07年10月自考“心理治疗”北…
    07年10月自考“心理治疗”北…
      网友评论:(只显示最新10条。评论内容只代表网友观点,与本站立场无关!)
    fanweng.com版权所有,未经授权禁止转载、摘编、复制或建立镜像.如有违反,追究法律责任 站长:棒棒龙