0% found this document useful (0 votes)
557 views1 page

8086 Source Code in Proteus

This program initializes ports and outputs data to ports. It initializes port control and sets ports A, B, and C. It then uses loops to output the bits in arrays S1 and S2 to ports A and B by moving the array data to AL and outputting to the ports. It increments the index registers SI and DI and loops until all array data is output.

Uploaded by

morr
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
557 views1 page

8086 Source Code in Proteus

This program initializes ports and outputs data to ports. It initializes port control and sets ports A, B, and C. It then uses loops to output the bits in arrays S1 and S2 to ports A and B by moving the array data to AL and outputting to the ports. It increments the index registers SI and DI and loops until all array data is output.

Uploaded by

morr
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

DATA SEGMENT MOV DX, PORTC

ORG 400H OUT DX, AL


X DB 50H LOOP LL1
PORTA EQU 00H
PORTB EQU 02H INC DI
PORTC EQU 04H CMP DI, 4
PORT_CON EQU 06H JL LL0
DATA ENDS
JMP START

CODE SEGMENT ORG 1000H


MOV AX, DATA S1 DB 11000000B
MOV DS, AX DB 11111001B
DB 10100100B
ORG 0000H DB 10110000B
DB 10011001B
START: DB 10010010B
MOV DX, PORT_CON DB 10000010B
MOV AL, 10000000B DB 11011000B
OUT DX, AL DB 10000000B
DB 10010000B
MOV SI, 0 DB 10001000B
MOV DI, 0 DB 10000011B
DB 11000110B
L0: MOV CX, 1FFFH DB 10100001B
L1: MOV AL, S1[SI] DB 10000110B
MOV DX, PORTA DB 10001110B
OUT DX, AL
LOOP L1 S2 DB 1101B
DB 1011B
INC SI DB 0111B
CMP SI, 16 DB 1110B
JL L0
CODE ENDS
MOV DX, PORT_CON END
MOV AL, 10000000B
OUT DX, AL

LL0:MOV CX, 2FFFH


LL1:MOV AL, S2[DI]

You might also like