Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Homework 2 Q1. Rewrite program of slide 31, Chapter 3a to transfer one word at a time instead of one byte. Q2. In some applications

image text in transcribed
image text in transcribed
Homework 2 Q1. Rewrite program of slide 31, Chapter 3a to transfer one word at a time instead of one byte. Q2. In some applications it is common practice to save all registers at the beginning of a subroutine. Assume that SP = 1288H before a subroutine CALL. Show the contents of the stack pointer and the exact memory contents of the stack after PUSHF for the following: 1132:0450 CALL PROC1 1132:0453 INC BX PROC1 PROC PUSH AX PUSH BX PUSH CX PUSH DX PUSH SI PUSH DI PUSHF PROC1 ENDP 2.3: MORE SAMPLE PROGRAMS Program, and the list file generated when the program was assembled. Write, run, and analyze a program that adds 5 bytes of data and saves the result. The data should be the following hex numbers: 25, 12, 15, 1F, and 2B. PAGE 60,132 TITLE PROG2-1 (EXE) PURPOSE: ADDS 5 BYTES OF DATA .MODEL SMALL STACK 64 DATA DB DATA IN SUM ; 25H, 12H, 15H, 1FH, 2BH ? DB MAIN AGAIN: ..CODE PROC MOV MOV MOV MOV MOV ADD INC DEC JNZ MOV MOV INT ENDP END FAR AX, DATA DS, AX CX,05 BX,OFFSET DATA IN AL, O AL,[BX] BX CX AGAIN SUM, AL AH, 4CH 21H ;set up loop counter CX-5 set up data pointer BX ;initialize AL ; add next data item to AL make BX point to next data item decrement loop counter jump if loop counter not zero ; load result into sum ; set up return ;return to OS PEA MAIN MAIN

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

Step: 3

blur-text-image

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

Modern Database Management

Authors: Jeff Hoffer, Ramesh Venkataraman, Heikki Topi

12th edition

133544613, 978-0133544619

More Books

Students also viewed these Databases questions