subject:microprocessor&assembly language

What will be the content of the AX register and carry flag after the execution of following instruction:
SAR AX, CL
CL = 0216 and AX = 091A16.
Answer: AX = 024616 and carry flag CF = 1
Description:
• Instruction: SAR - Shift Arithmetic Right
• Instruction format: SAR Operand1, Operand2
• The above instruction shifts the all the bits of Operand1 to the right side by the amount specified in Operand2. The most significant bit or sign bit will remain same as before shift and the least significant bit goes to the carry flag.
• Instruction SAR AX, CL will perform AX = AX >> CL.
• Provided AX = 0x091A will be shifted right side 2 times.
• So, the register AX = 0x0246 and CF = 1.

subject:microprocessor&assembly language Assume that CL contains 02c10) and AX contains 091A1). Determine the new contents of...
Need help on Assembly language 1.Solve the following conditions: A. Suppose AL contains 11001011 and CF = 1. Give the new contents of AL after each of the following instructions is executed. Assume the above initial conditions for each part of this question. a. SHL AL,1 b. SHR AL,1 c. ROL AL,2 d. ROR AL,3 e. SAR AL,2 f. RCL AL,1 g. RCR AL,3 B. Suppose EAX contain ABCDH. Show the contents of BX and CX after...
ASSEMBLY LANGUAGE. For each problem, show the contents or setting of the requested item after executing the instructions. 1. mov eax,0 mov al,5 mov bl,11 mul bl - Show the hexadecimal digits in eax: - Show the carry flag value: - Show the overflow flag value: mov eax,0 mov edx,0 mov ax,5h mov bx,20h mul bx - Show the hexadecimal digits in eax: - Show the hexadecimal digits in edx: - Show the carry flag value: - Show the...
12. For each instruction in this question, assume that register contains the given contents before the instruction is executed. All values are Hex, Contents of the register (Before) al-coh Contents of the register (After) Instruction ZF CF OF SF | add al, 40h ;assume values are unsigned Int | add bh, 9Ah ;assume values are signed Int | add cl, 52h ;assume values are signed Int | add bh, 01h ;assume values are bh=66h cl=40h bh= the value from unsigned...
Given the memory map shown at the right, determine the contents of r4, r5, r13, and r14 after the following ARM assembly language instruction has executed. Indicate all changes to the memory map after the program is complete. Assume that r4, r5, r13, and r14 initially contain 0x00008A09, 0x00000017, 0xFFFFFEC8, and 0x00008EOC respectively. Address xFFFFFED4 0xFFFFFEDO 0xFFFFFECC 0xFFFFFEC8 0xFFFFFEC4 0xFFFFFECO 0xFFFFFEBC 0xFFFFFEB8 Contents 0x809A6004 OxA2930001 0x60BEF82A 0xE1560418 OxFFFFFFFF 0xEF800841 0x00000002 0x8A098E9C STMFD sp!, (r5, r4, r14) 0xFFFFFEB8 0xFFFFFEBE Given the...
A C program has been compiled into the Atmel AVR assembly
language. The following instruction, which is located at address
0x002A, is executed:
i.) What is the binary value contained in the instruction
register (IR) when the instruction is executed?
ii.) What is the hexadecimal value of the program counter (PC)
when the instruction is executed?
iii.) If register r1 = 0x40 and register r2 = 0x02 prior to
executing the instruction, what are the contents of r1 and r2...
. Given the memory map shown at the right, determine the contents of r4, r8, r9, and r10 after the following ARM assembly language instruction has executed. Indicate all changes to the memory map after the program is complete. Assume that r4, r8, r9, and r10 initially contain 0x003FFA00, OxA9008CEO, oxFFE9CC08, and OxFFFFFFEA respectively. Address 0x003FFAOC 0x003FFA08 0x003FFA04 0x003FFAO0 0x003FF9FC 0x003FF9F8 0x003FF9F4 0x003FF9FO Contents 0x02008319 0x6E8A0211 0x8A00E921 0x100000E1 0x900001CA 0x00000004 0xFFFFFEA8 0x004818EF STMIA r4, (rs-r10) 0x003FF9FO 0x003FF9F3 Which of the...
using assembly language
5. Determine the contents of accumulators A & Band the variable TEMP after the execution of the following program sequence /15 points] TEMP RMB 1 CLR LDAA TEMP #3 LDAB #5 MUL MOVB #20, TEMP TEMP LSR
5. Determine the contents of accumulators A & Band the variable TEMP after the execution of the following program sequence /15 points] TEMP RMB 1 CLR LDAA TEMP #3 LDAB #5 MUL MOVB #20, TEMP TEMP LSR
Machine Language
2. (4pts) Consider the following assembly language instruction which is located in a program you wrote: MULTIPLY contents of Register 5 with the constant 6. This instruction will store the results back into Register 5. Assume this machine instruction is part of an assembly program that is stored on your hard disk and it is the next instruction to be invoked. Explain how this instruction is processed using the machine cycle. Include hard drive, de, and registers in...
5. Assume DS-1000, CS- 800, Ax-3412H, and BX-0200H. For the following x86 assembly code: MOV [BX +1000H], AX a) Translate the assembly code to machine code (in Hex). The opcode of MOV instruction is 100010. b) Show the values of AX, BX, and new values in memory, if there are, in the following figure c) (10 points) AFTER executing the instruction. (5 points) What is the memory address accessed by the instruction, assuming real mode operation? Show it in the...
Assembly Language Using CodeWarrior to create a new project that uses assembly language. Write an assembly program that turns on the red LED at the beginning. It switches to off 2 seconds later and switches back to on after three more seconds. (That is, it stays on for 2 seconds and off for 3 seconds.) This switching process lasts forever. Use a loop (or nested loops) for each of the 2/3-second delay where the loop body of the inner-most loop...