Question: --In assembly language You can use EDIT command in DOS or notepad in WINDOWS. You have to save the file with .asm extension filename (for

--In assembly language

You can use EDIT command in DOS or notepad in WINDOWS. You have to save the file with .asm

extension filename (for example assign2.asm). Follow the following instructions.

(1)

Use MASM to assemble the file.

MASM /l assign2.asm

(2)

Use LINK to link the file (.obj file).

LINK assign2.obj

Hit enter for all questions

(3)

Use DIR to see files

DIR assign2.*

(4)

Use DEBUG to trace the program

DEBUG assign2.exe

- d (enter)

(5)

Put everything in a .doc file and turn in. This includes .lst file and DEBUG print out.

You need to identify the result of each line. If the result is in the memory, you need to

display the content of that memory

--My Question

--In assembly language You can use EDIT command in DOS or notepad

--.asm file code

 page 60, 132 TITLE A04ASM1 Segments for an EXE Program ;------------------------------ STACK SEGMENT PARA STACK 'Stack' STACK ENDS ;------------------------------ DATASEG SEGMENT PARA 'Data' DATASEG ENDS ;------------------------------ CODESEG SEGMENT PARA 'Code' MAIN PROC FAR ASSUME SS:STACK, DS:DATASEG, CS:CODESEG MOV AX, DATASEG ;Set address of data segment in DS MOV DS, AX ; ;---- rest of code goes here------ MOV AX, 4C00H ;End Processing INT 21H MAIN ENDP ;End of Procedure CODESEG ENDS ;End of segment END MAIN ;End of Program 

. 3. Add a data segment to the program in Question 2 for the following requirements: Define a 1-byte item (DB) named ITEMA containing hex 40 and another named ITEMB containing hex 1A. Define a 2-byte item (DW) named ITEMC with no constant. Move the contents of ITEMA to AL and shift left one bit. Multiply AL by ITEMB (MUL ITEMB). Move the product in AX to ITEMC. Assemble, link, and use DEBUG to test the program. . 3. Add a data segment to the program in Question 2 for the following requirements: Define a 1-byte item (DB) named ITEMA containing hex 40 and another named ITEMB containing hex 1A. Define a 2-byte item (DW) named ITEMC with no constant. Move the contents of ITEMA to AL and shift left one bit. Multiply AL by ITEMB (MUL ITEMB). Move the product in AX to ITEMC. Assemble, link, and use DEBUG to test the program

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!