Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
expand_more
expand_more
format_list_bulleted
Question
in mips assembly code how can i ask the user to enter 10 integers and store them in an array
Expert Solution
arrow_forward
Step 1
Solution for given problem -
Step by stepSolved in 3 steps
Knowledge Booster
Similar questions
- MIPS Programming Assignment Part I Rewrite C statements int i = 11; int j = 10; int A[] = { 0x11, 0x22, 0x33 }; int B[] = { 0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8 }; B[ 8 ] = A[ i - j ]; in MIPS assembly. Assume that addresses of variables i, j, A, and B are loaded into the registers $s3, $s4, $s6, and $s7, respectively: .data i: .word 11 j: .word 10 A: .word 0x11, 0x22, 0x33 B: .word 0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8 .text la $s3, i # load address of i la $s4, j # load address of j la $s6, A # load address of A la $s7, B # load address of B When you finished programming, add a comment at the end of your code which specifies what value is assigned to the location of B[8] after the program executes. Part IIWrite MIPS Assembly program that allows the user to enter a string of text. Determine whether the entered string is a palindrome (a word or a phrase that reads the same backward as forward, like "kayak" and "level") and print the result on the screen.arrow_forwardConvert the following function in Python code into MIPS code. Note that 2 integers a and b are passed as arguments to the function and result is returned back to the calling execution unit. 1. def Problem3 (a, b): # Initialize sum sum = 0 for i in range(a, b): sum = sum+ 2 return (sum)arrow_forwardWrite Assembly Language Program to arrange an array of Data in descending order in 8085 microprocessorarrow_forward
- NASM, x86-64 instructions and architecture, Loops, System calls, ASCII Can someone please help me write a NASM assembly language program "caesar.asm" that does caesar cipher involves shifting letters in the given string by a given number in the alphabet? Thank you very much for your help. The program should: Ask for user input between -20 and 20 Ask the user for a string and display the unedited string that the user entered Lastly, display the caesar cipher edited string.arrow_forwardPlease write in MIPS assembly code which, when run under QtSpim, will do the following:arrow_forwardUsing assembly language : (please also draw the flowchart for this program.) Write a program to compute the average of an array of 32 unsigned 8-bit integers stored in the program memory. Leave the array average in WREG. (Hint, the array contains 32 8-bit numbers. Therefore, the array average can be computed by using shift operation instead of division.)arrow_forward
- Select common examples of when an assembly programmer would want to use the stack: to pass arguments to save return address for CALL local variables temporary save area for registers applications which have FIFO nature, such as customers waiting in a bank queuearrow_forwardtranslate the following MIPS code to C. Assume that the variables i, j, and k areassigned to the registers $s0, $s1, and $s2, respectively. Assume that the baseaddress of the array A is in registers $s6.Loop: blt $s0, $s1, Exitbge $s1, $s2, Exitaddi $s1, $s1, 5j LoopExit:addi $t0, $zero, 4ble $s0, $t0, Donesll $t1, $s0, 2add $t2, $s6, $t1sw $zero, 0($t2)Done:arrow_forwardConvert the following into MIPS code: main() { int a = 10; int b = 14; int s; s = sum(a, b); if(s == 25) a = 2; else a = 1; } int sum(int a, int b) { return a + b; }arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education