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

Correction TP

The document describes code that outputs binary values stored in an array to ports A and C. It initializes the ports, loops continuously checking port C for a value, then outputs the binary values from the array to port A in a nested loop.

Uploaded by

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

Correction TP

The document describes code that outputs binary values stored in an array to ports A and C. It initializes the ports, loops continuously checking port C for a value, then outputs the binary values from the array to port A in a nested loop.

Uploaded by

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

DATA SEGMENT

PORTA EQU 00H


PORTB EQU 02H
PORTC EQU 04H
PORT_CON EQU 06H
BOUTON EQU 01H
DATA ENDS

CODE SEGMENT
Assume CS:CODE, DS:DATA
ORG 0000H

START:
MOV DX, PORT_CON
MOV AL, 10001001B
OUT DX, AL
MOV SI,0
MOV DI,0

L2: MOV AL, 11000000B


OUT PORTA, AL
IN AL, PORTC
CMP AL, 11111110B
JNE L2
L0: MOV CX, 3FFFH

L1: MOV AL, S1[SI]

OUT PORTA, AL
LOOP L1
INC SI
CMP SI, 16
JL L0
JMP START
S1 DB 11000000B
DB 11111001B
DB 10100100B
DB 10110000B
DB 10011001B
DB 10010010B
DB 10000010B
DB 11011000B
DB 10000000B
DB 10010000B
DB 10001000B
DB 10000011B
DB 11000110B
DB 10100001B
DB 10000110B
DB 10001110B

CODE ENDS
END

You might also like