The following exercise I have to make, but I've got no idea how to do it.
Can anyone help me?

Write a program in assembly in the ATmega32 AVR Studio which both
following issue as a choice of the following commands
worked out and resolved.
Make sure there in a flash memory array will be placed in the next 10
hexadecimal numbers:
0x01, 0x02, 0x03, 0x04, 0x05, 0xF0, 0xE0, 0xD0, 0xC0, 0xB0.
Use a function (subroutine). The subroutine performs operations.
In the main seat (s) the herhalingslus (s).
Go through the herhalingslus (s) once a step by step and note the values of
the program counter, the stack pointer and the stack content
a. just before calling the subroutines (in the call instruction)
b. inside the subroutines (in the first instruction of the subroutine)
c. shortly after returning to the main program (the first statement after the
call instruction).
Find the largest positive number and put it with his number in the RAM
memory (two locations). Summarizes the numbers here as two's complement

best regards,

Hello! Could somebody help me to make to make this java code( or part) to assembly (mips 32)? I would apprecιate any help! The java code is:

import java.io.*;
class BinarySearch
{	final static int MAX=5;
	public static void main (String args[]) throws IOException
	{	char [] a = new char [MAX];
		System.out.print("Give "+MAX+"Characters: ");
		for (int i=0; i<MAX; i++) a[i]=(char) System.in.read();
		char key = (char) System.in.read();
		bsort (a);
		int found = bsearch(a,key);
		if (found== -1)
			System.out.print(key+" not found in array:");
			System.out.print(key+" found in array:");
		for (int i=0; i<MAX;i++)	System.out.print(a[i]);
	static void bsort(char a [])
	{	char hold;
		for (int j= MAX-1; j>=0; j--)
			for	(int i=0; i<=j-1;i++)
				if (a[i]>a[i+1])
				{	hold=a[i];
	static int bsearch(char a [], char key)
	{	int low=0;
		int high=MAX-1;
		int middle;
		while (low<=high)
		{	middle = calc_middle(low,high);
			if (key== a[middle]) return middle;
			else if (key<a[middle]) high=middle-1;
			else low= middle+1;
		return -1;
	static int calc_middle(int l, int h)
	{	return ((l+h)/2);
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.