Program for File

 

1)     Program Title:- WALP (Write Assembly Language Program) to copy 8 bit number i.e. 22H & 55 H in AL & BL register respectively.

Register Used: - AL & BL

Data: - 22 H & 55 H

MOV

AL,22H

COPY 22H IN AL

MOV

BL,55H

COPY 55H IN BL

INT

03

STOP

 

Result:-

AL = 22H

BL = 55H

 

2)     Program Title: - WALP (Write Assembly Language Program) to store 55 H, 88 H, 99 H,   44 H, 02 H, 03 H, 04 H & 05H IN AL, BL, CL, DL, AH, BH, CH & DH Register respectively.  

Register Used: -AL, BL, CL, DL, AH, BH, CH & DH

Data: -55 H, 88 H, 99 H, 44 H, 02 H, 03 H, 04 H & 05H

MOV

AL,55H

COPY 55H IN AL

MOV

BL,88H

COPY 88H IN BL

MOV

CL,99H

COPY 99H IN CL

MOV

DL, 44H

COPY 44H IN DL

MOV

AH,02H

COPY 02H IN AH

MOV

BH,03H

COPY 03H IN BH

MOV

CH,04H

COPY 04H IN CH

MOV

DH,05H

COPY 05H IN DH

INT

03

STOP

 

Result:-


AX = 0255H

BX = 0388H 

CX = 0499H

DX = 0544H


3)     Program Title: - WALP to store 55 H, 88 H, in AL, BL Register respectively. Copy the contents of AL register on memory location [2000] and contents of BL register on memory location [3000]. (DS = 0200H)

Register & Memory address Used: -AL, BL, DS, [2000] & [3000]

Data: -55 H, 88 H, [2000] & [3000]

MOV

AX,0200H

Initialisation of DS

MOV

DS,AX

MOV

AL,55H

Copy 55h In AL

MOV

BL,88H

Copy 88h In BL

MOV

[2000],AL

Copy Contents Of Al On Memory Location [2000]

MOV

[3000],BL

Copy Contents Of Al On Memory Location [3000]

INT

03

STOP

 

Result:-

DS :    OFFEST : DATA

0200:[2000]:55H

0200:[3000] :       88H

 

4)     Program Title: - WALP to store 55 H, 88 H, in AL, BL Register respectively. Exchange contents of AL&BL using third register.

Register Used: -AL, BL &CL

Data: - 55 H& 88 H

MOV

AL,22H

COPY 22H IN AL

MOV

BL,55H

COPY 55H IN BL

MOV

CL,AL

COPY THE CONTENTS OF AL TO CL

MOV

AL,BL

COPY THE CONTENTS OF BL TO AL

MOV

BL,CL

COPY THE CONTENTS OF CL TO BL

INT

03

STOP

 

AL = 55H

BL = 22H

 

 

5)     Program Title: - WALP to store 55 H, 88 H, in AL, BL Register respectively. Copy the contents of AL register on memory location [2000] and contents of BL register on memory location [3000] then exchange contents of memory location [2000] & [3000] using register. (DS = 0200H)

 

Register Memory address Used: - AL, BL, DS, CL, DL, [2000] & [3000]

Data: - 55 H, 88 H, [2000] & [3000]

MOV

AX,0200H

Initialisation of DS

MOV

DS,AX

MOV

AL,55H

Copy 55h In AL

MOV

BL,88H

Copy 88h In BL

MOV

[2000],AL

Copy Contents Of AL On Memory Location [2000]

MOV

[3000],BL

Copy Contents Of AL On Memory Location [3000]

MOV

CL,[2000]

Copy Contents Of Memory Location [2000] to CL

MOV

DL,[3000]

Copy Contents Of Memory Location [3000] to DL

MOV

[2000],DL

Copy Contents Of DLL On Memory Location [2000]

MOV

[3000],CL

Copy Contents Of CL On Memory Location [3000]

INT

03

Stop

 

Result:-

DS :    OFFEST : DATA

0200:[2000]:88H

0200:[3000] :       55H

 

 

6)     Program Title: - WALP to store 44H & 55H in AL & BL register respectively. Exchange the contents of register using XCHG instruction.

Register Used: - AL & BL

Data: - 44H & 55H

MOV

AL,44H

COPY 44H IN AL

MOV

BL,55H

COPY 55H IN BL

XCHG

AL,BL

Exchange contents of AL register With BL register

INT

03

STOP

 

Result:-

AL = 55H

BL = 44H

7)     Program Title: - WALP to 44H & 57H in AL & BL register respectively, perform the addition & store the sum on memory location [2000]. DS = 0200H

Register & Memory Address Used: - AL, BL & [2000]

Data: - 44H, 57H & 0200H

MOV

AX,0200

Initialisation of DS

MOV

DS,AX

 

MOV

AL,44H

;COPY 44H IN AL

MOV

BL,57H

;COPY 55H IN BL

ADD

AL,BL

;ADD CONTENTS OF BL WITH AL & RESULT SOTRED IN AL

MOV

[2000],AL

COPY CONTENTS OF AL ON MEMORY LOCATION [2000]

INT

03

STOP

 

Result:-

DS   : OFFSET : DATA

0200:  [2000]    : 9B

8)     Program Title: - WALP to 44H & 02H in AL & BL register respectively, perform the multiplication & store the product on memory location [2000]. DS = 0200H

Register & Memory Address Used: - AL, BL & [2000]

Data: - 44H, 02H & 0200H

MOV

AX,0200

Initialisation of DS

MOV

DS,AX

 

MOV

AL,44H

;COPY 44H IN AL

MOV

BL,02H

;COPY 02H IN BL

MUL

AL,BL

;Perform Multiplication and store result in AX register

MOV

[2000],AL

COPY CONTENTS OF AL ON MEMORY LOCATION [2000]

INT

03

STOP

 

Result:-

DS   : OFFSET : DATA

0200:  [2000]    : 88 H

 


Post a Comment

0 Comments