1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
kiruha [24]
3 years ago
11

simpley convert the code below to assembly languageYour proof-of-study task is to hand-compile the code below into an assembly l

anguage function (a procedure), then place it in the provided .asm file, test it, and turn it in. Your function must adhere to the procedure calling conventions covered in class. You must also use specific registers when storing local variables, see below.Before you start: You may use my tests -- I've set them up to make it easy for you to test your code, and I have examples in the tests! :) Here they are:Proof-of-Study #4.asmHere is a recursive sorting algorithm that you will convert into assembly:void sort (int[] data, int lowIndex, int highIndex){ print ("Entering sort: ") print (lowIndex) print (" ") print (highIndex) print ("\n") if (lowIndex >= highIndex) print ("Leaving sort: ") print (lowIndex) print (" ") print (highIndex) print ("\n") return tempIndex = lowIndex centerIndex = lowIndex centerValue = data[highIndex] while (tempIndex < highIndex) tempValue = data[tempIndex] if (tempValue < centerValue) data[tempIndex] = data[centerIndex] data[centerIndex] = tempValue centerIndex = centerIndex + 1 tempIndex = tempIndex + 1 data[highIndex] = data[centerIndex] data[centerIndex] = centerValue sort (data, centerIndex+1, highIndex) sort (data, lowIndex, centerIndex-1) print ("Leaving sort: ") print (lowIndex) print (" ") print (highIndex) print ("\n") return}Note that the code looks similar to Java, C, or many other languages. It has variables (assumed to be integers or arrays), a loop, and 'if' statements. The loop and 'if' statements use indentation to show scope.When converting this algorithm, use only these registers for variables:Variable Register Notesdata $s1 Array address, it arrives in $a0 but your code will copy $a0 to $s1 and use $s1 insteadlowIndex $s2 integer, it arrives in $a1 but your code will copy $a1 to $s2 and use $s2 insteadhighIndex $s3 integer, it arrives in $a2 but your code will copy $a2 to $s3 and use $s3 insteadtempValue $t0 integertempIndex $t1 integercenterValue $t2 integercenterIndex $t3 integerWhen needed, you can use $t4-$t9 for additional temporary computations (addresses, etc.), but not for program variables. You may use pseudoinstructions.You will need to add code to the function to properly create a stack frame and to preserve registers appropriately. Follow the convention covered in class (required). Clearly comment your code. You may write the assembly code for your function separately, or you may write it as part of this test program (easier):Do not optimize your program. Each C/Java statement should be independently translated to assembly. Don't avoid writing code because you want to reuse a previous temporary value - always write the complete code for each statement. (You can verify correctness much faster by doing it this way.)After you convert the statements, add the code to create the stack frame and do preservation of registers.The code is recursive. Be careful to preserve the needed temporary variable(s) just before you make the first function call, and restore it/them when the function call completes.If you're curious, note that I adapted a quicksort algorithm to be easy to code in assembly.Do not add sorting code (or other critical statements) to 'main' because it won't be in our version of main. You can change your main as needed for testing (but remember that we will not use your 'main' function).Your sort procedure should be contiguous statements. Don't embed other functions within your sort function. We'll only copy your sort function into our test code, and it needs to be easy for us to extract it.
Computers and Technology
1 answer:
sweet-ann [11.9K]3 years ago
8 0
I idk :) ok study is (((47437)
You might be interested in
Analysts use _____ to show the objects that participate in a use case and the messages that pass between the objects over time f
ch4aika [34]

Answer:Sequence diagrams

Explanation: Sequence diagram is the diagram that displays about the connection of the objects in a sequential manner. The sequence depicted through the vertical lines in parallel form was about the object function and the horizontal line showed interaction between them for the exchange of the information.

Other options are incorrect because structural models have the infrastructure in particular format, communication diagrams depicts the exchange of information through communication and class diagram is the diagram that displays the system's class.Thus the correct option is sequence diagram.

5 0
3 years ago
Explain input device​
Kamila [148]

Answer: ......wlc;)

Explanation: Any information or data sent to a computer for processing is considered input. Input or user input is sent to a computer using an input device. The picture is an illustration of the difference between input and output. The input example (top) shows data being sent from a keyboard to a computer

4 0
3 years ago
Read 2 more answers
Please help due today please help me!!!!!
irakobra [83]
A plotter is a special output device used to produce hard copies of large graphs and designs on paper, such as construction maps, engineering drawings, architectural plans and business charts.
~

Computer output devices receive information from the computer, and carry data that has been processed by the computer to the user. Output devices provide data in myriad different forms, some of which include audio, visual, and hard copy media.
~

They are electroacoustic transducers, which convert an electrical signal to a corresponding SOUND.
3 0
3 years ago
Which cable would you check if you can't access any web pages?
ozzi

Answer:

If You Can't Access the Web

We'll assume that your Internet was working at an earlier point. If you are setting it up for the first time, the steps listed below were not designed with that purpose in mind. You need to follow the instructions that came with your router or modem.

I've included a series of definitions for the terminology used on this page.

Reboot the Computer

The first step should be rebooting your computer or device to see if that fixes the problem. You'd be surprised how often that simple step resolves issues.

If restarting your computer or device doesn't work, you'll have to check out each potential problem area to see if it restores access.

Check These Areas

The most likely problem areas related to a loss of Internet assess are one or more of the following:

your computer is disconnected from the network (check the network settings;

a proxy has been added to your browser or operating system;

your high-speed modem and/or router needs resetting or is disconnected;

a disconnected network cable (if your computer is wired);

your computer needs to reboot;

your firewall or security software is misconfigured; or

Your software is misconfigured for access to the Internet.

Progress through the suggestions on this page to test alternative solutions. I've presented them in the order I'd likely progress if I were to be assessing the problem and looking for solutions.

ISP Issues

If the issue is with your ISP or (rarely) a regional access issue, the resolution is beyond your control. You'll just have to wait for your ISP or the Internet structure to repair the problem.

5 0
3 years ago
when you enter a url, you’re creating a(n) ____ link, which is the full and complete address for the target document on the web.
RoseWind [281]

Answer:

Hope this helps it is called an absolute link.

6 0
3 years ago
Other questions:
  • Barry was giving a sales presentation to a client. He noticed that the client kept his eyes glued on the slide rather than looki
    15·2 answers
  • How could a system be designed to allow a choice of operating systems from which to boot? What would the bootstrap program need
    14·1 answer
  • Which building-block feature is available in the Text grouping on the Insert tab?
    14·1 answer
  • Considering the concept of salted passwords, answer the following questions: a. Bob thinks that generating and storing a random
    10·1 answer
  • Which best describes obliteration in a forged document?
    11·1 answer
  • Visual basis,C, C++ and Java are all examples of computer programming ________.
    15·1 answer
  • Consider a direct-mapped cache with 256 blocks where block size is 16 bytes. The following memory addresses are referenced: 0x00
    7·1 answer
  • _______________ ________________ have human editors that evaluate, select, and organize websites into a hierarchy of categories.
    11·1 answer
  • Hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
    14·2 answers
  • What is a current trend in ERP systems?
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!