Assembly language
Use this portion of the program to help you answer the questions
BALR R6,0
USING *.R6
L R10,FIRSTNUM
L R12,NEXTNUM
CR R10,R12
BC 8,BYPASS
AR R10,R12
ST R10,RESULT
B PROGEND
BYPASS SR R10,R12
ST R10,RESULT
PROGEND END
FIRSTNUM DC F’15
NEXTNUM . DC . F'20'
RESULT . DS . F
1 /what register is being used as the base register and what value is stored at the time of assembly ?
2/ What will be stored in RESULT? Show what is happening along the way for partial credit
3/ explain what the instruction ‘BC 8,BYPASS’ is doing ?
4/how does the data appear in hexadecimal in RESULT ?
6/what is the purpose of the using assembly directive?
Ans1
Register R6 is being used as the base register because BALR is branch and Link Instruction Register and followed by R6 means address of next instruction and after R6 signifies address of next instruction .Thus R6 is base register and 0 value stored at the time of assembly.
Assembly language Use this portion of the program to help you answer the questions BALR R6,0...
Assembly language Use this portion of the program to help you answer the questions BALR R6,0 USING *.R6 L R10,FIRSTNUM L R12,NEXTNUM CR R10,R12 BC 8,BYPASS AR R10,R12 ST R10,RESULT B PROGEND BYPASS SR R10,R12 ST R10,RESULT PROGEND END FIRSTNUM DC F’15 NEXTNUM . DC . F'20' RESULT . DS . F 1 /what register is being used as the base register and what value is stored at the time of assembly ? 2/ What will be stored in RESULT?...
A BALR instruction appears in a program on line 00C. The instruction itself is 2 bytes long. The next line contains an assembly USING directive. There is a variable called FIELD1 defined at line 2DA. (a) What is the displacement that will appear in an instruction which references FIELD1? (b) Assume the BALR instruction reads BALR R10,0. What does this instruction do? (c) What do we call R10? (d) In order to refer to the register as...
Section B - ARM Assembly Language (25 marks) An ARM instruction set summary is provided at the end of this paper 1. (5 marks) Consider the following assembly instruction STMFD r13!, (r5-6} Before executing this instruction, registers hold the following values: Register Value Register r9 Value r4 0x00400040 0x00000000 r5 r10 0x11223344 0x00800080 r6 0x55667788 r11 0x10001000 r7 0x99aabbcc r12 0x20002000 r8 exddeeff00 r13 ex40004000 What memory locations are affected after executing the above instruction? In a table, with a...
Please answer the following questions involving MIPS assembly code: A) For the C statement below, what is the corresponding MIPS assembly code? Assume f, g are stored in S1 and S2. f = g + (-f -5) B) For the C statement below, what is the corresponding MIPS assembly code? Assume i and j are assigned in registers S1 and S2 respectively and base of address of arrays A and B are in registers S6 and S7. B[8] = A[i...
Please answer the list questions above with explanation. Thank
you
LOAD-STORE PROGRAM EXAMPLE Write an Assembly program to add two 8-bit numbers. C A+B lds r16, A lds rl7, B : 1. Load variables add E16, :172 Do something 2. Do something sts C, r16 : 3. Store answer Identify the operation, source operand, destination operand in the first Data Transfer insiruction. Identify the source/destination operand in the Arithmetic and Logic (ALU) instruction. .What addressing mode is used by the...
Please answer all the questions! Thank you.
For the following C statement, what would be the corresponding MIPS assembly code? Assume that the variables a, b, c, and d are given and were declared as 32-bit integers a - b - (c + 7)+ d; 1. 2. Show how the value 0xB47CA034 would be arranged in a little-endian and big-endian machine Assume the data is being stored starting with address 0 3. Convert the following base-16 numbers to base-2 a....
Use the following assembly code to answer the questions below, assuming that: X19 = f, X20 = g, X21 = i, X22 = &a LDUR X19, [X22, #0] LDUR X20, [X22, #8] ADDI X21, XZR, #0 LOOP: SUB X9, X19, X20 CBZ ENDLOOP ADDI X19, X19, #1 ADDI X21, X21, #1 B LOOP ENDLOOP: STUR X21, [X22, #16] a.What value would the assembler insert for ENDLOOP in the CBZ instruction? b. What value would the assembler insert for LOOP in...
(f) and (g) please
f and g please
letters Question 2 Indirect addressing mode in assembly language is sanilar to pointers in C. Answer the following questions: (1 point) a) How many 8-bit registers can a FSR access in the PICI8F452 MCU? b) Write the assembly language command to load the address of the variable with name: PVal into one of the FSR? (2 points) (2 points) (2 points) c) What is the meaning of: movf PREINC2, F? d) What...
Implement the following statements using MS430 assembly instructions. You may use more than one, but you should minimize the number of instructions required. You can use both native and emulated instructions. Use hex notation for all numbers 1. (a) Move the word located in register R14 to R15 (b) Increment the word in R6 by 2. (c) Perform a bitwise ANDing of the word located at address 0x0240 with the datum in R15, placing the results in R15. (d) Rotate...