0% found this document useful (0 votes)
29 views4 pages

Flow Diagrams Mpi

The document initializes registers with hexadecimal values and exchanges register contents using memory locations. It then moves register values to memory locations and exchanges more register contents before moving those registers to memory and exiting.

Uploaded by

kanz ul emaan
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)
29 views4 pages

Flow Diagrams Mpi

The document initializes registers with hexadecimal values and exchanges register contents using memory locations. It then moves register values to memory locations and exchanges more register contents before moving those registers to memory and exiting.

Uploaded by

kanz ul emaan
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/ 4

START

Initialize registers with


AX, BX, CX and DX with
values 0A154H, 7812H,
9067H and 0BED3H.

Exchanging the contents


of DH and CL by using
memory location DS:
[0150].

Move values of CX and


DX to memory location
DS:[0170] and DS:[0172]
respectively.

Exchanging the contents


of AH and BH by using
memory location DS:
[0160].

Move values of AX and


BX to memory location
DS:[0174] and DS:[0175]
respectively.

DOS Interrupt (EXIT)

END
Flow diagram of problem no. 2
Flow diagram of problem no. 3

START
PUSH CX

MOV AX, 0FFFCH


MOV DX, 1046H MOV AX, 0001

MOV CX, 6 OUT DX, AX

PUSH CX
POP CX

POP CX
CX≠0

SUB CX, 1 LOOP


Ringing_loop

ADD AX, 1
CX=0

CALL STOP
JC Ring
C=1
C=0 DOS Interrupt (EXIT)
PUSH CX

MOV BX, 2 END

CALL DELAY

CX≠0

LOOP
Increment_loop

CX=0
Flow diagram of problem no. 4

START

Initialize registers with


AX, CL with values 20H
and 4 respectively

Shift left operation

SHL AX, CL

Move BL, 10H

MOV CL, 2

SHL BL, CL

SHL BL, 1

Move DL, BL

SHL BL, 1

ADD BL, DL

DOS interrupt (Exit)

END

You might also like