本帖最后由 neorage 于 2017-11-23 11:31 编辑
CODE SEGMENT
ASSUME CS:CODE
START: MOV AL,80H
MOV DX, 806H
OUT DX, AL
AGAIN: MOV AL,3FH
MOV DX,802H
OUT DX,AL
MOV AL,0FEH
MOV DX,800H
OUT DX, AL
RED: MOV AL,10000110B
OUT 80H,AL
MOV AL,0FEH
MOV DX,800H
OUT DX,AL
CALL DELAY
GREEN: MOV AL,10110001B
OUT 80H,AL
MOV AL,00001001B
OUT 80H,AL
MOV DX,804H
OUT DX,AL
CALL DELAY
YELLOW: MOV AL,10111000B
OUT 80H,AL
MOV AL,00000000B
OUT 80H,AL
MOV DX,804H
OUT DX,AL
JMP AGAIN
MOV AH,4CH
INT 21H
DELAY PROC
PUSH BX
PUSH CX
MOV BX,10
BEGIN:MOV CX,20
WAIT1:LOOP WAIT1
DEC BX
JNZ BEGIN
POP CX
POP BX
RET
DELAY ENDP
CODE ENDS
END START
麻烦各位大侠指点一下 我自己编的在proteus仿真不了
|