﻿;***********************************************
;* 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 ;
; 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 PPIA,AL
MOV AL,00H ; Task-4: send all zeros to Port-B
OUT PPIB,AL
L1: MOV AL,00000001b ; Task-5: Enable Column zero (C0) 
L2: OUT PPIC,AL
CALL TIMER 
CLC
roL AL,1	; Task-6: Add one instruction to enable the ; next column
JNC 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