APIIT CE0073-5: Computer Systems Low Level Techniques Project

Verified

Added on  2022/08/21

|25
|2274
|12
Project
AI Summary
This project presents a comprehensive exploration of assembly language, focusing on its practical application through the design of a calculator. The assignment begins with an abstract and introduction to assembly language, emphasizing its role in communicating with computers at a low level and its benefits in terms of performance and security. The project delves into recent processor architectures, comparing and contrasting CISC and RISC designs, highlighting their similarities and differences. The core of the project involves the system design of a calculator in assembly language, outlining requirements, objects, and limitations. The project also discusses potential future enhancements and concludes with a summary of the benefits of understanding assembly language for computer systems. Appendices provide example assembly code for various shapes and operations.
Document Page
Name
Intake code.
Subject.
Project Title.
Date Assigned:
Date Completed :
1
tabler-icon-diamond-filled.svg

Paraphrase This Document

Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
Document Page
Table of contents for every detailed section.
Abstract 




























 3
Introduction 


























...4
Recent Processors architecture 



















...5
System Design 

























.. 7
Limitation



























.. 8
Future Enhancement 
























9
Conclusion 



























.. 10
Reference 




























11
Appendix 




























.. 12
2
Document Page
Abstract
Assembly language abbreviated as asm makes it possible for humans to communicate with
computers. It is a low level programming language. It is the closest method of communication
humans can engage in with a computer. It makes it possible for programmers to observe the
flow of data and execution in a program. It is dependent on machine code instructions
Assembly has a lot of benefits such that it is difficult , close to impossible, to decompile the
code once the program has been compiled which implies one can observe a program already
compiled to see the assembly language. Another advantage is that it is useful for low level
operations that are hardware-specific like kernel components and bootloaders. Assembly
language has less overhead on its code as compared to high level languages thus making its code
run faster and uses less memory. It is the best for writing interrupt service routines and other
memory resident programs.
Forensic uses Assembly to find out what a process has been done during the incident. This is
achieved by recovering the trail of function calls it has made when executing that can be
retrieved from the process assembly code and stack from the memory. Assembly makes it
possible for the programmer to track the flow of data and execution in a program.
3
Document Page
Introduction on Assembly Language with research and analysis for the given case study
Assembly language uses an assembler is a program that takes in the basic computer instructions
and converts them into a pattern of bits which the computer's processor can use to undertake its
basic operations.
Assembly is the most powerful computer programming language available. Programmers get
insight to write effective code in high-level languages when they understand assembly language.
The instructions written in assembly language are changed to machine code of 0s and 1s by use
of a translator. The translator translates one by one to execute machine instructions. The machine
only executes what you want it to do and the necessary activities to perform the task thus makes
program execution fast as possible.
It gives access to I/O and themachine-dependent registers as well as the control of the exact
code behavior in critical sections . Assembly language makes a programmer have an
understanding of instruction set architecture. A microprocessor executes a program written in
assembly language.
The various programs that compile low level programming languages include TASM, TLINK
and GUI Turbo Assembler.
Assembly language
Computer assembly language is a single executable machine language instruction It is a
combination of letters which suggests the operation of an instruction
LD stands for LoaD . LDA stands for LoaD Accumulator. LOAD and STORE commands are
used to allocate to and deallocate from a register. The MOV instruction moves data around (See
Appendix 1)
Interrupts are used to call a subroutine of the system to be executed. There are two types of
4
tabler-icon-diamond-filled.svg

Paraphrase This Document

Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
Document Page
interrupts that include a read character from standard input,the result is stored in AL. The write
character to standard output, DL = character to write. (See Appendix 2 and Appendix 3)
The main directives of assembly language are starting addresses for programs, then starting the
values for memory locations and specify the end of program text. Assembly language takes loop
instructions that provide an easy method to repeat a certain block of statements severally.
Nested loops was implemented to generate the right pyramid (see picture 2)
Advantages of Assembly Language
It helpd the prgrammer know how to interface with the BIOS, the Operating system and the
processor. One knows data representation in the memory as well us other external devices like
the USB , micro card and the hard disks. A programmer gets an understanding of how the
processor executes as well as access the instructions via ther internal harddisk and the external
devices and processs the data.
Assembly needs less memory thus less time to execute a program, It makes the execution of
complex jobs that are hardware specific be easy. It is best for writing memory residing programs
as well as interrupt servce routines. It is the best to hand the jobs that are time critical.
Use of Assembly in forensic
Since assembly is more secure and it directly manages PC hardware it is best for use in
forensic.Since they are used to separate the ASCII and UNICODE characters from binary
5
Document Page
records from that could fast-track a method toward finding shrouded information.
Assembly is used with the signature file to scan a thin client gadget to find harmful injected
scripts.
Assembly language gives huge information which can be acquired by correlating this
information through analyzing the thread stacks in forensic analysis Assemblies have a lot of
metadata that include version number, localization details, and other product details. This is
important in forensic.
Recent processors architecture and describe the similarities and differences
6
Document Page
CISC which is the complex instruction Set Computer abbreviated and the Reduced Instruction
Set computer abbreviated as RISC are the main architectures used in designing and
manufacturing microprocessors of the current CPUs.
The similarity between CISC and RISC is that both of them have a similar layout of the silicon
thus their basic design is the same. They both have multiple processing cores. The L1 and L2
cache are dedicated to each other. They have L3 cache that is shared.
They have the cryptographic, miscellaneous I/O controllers, input and output interfaces, PCIe
controllers.
Both of them get instructions from memory by fetching the instructions. They process these
instructions to manipulate data within the computer. They can be used with compatible low level
software to execute the same programs.
They are dependent on electrical power to operate and dissipate heat. They can be implemented
with memory caches and pipelines to improve the processing speed.
The difference between the two is below:
CISC
It is an instruction set that was designed mainly to use a small number of machine language
instructions to perform the required computing job at a high speed.
It is used by x86 architectures
It uses a highly optimized set of instructions which are small.
It is Programmer Oriented
It is complex since it requires several clock cycles to execute instructions.
7
tabler-icon-diamond-filled.svg

Paraphrase This Document

Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
Document Page
Fewer registers thus requires less RAM.
Complex instructions thus shor program lengths
Instructions use variable formats containing several addressing modes.
Used in desktops, laptops applications as it uses a microprogrammed control unit.
Has varying formats from 16-64 bits for each instruction.
Flexible to accommodate code expansion
RISC
It is intended to give the necessary capability in an efficient manner . It entails a full set of
computer instructions. RISC,
Uses a large , complex and set of instructions.
It is machine Oriented.
Needs one clock cycle to execute instructions thus simple.
More registers thus requires more RAM.
Fixed format 32-bit
Its instructions have few fixed formats with little address modes.
Has simple instructions thus long program length
Used in applications of mobile phones and tablets the hardwired units
It is used in ARM
8
Document Page
Code expansion create problems
System Design
I will be building a calculator in assembly language.
9
Document Page
Requirements
The Calculator will have the following mathematics operations ( + )addition, (-) subtraction, (x)
multiplication, (/)division .
It should calculate any integers passed to it.
The system should have a menu that will guide the user operations
The system should allow input from the user.
The system should output the input the user has entered.
The system should send a message to the user to continue or exit the program
The objects that we will have include
A Key that will store the keys the user has entered
An Expression which will store given Expression string that will be processed
Display that will sprint out and display the entered keys as well as the calculation result
Result object that will store the results of the calculations.
10
tabler-icon-diamond-filled.svg

Paraphrase This Document

Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
Document Page
Limitation
The programme does not distinguish if the user entered a letter or number. It converts the letter
in the the equivalent ASII digit and proceeds to do the given calculation
The system does not provide the correct result when a user inputs decimal digits.
The programme does not proceed after the user does a single computation. If the user presses a
key to continue it terminates.
11
Document Page
Future Enhancement
The calculator should be able to perform other mathematical operations such as finding the
remainder, percentages, square root as well as square.
The program will be able to let the user proceed with another operation after one operation has
ended.
The program will be able to detect if a user inputs a letter in the place of a number.
12
chevron_up_icon
1 out of 25
circle_padding
hide_on_mobile
zoom_out_icon
[object Object]