Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Write an assembly program to allocate a block of 16 words in memory called SOURC

ID: 2085624 • Letter: W

Question

Write an assembly program to allocate a block of 16 words in memory called SOURCE_BLOCK, and initialize them with values 0000H, 1000H, 2000H, 3000H, 4000H, 5000H, 6000H, 7000H, 8000H, 9000H, A000H, B000H, C000H, D000H, E000H, F000H. Tasks are: (1) include the program in your submission and type it in emu8086; (2) record offset address(s) of label(s) based on the information from the list file; (For address labels in the second or third segment, a subtraction should be carried out for each address label to calculate its offset address.) (3) run your program to save data in memory; (4) use the RAM display to demonstrate that they are loaded in memory.

Explanation / Answer

Ans: Assembly level programming is a low level language.

8086 processor has contains RAM, CPU & the divices like keyboard,display etc.

8086 processors are based on memory registers.

Here the "MOV" instruction is called as an op-code.

Here the "LEA" instruction is called as load effective address.

DATA SEGMENT

ARRAY1 DW 000H,1000H,2000H,3000H,4000H, 5000H,6000H,7000H,8000H,9000H

ARRAY2 DW A000H, B000H, C000H, D000H, E000H, F000H

DATA ENDS

CODE SEGMENT

START:

MOV AX,DATA

MOV DS,AX

LEA SI,ARRAY1

LEA DI,ARRAY2

MOV CX,05

SWAP:

MOV AX,[SI]

MOV BX,[DI]

MOV [SI],BX

MOV [DI],AX

INC SI

INC SI

INC DI

INC DI

LOOP SWAP

MOV AH,4CH

INT 21H

CODE ENDS

END START

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote