CFS2101-2324 Assignment Brief 23-241
CFS2101-2324 Assignment Brief 23-241
CFS2101-2324 Assignment Brief 23-241
1
Submission Submission and Feedback Details
independent time you
should allocate to
complete this
assessment
Submission type and Source files
format
Date by which your 28/12/2023
grade and feedback will Note: This is a maximum of three working weeks after the
be returned submission deadline.
2
Additional Guidance Details
Information
Academic Tutor, or the School’s Guidance Team.
([email protected]).
Requesting a Late It is expected that you complete your assessments by the published
Submission deadlines. However, it is recognised that there can be unexpected
circumstances which may affect you being able to do so. In such
circumstances, you may submit a request for an extension.
Extension applications must be submitted before the published
assessment deadline has passed.
There are two types of extension that you may request. You will be
required to indicate which one you are applying for when you
submit the request for Late Submission via MyHud/MyStudies.
3
Additional Guidance Details
Information
Resources Please note: you can access free Office365 software and you
have 1 Tb of free storage space available on Microsoft’s
OneDrive – Guidance on downloading Office 365.
4
Disassembling y86 Machine Language
1. Assignment Aims
Machine language and instruction set architecture (ISA) are integral to the design
and architecture of a processor. They also serve as an interface between higher-level
programming languages and the underlying hardware platform.
This aim of this assignment is to further develop your understanding of ISA by tasking
you to develop a disassembler for the y86 ISA.
2. Learning Outcomes:
On successful completion of this assignment, you will meet the following learning
outcomes.
Ability Outcomes
4. Construct solutions to problems related to computer systems and their
components
6. Develop a small computer with a minimal instruction set
3. Assessment Brief
You will be given a partially completed y86 disassembler written in C. Your aim is to
complete its functionality so that it is able to disassemble the instructions defined
the y86 architecture. The specification of all y86 instructions is available on
Brightspace as part of the teaching materials.
To help you better manage your work, this assignment is further divided into the
following three tasks. You will be given a starting source along with test files for each
task. These files can be downloaded from Brightspace under the Assessment area.
Task 1 Decode y86 Opcodes (20 pts):
You are required to decode the opcode part of a list of given instructions. Each
decoded opcode must be correctly displayed as its corresponding assembly
mnemonic (i.e. symbolic name), e.g., in y86 the opcode 0x00 should be displayed as
halt.
Task 2 Decode y86 Instruction Operands (40 pts):
Please note: The starting point of this task is based on your solution to task 1, i.e. your
disassembler should be able to convert all opcodes into their corresponding
mnemonic.
The objective of this task is to correctly decode the operands associated with an
instruction. There are only three instructions with no operand, i.e. nop, halt and ret.
5
Therefore, the majority will require the disassembling of operands. For example: the
y86 machine code 0x6060 is ‘addl %esi, %eax’ in assembly.
Task 3 Disassemble y86 Binary Machine Code (30 pts):
This task is designated as a challenge task which is built on your solution to task 1 and
2. For this task, you will disassemble programs presented in y86 bytecode (machine
code) and convert them into the corresponding y86 assembly.
You are provided with three test programs in both assembly and bytecode. Each
program is stored in C as a contiguous array of unsigned char (bytes). The bytecode
file reader has been written for you so you can dive straight into disassembling the
bytecode. Your solution should follow a basic von Neumann machine by disassembling
a program based on the position and advancement of the program counter (PC).
Please note: Some test programs have data region. You do not have to decode the
data region. You can check the disassembled code against the provided assembly
code.
4. Submission
You must submit the source files for the completed tasks to the designated submission point
on Brightspace by 18/12/2023 by 12:00 noon.
The source file for each task should be named in using the following convention:
y86disasm-task1.c
y86disasm-task2.c
y86disasm-task3.c
Please note: You can upload more than one file per submission. You must make sure all
source files are uploaded before confirming your submission. Multiple submissions are
allowed. However, only the latest submission will be stored and marked.
5. Marking Scheme
The total attainable mark from this assignment is 100 which is further granulated based on
the following table. Marks will also be awarded for partially correct solutions.
6
* (1) Solution correctness (80%), which is measured by how well your program outputs
match the expected outputs of multiple test cases;
* (2) Effective use of C programming features (20%), where applicable, which may include
Bitwise Operators, Conditional Statements, Loops, Arrays, and Functions.