;***********************************************
;* 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  1EH  ; control register

PPIC EQU   1CH 
 
PPIB EQU  1AH

PPIA EQU 18H ;

ORG 1000H 
MOV AL, 80h   ;  the control word is 80H since the mode of operation is IO mode 

OUT PPIC_C,AL 

MOV AL,0FFH          ; send all ones to Port-A 

OUT PPIC,AL


 MOV AL,0FFH             ;  send all ones to Port-C

OUT  PPIB, AL          ;

L1: MOV AL,7FH               ;  Enable row zero (R0)

 L2: OUT PPIA ,AL

CALL TIMER 

CLC

; Task-6: Add one instruction to enable the 
; next row

ROR AL,1

JC L2

JMP L1
       ;
INT 3           ;

TIMER: MOV CX,0FFFFH; this is a 16 bit counter
 
TIMER1: 
NOP
NOP 
NOP
NOP 
LOOP TIMER1

RET 
CODE ENDS 
END