- CODE SEGMENT PUBLIC 'CODE'
- ASSUME CS:CODE
- ORG 00H
- START:
- mov dx,26h;8253初始化
- mov al,00110000B
- out dx,al
- mov dx,20H
- mov ax,0Ah
- out dx,al
- XCHG ah,al
- out dx,al
- L1:
- mov dx,18h;8255初始化
- mov al,80h
- out dx,al
- mov al,0ch
- mov dx,80h
- out dx,al
- mov dx,26h;锁存判断是否到时间
- mov al,00001111B
- out dx,al
- mov dx,20h
- in al,dx
- mov ah,al
- in al,dx
- xchg ah,al
- cmp ax,10h
- JNA L1
- mov dx,26h;8253初始化
- mov al,00110000B
- out dx,al
- mov dx,20H
- mov ax,05h
- out dx,al
- XCHG ah,al
- out dx,al
- L2:
- mov dx,18h;8255初始化
- mov al,80h
- out dx,al
- mov al,0ah
- mov dx,80h
- out dx,al
- mov dx,26h;锁存判断是否到时间
- mov al,00001111B
- out dx,al
- mov dx,20h
- in al,dx
- mov ah,al
- in al,dx
- xchg ah,al
- cmp ax,05h
- JNA L2
- mov dx,26h;8253初始化
- mov al,00110000B
- out dx,al
- mov dx,20H
- mov ax,05h
- out dx,al
- XCHG ah,al
- out dx,al
- L3:
- mov dx,18h;8255初始化
- mov al,80h
- out dx,al
- mov al,21h
- mov dx,80h
- out dx,al
- mov dx,26h;锁存判断是否到时间
- mov al,00001111B
- out dx,al
- mov dx,20h
- in al,dx
- mov ah,al
- in al,dx
- xchg ah,al
- cmp ax,05h
- JNA L3
- ; Write your code here
- ENDLESS:
- JMP ENDLESS
- CODE ENDS
- END START
复制代码 这段代码为什么运行不下去,求大佬解惑???
|