Find Jobs
Hire Freelancers

A programming project using ARM 6 assembly language

$10-30 USD

Completed
Posted about 4 years ago

$10-30 USD

Paid on delivery
The programming project is to calculate the LCM() and GCD() for two user-entered positive integers. Like this: There are requirements about the structure of your program and how it should work (see below). This assignment is easily done in fewer than 150 lines of code using (only) the ARM instructions and programming structures that we've covered. If you find yourself radically exceeding that number of lines it might be time to rethink your approach! Requirements The program should consist of two functions and the main code. One function implements integer quotient/remainder. The other calculates the greatest common divisor using the above formula. The main code should call these functions to perform the LCM calculation. The function call mechanism is the instructions bl and bx. No credit will be given for simply branching into and/or out of the functions. The GCD calculation is recursive. Your function should recursively call itself (via bl). No credit will be given any non-recursion approach. The parameters should be passed into the function via r0 and r1 and the result returned in r0. Integer division If N is a non-negative integer (numerator) and D is an integer greater than 0 (divisor), integer division N ÷ D produces a pair of integers Q (quotient) and R (remainder) which satisfy N = D × Q + R and for which 0 ≤ R < D. The number Q is the quotient and the number R is the remainder (also known as the modulus, which we compute with the modulus operator in most programming languages). In the above formulas we need the remainder when computing GCD and we need the quotient when computing the LCM. ARM6 assembler doesn't have an integer division instruction but it's an easy exercise to create an integer division function. You just repeatedly subtract the divisor from the numerator until the numerator is smaller than the divisor. The number of times you subtracted is the quotient. Whatever is left of the numerator is the remainder. Try it... When coding it's always best to start small and build up. Additionally, it always pays to test your functions before you incorporate them into a program. These things are especially true when coding in an assembly language! The best starting point is to make sure you can do input and output correctly. Once you've got that working, get an integer division function working. Once you've got integer division, it's easy to calculate the LCM. Because both r0 and r1 get used for parameters and return values, it will pay to be very careful to protect their contents. The stack is your friend, here. Because there can be many function calls it definitely pays to be very careful with the stack. (There was an important lesson in the debugger-lab's code...)
Project ID: 24052251

About the project

7 proposals
Remote project
Active 4 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
Awarded to:
User Avatar
Hi. I’m embedded software engineer working for Bosch Vietnam. I was a SoC hardware design and verification engineer in Renesas Vietnam. ARM assembly and C are the main programming language. Kindly contact me if you’re interested.
$25 USD in 1 day
0.0 (0 reviews)
0.0
0.0
7 freelancers are bidding on average $25 USD for this job
User Avatar
Hello! I am an experienced design engineer and have helped many students on their assembly projects. I already have the setup ready and should be able to help you out right away!
$20 USD in 1 day
5.0 (103 reviews)
6.1
6.1
User Avatar
hi, i'm an expert programmer, i see your project specs, i already write a recursive c code for it and ready to convert it to arm6 assembly language .
$30 USD in 3 days
5.0 (1 review)
0.6
0.6
User Avatar
Hi, I have understood your requirement very well. I have 3 years of Embedded domain mostly on ARM cores. I have developed bootloaders, device drivers, Re-Programming modules , EEPROM module and so. As you can see most of them involves assembly language for implementation. I am confident that I can deliver the project on time.
$20 USD in 7 days
0.0 (0 reviews)
0.0
0.0
User Avatar
I read you requirements and I am ready to do this.i have a knowledge of c programming and assembly language so I will fulfill your requirements.
$25 USD in 3 days
0.0 (0 reviews)
0.0
0.0
User Avatar
i have good experience in c and embedded c i write assembly code using m0 and m4 arm core for me if you accept proposal i will start to learn assembly using arm 6 and will implement the code after it
$25 USD in 5 days
0.0 (0 reviews)
0.0
0.0
User Avatar
5 years experience in Embedded and C/C++. Wrote debuggers and simulators for different embedded systems. Working primary on AVR, ARM, PICs, so it should not be a Problem.
$30 USD in 2 days
0.0 (0 reviews)
0.0
0.0

About the client

Flag of UNITED STATES
MANKATO, United States
4.9
5
Payment method verified
Member since Nov 18, 2018

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.