Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

--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

image text in transcribed

--.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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Machine Learning And Knowledge Discovery In Databases European Conference Ecml Pkdd 2015 Porto Portugal September 7 11 2015 Proceedings Part 3 Lnai 9286

Authors: Albert Bifet ,Michael May ,Bianca Zadrozny ,Ricard Gavalda ,Dino Pedreschi ,Francesco Bonchi ,Jaime Cardoso ,Myra Spiliopoulou

1st Edition

3319234609, 978-3319234601

More Books

Students also viewed these Databases questions

Question

What is the difference between a passive tag and an active tag?

Answered: 1 week ago

Question

3. The group answers the questions.

Answered: 1 week ago

Question

1. How will you, as city manager, handle these requests?

Answered: 1 week ago