Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 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