 ;***********************************************
;* MDA-8086 Dot-Matrix EXPERIMENT * ;* *
;* “Scrolling a vertical line of 8-lit LEDs” * ;***********************************************
; ; FILENAME : MATRIX_1.ASM
; PROCESSOR : I8086
CODE SEGMENT
ASSUME CS:CODE,DS:CODE,ES:CODE,SS:CODE ;

;thes values obtined as mensined in the prelab

PPIC_C EQU  1FH  ; control register

PPIC EQU   1DH 
 
PPIB EQU  1BH

PPIA EQU 19H ;

ORG 1000H 
MOV AL, 80h   ;  the control word is 80H since the mode of operation is IO mode 

OUT PPIC_C,AL 



 
L1: 
 MOV SI ,OFFSET DATA
                                 ; Task-5: Enable Column zero (C0)

 L2:
MOV AL,BYTE PTR CS:[SI] 
CMP AL,00H
JZ L1
 
OUT PPIA ,AL

;INC CX 


CALL TIMER 

CLC

INC SI


; 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 

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