
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 1FH		; control register
PPIC EQU 1DH
PPIB EQU 1BH
PPIA EQU 19H

ORG 1000H 
MOV AL,10000000b ; Task-2: write the value of the control word
out PPIC_C,al
L:
mov bx,0

L1:
mov al,BYTE PTR [DATA+BX]
out PPIA,al
inc bx
call TIMER
cmp bx,0Ah
je L
jmp L1



INT 3 ;
TIMER: MOV CX,0FFFFH; this is a 16 bit counter 
TIMER1: 
NOP
NOP 
NOP
NOP 
LOOP TIMER1
RET ;


DATA:  DB  11000000B ; “P G F E D C B A” values for number 0 
  DB  11111001B 
  DB  10100100B 
  DB  10110000B 
  DB  10011001B 
  DB  10010010B 
  DB  10000010B 
  DB  11111000B 
  DB  10000000B 
  DB  10010000B 
  DB  00H 

CODE ENDS 
END