热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

CMP5013AArchitecturesandOperatingSystems

代做CMP-5013A作业、代写CC++程序语言作业、代做OperatingSystems作业、CC++课程设计作业代写SchoolofComputingSciencesModul

代做CMP-5013A作业、代写C/C++程序语言作业、代做Operating Systems作业、C/C++课程设计作业代写
School of Computing Sciences
Module: CMP-5013A Architectures and Operating Systems
Assignment: Simple cipher in ARMv-7 assesmbly language.
Set by: Michal Mackiewicz M.Mackiewicz@uea.ac.uk
Date set: 12th October 2018
Value: 25%
Date due: 14th November 2018 3pm week 8
Returned by: 12th December 2018
Submission: Blackboard
Learning outcomes
To become familiar with the basic ARMv7-A instruction set architecture. Improved low-level
programming skills with a focus on creating efficient solutions.
Specification
Overview
In this assignment you will implement a simple cipher in the ARMv7-A assembly language.
Description
The algorithm you will implement is based on letier transpositions according to the scheme
illustrated in Table 1.
The cipher requires a secret private key, which needs to be known to both parties to encrypt
and decrypt any messages. The key can be represented by a string of characters.
Table 1: A table containing the private key and the message.
d r a g o n
a t t a c k
a t f i v e
p a s t f o
u r t o m o
r r o w x x
Let’s assume that we want to encrypt the string attack at five past four tomorrow with the
private key string dragon. First, you enter the message into a table, row by row as shown in Table
1. If there is any space let in the last row, we fill it with one of the rare le?ers e.g. x. In order
to encrypt the message, we need to change the order of the columns in the table according to
the alphabe?c order of the le?ers in the private key as shown in Table 2. Then, the enciphered
1
Table 2: A table with the reordered columns. Cipher text can be read columnwise.
a d g n o r
t a a k c t
f a i e v t
s p t o f a
t u o o m r
o r w x x r
message is read columnwise. In this case, it would be ?stoaapuraitowkeooxcvfmxtiarr. Note,
to make the deciphering opera?on harder, you need to strip any message from all white spaces
and punctuation and convert any upper case letters to lower case.
Message decryption is a reverse process utlising the same table. The cipher text is written
into the columns of Table 2 and later read according to the private key letter order.
Your ARM assembly program, which you must name cw1, must accept two command line
arguments. First argument must be 0 or 1 denoting encrypt/decrypt. The second argument
must be a string representing the private key. The actual text to be encrypted/decrypted must
be passed to the program using standard input. Your program must first convert the upper case
letters to lower case before encryption. Further, it must strip the input text from any characters
and whitespaces other than the 26 lower case English alphabet letters. The program must
return its output i.e. depending on the first argument encrypted/decrypted text using standard
output. You should test your program with the following syntax:
cat textfile.txt | ./cw1 0 privatekeystring | ./cw1 1 privatekeystring
This should return the original text from textfile.txt, albeit lower case and without
white spaces and punctuation.
You are allowed to assume that the program input will not be longer than 1000 letter characters.
Relationship to formative assessment
The formative tests, which are available on Blackboard, should be helpful in learning the ARMv7
ISA. You should complete labsheets 5-7 before atempting this coursework.
Deliverables
This is an exercise that can be done in pairs. If you choose to work in a pair you must notify
me about your pair members by email by Wed 24th Oct 5pm. If you don’t, you must complete
your work individually.
The source code must be zipped into a file with the name containing Student IDs of both
members of the group or your student ID if you worked individually. Bothmembers of the group
must then submit this (same) file to the digital dropbox located on the module Blackboard page.
Make sure you test your solu?ons on a PiCluster machine BEFORE you submit.
Late submissions need to follow the appropriate late hand-in procedure. You can find out
this information from the Hub.
If you have medical or other problems you can seek extensions to coursework deadlines.
However, it is essential you obtain proper documentation in such cases (i.e. a medical certifi-
cate).
2
If one of the pair members is granted an extension, the other member of the pair also
receives an extension. However, remember that this will apply only to those pairs who notified
me that they will work in pairs, as explained above.
If you choose to work in a pair, both members of the pair are equally responsible for the joint
work. In case of any breakdown of co-operation, you should complete your work individually
and notify me by email. You will not receive any extra marks in such a case or for the fact that
you chose or had to work individually. To make this very clear, you should treat this coursework
as an individual exercise, which you are allowed to do in pairs.
If you cannot find your pair and would like me to help you find one, then please send me
an email with your details by Monday 22nd Oct 6pm and I will try to pair you with another
student. I strongly encourage everyone to engage in pair work.
Resources
You should do the Labsheets 5-7 which are available on BB. Labsheet 7 will contain exercises
which will be particularly relevant from the point of view of this coursework. You should also
consult the lecture notes on ARMv7 ISA.
Please also note the list of references below. In par?cular, I would encourage you to go
through the relevant chapters in references [2] and [3].
You should attend all the lab sessions and discuss your progress with the teaching staff who
will be able to provide you formative feedback.
My general advice on atempting this exercise as well as any other exercise in any assembly
language would be to break the problem into small tasks and tackle them one by one. For
each of these tasks, write a pseudo-code or the C code before you start writing in the assembly
language.
Marking Scheme
This coursework carries 25% of the module weight so you will receive up to 25 marks.
We will use the following marking scheme to award marks: All functionality implemented as requested. (up to 13 marks)
Code quality. (up to 6 marks).
Quality of the code comments. (up to 6 marks).
We will judge the code quality based on the following criteria. You should follow the AAPCS
Procedure Call Standard. The use of stack as well as frequent load/store instructions should
be avoided if possible. Try to keep your variables in registers to make your program more effi-
cient. Use ARM advanced addressing modes in cases when this can reduce the number of instructions.
Moreover, try to avoid short branches by using conditional execution of non-branch
instructions.
The comments need to be extensive and they might take more space than the assembly
code. The cw1.s you will need to submit should have a header with the usual information
you find in the file headers such as the authors, dates and short descriptions. All variable to
register mappings should be made clear. For each section you could a ach a commented-out
pseudo-code or C code. You should have both section and line comments.
Finally, you must not atempt to be ‘clever’ and submit the code that was produced by the
C compiler. The requested program is simple enough to be written in assembly language from
scratch. Any suspicious code will be thoroughly investigated and may result in 0 (zero) marks
3
awarded for this assignment. We also reserve the right to quiz both members of the pair about
any part of the code.
You should supplement your code with a brief commentary describing the individual contributions
of both members of the pair.
References
[1] ARM, The ARMv7AR reference manual, https://sta?c.docs.arm.com/ddi0406/c/DDI0406C C arm architecture reference manual.pdf
Last Accessed, Oct 2018.
[2] Roger Ferrer Ibanez, Think in geek - ARM assembler in Rasberry Pi, http://thinkingeek.com/armassembler-raspberry-pi/
Last Accessed, Oct 2018.
[3] Robert G. Plantz, Introduction to Computer Organization: ARM Assembly Language Using
the Raspberry Pi, http://bob.cs.sonoma.edu/IntroCompOrg-RPi/intro-co-rpi.html
Last Accessed, Oct 2018.
[4] ARM, Procedure call standard for the ARM architecture,
http://infocenter.arm.com/help/topic/com.arm.doc.ihi0042f/IHI0042F aapcs.pdf
Last Accessed, Oct 2018.
[5] ARM, ARM and Thumb-2 Instruction Set Quick Reference Card,
http://infocenter.arm.com/help/topic/com.arm.doc.qrc0001m/QRC0001 UAL.pdf
Last Accessed, Oct 2018.

因为专业,所以值得信赖。如有需要,请加QQ:99515681 或邮箱:99515681@qq.com 

微信:codinghelp


推荐阅读
  • 使用 ListView 浏览安卓系统中的回收站文件 ... [详细]
  • Ihavetwomethodsofgeneratingmdistinctrandomnumbersintherange[0..n-1]我有两种方法在范围[0.n-1]中生 ... [详细]
  • 多线程基础概览
    本文探讨了多线程的起源及其在现代编程中的重要性。线程的引入是为了增强进程的稳定性,确保一个进程的崩溃不会影响其他进程。而进程的存在则是为了保障操作系统的稳定运行,防止单一应用程序的错误导致整个系统的崩溃。线程作为进程的逻辑单元,多个线程共享同一CPU,需要合理调度以避免资源竞争。 ... [详细]
  • 本文对比了杜甫《喜晴》的两种英文翻译版本:a. Pleased with Sunny Weather 和 b. Rejoicing in Clearing Weather。a 版由 alexcwlin 翻译并经 Adam Lam 编辑,b 版则由哈佛大学的宇文所安教授 (Prof. Stephen Owen) 翻译。 ... [详细]
  • 深入解析 Lifecycle 的实现原理
    本文将详细介绍 Android Jetpack 中 Lifecycle 组件的实现原理,帮助开发者更好地理解和使用 Lifecycle,避免常见的内存泄漏问题。 ... [详细]
  • 解决Bootstrap DataTable Ajax请求重复问题
    在最近的一个项目中,我们使用了JQuery DataTable进行数据展示,虽然使用起来非常方便,但在测试过程中发现了一个问题:当查询条件改变时,有时查询结果的数据不正确。通过FireBug调试发现,点击搜索按钮时,会发送两次Ajax请求,一次是原条件的请求,一次是新条件的请求。 ... [详细]
  • poj 3352 Road Construction ... [详细]
  • 开机自启动的几种方式
    0x01快速自启动目录快速启动目录自启动方式源于Windows中的一个目录,这个目录一般叫启动或者Startup。位于该目录下的PE文件会在开机后进行自启动 ... [详细]
  • 本文介绍如何使用OpenCV和线性支持向量机(SVM)模型来开发一个简单的人脸识别系统,特别关注在只有一个用户数据集时的处理方法。 ... [详细]
  • 用阿里云的免费 SSL 证书让网站从 HTTP 换成 HTTPS
    HTTP协议是不加密传输数据的,也就是用户跟你的网站之间传递数据有可能在途中被截获,破解传递的真实内容,所以使用不加密的HTTP的网站是不 ... [详细]
  • 本报告对2018年湘潭大学程序设计竞赛在牛客网上的时间数据进行了详细分析。通过统计参赛者在各个时间段的活跃情况,揭示了比赛期间的编程频率和时间分布特点。此外,报告还探讨了选手在准备过程中面临的挑战,如保持编程手感、学习逆向工程和PWN技术,以及熟悉Linux环境等。这些发现为未来的竞赛组织和培训提供了 valuable 的参考。 ... [详细]
  • 如何将Python与Excel高效结合:常用操作技巧解析
    本文深入探讨了如何将Python与Excel高效结合,涵盖了一系列实用的操作技巧。文章内容详尽,步骤清晰,注重细节处理,旨在帮助读者掌握Python与Excel之间的无缝对接方法,提升数据处理效率。 ... [详细]
  • 如何使用 `org.eclipse.rdf4j.query.impl.MapBindingSet.getValue()` 方法及其代码示例详解 ... [详细]
  • 在Cisco IOS XR系统中,存在提供服务的服务器和使用这些服务的客户端。本文深入探讨了进程与线程状态转换机制,分析了其在系统性能优化中的关键作用,并提出了改进措施,以提高系统的响应速度和资源利用率。通过详细研究状态转换的各个环节,本文为开发人员和系统管理员提供了实用的指导,旨在提升整体系统效率和稳定性。 ... [详细]
  • 在 `UITableViewController` 中采用简洁的平面样式布局时,可以通过优化代码实现单元格扩展至屏幕边缘的效果,同时确保节标题以分组样式呈现,从而提升用户体验和界面美观度。通过这种方式,可以更好地组织和展示列表内容,使其更加清晰和有序。 ... [详细]
author-avatar
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有