snakehl
驱动牛犊
驱动牛犊
  • 注册日期2001-07-29
  • 最后登录
  • 粉丝0
  • 关注0
  • 积分0分
  • 威望0点
  • 贡献值0点
  • 好评度0点
  • 原创分0分
  • 专家分0分
阅读:1387回复:0

我的一段程序代码

楼主#
更多 发布于:2001-10-06 15:57
下面是我的一段程序代码:
不知道按照时序对不对:
read interrupt register:只是读中断寄存器的第一字节
     mov    a,#0f4h
     clr    p1.6
     lcall  D12GetStatus
     setb   p1.6    (PDIUSBD12的片选)
D12Write:
     movx   @dptr,a
     nop
     nop
     nop
     nop
     ret
D12Command:
     mov    dptr,#01h
     lcall  D12Write
     dec    dpl
     ret
D12GetStatus:
     lcall  D12Command
D12Read:
     movx   a,@dptr
     nop
     nop
     nop
     nop
     ret
游客

返回顶部