Basics of subroutines when programming in asm

Assignment Help Assembly Language
Reference no: EM132194348

Topic - Motorola 68000 Assembly

Purpose
This assignment is designed to familiarize you with the basics of subroutines when programming in ASM.

Requirements
This assignment consists of five major requirements.
1) Developing a solution to the problem below.
2) Ensuring that it assembles and runs correctly using the tools on edoras.
3) Documenting your solutions correctly.
4) Organizing your handin directory and submissions correctly.

Problem
1) For this program you will be creating two .s files (and you will turn in both .s files). You will be building a subroutine in the findmin.s file and a prog4.s file which will be your main. You should ORG your findmin subroutine to $6000.

Your findmin.s subroutine will recursively find the minimum value of an array of values.

You should implement the following psuedocode:

int findmin(int* vals, int count)
{
if(count == 1){
return vals[0];

}else{

int minrest = findmin(vals+1,count-1); if (minrest < vals[0]){
return minrest

}else{

}
}
}

return vals[0]

The basic idea is that the minimum value is either the first element of the list, or it is the minimum value from the rest of list. You should correctly implement the above psuedocode in your findmin.s file.

Your prog4.s file will be your main program. In it, you will define a data array of your choice. Your prog4.s file will print your title, print what the minimum value in the array should be then call the findmin function and print the minimum value that it returns with the provided strings. Program #4, SSS LLL, mascxxxx
Minimum number is: 4
Found Minimum number is: 4

In theory, you could write the program such that it simply prints to correct answer, but you should know that your findmin.s function will be tested independently of your prog4.s and validity of prog4.s will be inspected by hand.

2) You must ensure that your assembler can be assembled and run on rohan using the tools ppasm and bsvc. You may develop your solution on any machine you desire, as long as the final solution works on rohan.

3) Your solution must have a complete comment header as is detailed in your template.s file. During runtime, your solution to section 1 must output a correct title string as the first line printed. It should be in this format: Program #1, Student Name, mascXXXX

Attachment:- Problem.rar

Reference no: EM132194348

Questions Cloud

Maslow and herzberg to the understanding of worker : Describe and compare the basic contributions of Maslow and Herzberg to the understanding of worker motivation.
Maslow and herzberg to the understanding of worker : Describe and compare the basic contributions of Maslow and Herzberg to the understanding of worker motivation.
Identify the operative employment and contract laws : MBA 610 :Explain how the identified facts will help establish the legal rights and/or obligations of the defendant in relation to your company.
What significant historical or cultural event relate to text : Need help writing a 6 page paper from The Aeneid by Virgil and the City of Ladies by Christine de Pizan it must include comparison ex.
Basics of subroutines when programming in asm : Designed to familiarize you with the basics of subroutines when programming in ASM - Ensuring that it assembles and runs correctly using the tools on edoras
Enterprise resource planning system : What could be the possible risks associated with an Enterprise Resource Planning system (ERP)?
What could be done to reduce stress on the job : What could be done to reduce stress on the job and what strategies could be implemented to relieve stress when it does occur?
What is a job position in which you are interested : Based on these descriptions, describe two typical situations someone in this position would face; then write situational interview questions
Write a critique of the delivery technique : Look at the following video. Then write a critique of the delivery technique. Does this speaker, Emma Watson, follow the recommendations given.

Reviews

len2194348

12/15/2018 12:39:54 AM

Example Output Output is being recorded in, outfile 55555 Program #4, SSS LLL, mascxxxx Minimum number is: 4 Found Minimum number is: 4 Additional Details You do not need to do input checking. You can assume that the input value is a valid input.

Write a Review

Assembly Language Questions & Answers

  Write an arm assembly program that prints all the integers

Write an ARM assembly program that prints all the integers greater than 0 and less than 1000 that not divisible by 5. You must submit only a single file named "proj1.s" that is capable of running under ARMSim.

  Design a calculator that can do add sub mul and div

Assignment: Codeworrior Programming in Assembly Language- Design a calculator that can do add, sub, mul, and div with two 4-digit (0 - 9999) decimal numbers.

  Develop a program that will implement conditional statement

EECS 2110- Using the MARS or SPIM simulator develop a program that will implement the following conditional statement. Write a program with a leaf subprogram that will take two values in $a0 and $a1 and compute their greatest common divisor.

  Implement a reverse polish calculator in marie

I want you to implement a reverse polish calculator in MARIE. This calculator must be implemented with or support the following requirements

  Study code and find how two dimensional array is accessed

Create a procedure called calc_col_sum which uses the same registers as the original procedure EBX ECX EDX ESI - The procedure return value should be in EAX.

  Create simple 8-bit alu using add-subtract-shift functions

Create a simple 8-bit ALU. Requirements:The eight functions that you will implement are: add, subtract, and, or, shift left logical, less than, shift right logical.

  Create a communications plan and procurement process

IT 328- You will create a communications plan and procurement process. Download the communications plan template provided in the module resources.

  Write an assembly program to implement finite state machine

CPSC 2382: Assembly Language - write an assembly program to implement a Finite State Machine (FSM) that recognizes hexadecimal integerconstant that conforms

  Write a set of assembly codes in uvision

Write a set of assembly codes in uVision that performs the function described below. Begin with the assumption that 10 randomly selected integer numbers (data) are stored at 0x20002000 to 0x20002024 in sequence in the memory region.

  Implement the above fib function in assembly

Implement the above fib function in assembly, i.e., translate fib into an equivalent assembly procedure; Implement your main procedure which lets the user enter the number n, calls procedure fib to get the nth Fibonacci number.

  Provide the rtl instructions

Provide the RTL instructions and the time steps that will facilitate the execution of the following assembly language instructions  LDA addr,x  STX addr,x

  Write an assembly program

Prepare an Assembly program that reads in a number of cents.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd