LAB#03: Assembly Language Programing Using Emu8086: TASK#01

Download as pdf or txt
Download as pdf or txt
You are on page 1of 7

Computer Organization & Assembly Language (CS-215L) LAB#03

LAB#03:
ASSEMBLY LANGUAGE PROGRAMING USING EMU8086

TASK#01:

Consider the following 8 bytes of data:

1Fh, 45h, 89h, 4Ch, 2Ah, 58h, 64h, 37h

Write a program to store the given block of data bytes in memory locations starting from 0200h. List
the addressing modes used in the process. Use the debug option and observe the data. Attach the
image with your solution.

CODE:

ADDRESSING MODE:

• Indirect Addressing

OUTPUT:

TASK#02:

Write a program to move the block of data, given in Acitivity-1, from locations 0200-0207 to memory
locations 0400h -0407h using direct addressing mode. Run the program step-by-step and analyse each
step. Attach the image with your solution.

Sir Syed University of Engineering & Technology


Computer Organization & Assembly Language (CS-215L) LAB#03

CODE:

ADDRESSING MODE:

• Direct Addressing

DEBUG:

TASK#03:

Write a program to move the block of data, given in Acitivity-1, from locations 0200-0207 to memory
locations 0400h -0407h using register indirect addressing mode. Use the debug option and observe
the data. Attach the image with your solution.

CODE:

Sir Syed University of Engineering & Technology


Computer Organization & Assembly Language (CS-215L) LAB#03

ADDRESSING MODE:

• Register Indirect

DEBUG:

Sir Syed University of Engineering & Technology


Computer Organization & Assembly Language (CS-215L) LAB#03

TASK#04:

Write a program to swap the bytes from locations 0201h, 0203h, 0205h, and 0207h with the locations
0401h, 0403h, 0405h, 0407h respectively using

• Based-relative addressing mode


• Indexed-relative addressing mode

BASED RELATIVE ADDRESSING MODE:

Sir Syed University of Engineering & Technology


Computer Organization & Assembly Language (CS-215L) LAB#03

DEBUG:

Memory Location 200H ,201,203,205,207 After Swapping

Memory Location 400H,401,403,405,405H After Swapping

Sir Syed University of Engineering & Technology


Computer Organization & Assembly Language (CS-215L) LAB#03

INDEX RELATIVE ADDRESSING MODE:

DEBUG:

Memory Location 200H ,201,203,205,207 After Swapping

Sir Syed University of Engineering & Technology


Computer Organization & Assembly Language (CS-215L) LAB#03

Memory Location 400H,401,403,405,405H After Swapping

Sir Syed University of Engineering & Technology

You might also like