自考

各地资讯
当前位置:考试网 >> 自学考试 >> 模拟试题 >> 工学类 >> 微型计算机接口技术 >> 文章内容

排行热点

2012年自考微型计算机及接口技术题十_第2页

来源:考试网 [ 2012年2月29日 ] 【大 中 小】
 2. 8255方式0,A口输入,输入的数高4位不变低4位取反,在8255的C口输出,有键按下返回DOS,无键按下继续执行。
  code segment
  assume cs:code
  start: mov dx,28bh
  mov al,90h
  out dx,al
  l1: mov dx,288h
  in al,dx
  xor al,0fh
  mov dx,28ah
  out dx,al
  mov ah,1
  int 16h
  jz l1
  mov ah,4ch
  int 21h
  code ends
  end start
  3.8255方式0,C口低4位输入数据取反,在8255的C口高4位输出,有键按下返回DOS,无键按下继续执行。
  code segment
  assume cs:code
  start: mov dx,28bh
  mov al,81h
  out dx,al
  l1: mov dx,28ah
  in al,dx
  mov cl,4
  shl al,cl
  xor al,0f0h
  mov dx,28ah
  out dx,al
  mov ah,1
  int 16h
  jz l1
  mov ah,4ch
  int 21h
  code ends
 
责编:snrvge