;8086 Interfaced with 8255 and DC Motor
OUTPUT 2500AD
.ORG 2000H
DATA SEGMENT
LIST DB FFH,80H,80H,80H,80H,80H,80H,00H
DATA ENDS
CODE SEGMENT
ASSUME CS:CODE,DS:DATA
START:
MOV AX,DATA
MOV DS,AX
MOV SI,OFFSET LIST
MOV CL,08H
MOV AL,80H
MOV DX,FFE6H
OUT DX,AL
L1:
MOV AL,[SI]
MOV DX,FFE0H
OUT DX,AL
CALL DELAY
CALL DELAY
CALL DELAY
CALL DELAY
CALL DELAY
CALL DELAY
INC SI
DEC CL
JNZ L1
CODE ENDS
END
DELAY:
MOV BX,FFFFH
L3:
DEC BX
JNZ L3
RET
OUTPUT 2500AD
.ORG 2000H
DATA SEGMENT
LIST DB FFH,80H,80H,80H,80H,80H,80H,00H
DATA ENDS
CODE SEGMENT
ASSUME CS:CODE,DS:DATA
START:
MOV AX,DATA
MOV DS,AX
MOV SI,OFFSET LIST
MOV CL,08H
MOV AL,80H
MOV DX,FFE6H
OUT DX,AL
L1:
MOV AL,[SI]
MOV DX,FFE0H
OUT DX,AL
CALL DELAY
CALL DELAY
CALL DELAY
CALL DELAY
CALL DELAY
CALL DELAY
INC SI
DEC CL
JNZ L1
CODE ENDS
END
DELAY:
MOV BX,FFFFH
L3:
DEC BX
JNZ L3
RET