8086基本IO口的仿真

8086基本IO口的仿真

 

 

准备工作

下载Proteus 8.6

 


 

 

编译器

 


 

 

电路部分

 


 

 

程序部分

;====================================================================
; Main.asm file generated by New Project wizard
;
; Created:   周日 7月 7 2019
; Processor: 8086
; Compiler:  MASM32
;
; Before starting simulation set Internal Memory Size 
; in the 8086 model properties to 0x10000
; 一定要注意芯片的选择,以及时序关系
; 上述两者是有关系的
;====================================================================
data   segment
IO_OA equ  40h
IO_IA equ  48h
data   ends
CODE    SEGMENT PUBLIC 'CODE'
        ASSUME CS:CODE,ds:data

START:
        mov ax,data
    mov ds,ax
l:	
    mov dx,IO_IA
    in  al,dx;
    test al,01h
    jnz clAL
    mov al,0ffh
    jmp OUTPUT
clAL:   
        xor al,al;
OUTPUT:	
    mov dx,IO_OA
    out dx,al
        JMP l
CODE    ENDS
        END START

运行结果

 

结果1
结果1

 

 

结果2
结果2

 

其他

  1. 需要源文件可以联系本人

总结

  1. 注意时序
  2. 注意芯片的选择
posted @ 2019-07-07 18:27  Howbin  阅读(816)  评论(0编辑  收藏  举报