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
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
2. Write an assembly program using conventional segment definitions for the following: (a) Move the immediate value hex 40 to the AL register, (b) shift Al contents one bit left (SHL AL,1), (c) move immediate value hex 1A to BL, (d) multiply AL by BL (MUL BL). Remember the instructions required to end program execution. The program does not need to define or initialize the data segment. Copy a skeleton program and use your editor to develop the program. Assemble, link, and use DEBUG to trace and to check the code segment and registers. 2. Write an assembly program using conventional segment definitions for the following: (a) Move the immediate value hex 40 to the AL register, (b) shift Al contents one bit left (SHL AL,1), (c) move immediate value hex 1A to BL, (d) multiply AL by BL (MUL BL). Remember the instructions required to end program execution. The program does not need to define or initialize the data segment. Copy a skeleton program and use your editor to develop the program. Assemble, link, and use DEBUG to trace and to check the code segment and registers
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
