Question: Help on Assembly language 1).Solve the following: a. Suppose EAX contain ABCDH. Show the contents of BX and CX after executing the following instructions PUSH

Help on Assembly language

1).Solve the following:

a. Suppose EAX contain ABCDH. Show the contents of BX and CX after executing the following instructions PUSH EAX POP BX POP CX b. Suppose that AX = 1234h, BX = 5678h, CX = 9ABCh, and SP = 100h. Give the contents of AX, BX, CX, and SP after executing the following instructions. PUSH AX PUSH BX XCHG AX,CX POP CX PUSH AX POP BX c. Suppose a program contains the lines CALL PROC1 MOV AX,BX and * the instruction MOV AX,BX is stored at 08FD:0203h, * PROC1 is a NEAR procedure which begins at 08FD:300h, * SP = 010Ah. What are the contents of IP and SP just after CALL PROC1 is executed? What word is on top of the stack? d. Suppose SP = 0200h, value at top of stack = 012Ah. What are the contents of IP and SP * after RET is executed, where RET appears in a NEAR procedure. * after RET 4 is executed, where RET appears in a NEAR procedure. F. Give the new values of AX and CF/OF for each of the following instructions. * MUL BL, if AL contains ABh and BL contains 10h * IMUL BL, if AL contains ABh and BL contains 10h * MUL AH, if AX contains 01ABh * IMUL BYTE1, if AL contains 02h and BYTE1 contains FBh f. Give the new values of AX and DX for each of the following instructions, or tell if overflow occurs * DIV BX, if DX contains 0000h, AX contains 0007h, and BX contains 0002h * DIV BX, if DX contains 0000h, AX contains FFFEh, and BX contains 0010h * IDIV BX, if DX contains FFFFh, AX contains FFFCh, and BX contains 0003h * DIV BX, same values as (c) g Write assembly code for each of the following high-level language assignment statements. Suppose that A,B, and C are word variables and all products will fit in 16 bits. Use IMUL for multiplication. * A = 5*A - 7 * B = (A - B)*(B + 10) * A = 6 - 9*A * IF A^2 + B^2 = C^2 where ^ denotes exponentiation THEN set CF ELSE clear CF

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!