Find Jobs
Hire Freelancers

ARM Assembly Code Project Simple

$10-30 USD

已取消
已发布将近 7 年前

$10-30 USD

货到付款
I need this project done in 24 hours, by 4/19/17 at 6:00pm Pacific Time. Create a program named "sort.s" that does the following: reads integers from a file named "[login to view URL]". (There will no more than 8192 integers in the file) Sorts all the numbers Prints the sorted integers out, one per line, to a file named "[login to view URL]" You must implement and use the following functions: int read(int filenamelocation, int arrayaddress, int arraysize) void sort(int arrayaddress, int itemcount) int findsmallest(int arrayaddress, int start, int end) void swap(int arrayaddress, int a, int b) void print(int filenamelocation, int arrayaddress, int itemcount) Here are those functions in java but they need to be changed to ARM assembly for the project: void sort(int [] array, int itemcount) { int pos; int smallpos; pos = 0; while (pos < itemcount-1) { smallpos = findsmallest(array, pos, itemcount); swap(array, pos, smallpos); pos = pos + 1; } } int findsmallest(int [] array, int first, int itemcount) { int smallest int index; smallest index=1; while (index < itemcount) { if (array[index] < array[smallest]) smallest = index; index = index + 1; } return smallest; } void swap(int [] array, int first, int second) { int temp = array[first]; array[first] = array[second]; array[second] = temp; } Or super sneaky using the power of logic and math without a third variable or register... void swap(int [] array, int first, int second) { array[first] = array[first] ^ array[second]; array[second] = array[first] ^ array[second]; array[first] = array[first] ^ array[second]; }
项目 ID: 13769433

关于此项目

3提案
远程项目
活跃7 年前

想赚点钱吗?

在Freelancer上竞价的好处

设定您的预算和时间范围
为您的工作获得报酬
简要概述您的提案
免费注册和竞标工作
3威客以平均价$112 USD来参与此工作竞价
用户头像
A proposal has not yet been provided
$55 USD 在1天之内
0.0 (0条评论)
0.0
0.0

关于客户

UNITED STATES的国旗
burbank, United States
5.0
2
付款方式已验证
会员自4月 18, 2017起

客户认证

谢谢!我们已通过电子邮件向您发送了索取免费积分的链接。
发送电子邮件时出现问题。请再试一次。
已注册用户 发布工作总数
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
加载预览
授予地理位置权限。
您的登录会话已过期而且您已经登出,请再次登录。