CODE SEGMENT
ASSUME CS:CODE,DS:CODE,ES:CODE,SS:CODE;
PPIC_C EQU 1FH
PPIC EQU 1DH
PPIB EQU 1BH
PPIA EQU 19H;
;
ORG 1000H
MOV AL,10000000B
OUT PPIC_C,AL
;
MOV AL,11111111B
OUT PPIA,AL
;
MOV AL,00000000B
OUT PPIC,AL
;
L1:
MOV AL,11110001B
L2:
OUT PPIB,AL
CALL TIMER
SHL AL,1
TEST AL,00010000B
JNZ L1
OR AL,11110000B
JMP L2
INT 3
TIMER:
MOV CX,1
TIMER2:
PUSH CX
MOV CX,10h
TIMER1:
NOP
NOP
NOP
NOP
LOOP TIMER1
POP CX
LOOP TIMER2
RET
CODE ENDS
END