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
--.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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started