

CODE SEGMENT
ASSUME CS:CODE,DS:CODE,ES:CODE,SS:CODE ;
; Task-1: write the address values you have calculated in the pre-lab 
; section for PPI ports B,C, & Control Reg.
PPIC_C EQU 1EH		; control register
PPIC EQU 1CH
PPIB EQU 1AH
PPIA EQU 18H

ORG 1000H 
MOV AL,10000000b ; Task-2: write the value of the control word
OUT PPIC_C,AL ;
MOV AL,0ffH ; Task-3: send all ones to Port-A 
OUT PPIC,AL
MOV AL,0H ; Task-4: send all zeros to Port-B
OUT PPIB,AL
L1: MOV AL,11111110b ; Task-5: Enable Column zero (C0) 
L2: OUT PPIA,AL
CALL TIMER 
CLC
ROr AL,1	; Task-6: Add one instruction to enable the ; next column
JMP L2 ;
INT 3 ;
TIMER: MOV CX,0FFFFH; this is a 16 bit counter 
TIMER1: 
NOP
NOP 
NOP
NOP 
LOOP TIMER1
RET ;
CODE ENDS 
END