100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached 4.6 TrustPilot
logo-home
Exam (elaborations)

COS2621 EXAM PACK

Rating
-
Sold
-
Pages
229
Grade
A+
Uploaded on
06-10-2023
Written in
2023/2024

COS2621 EXAM PACK. Detailed working, solutions, memo, notes & explanations.

Institution
Course

Content preview

COS2621
EXAM PACK

,COS2621 2018 MEMO

1.1

1.2 2

1.3 1

1.4 5

1.5 1

1.6 4

1.7 5

1.8 3

1.9 5

1.10 3

1.11 1

1.12 4

1.13 1

1.14 1

1.15 3

,mov ax,2h //2 cycles to execute + 4 cycles to fetch
mov bx,3h //2 cycles to execute + 4 cycles to fetch
mul bx //5 cycles to execute + 4 cycles to fetch
add ax,bx //4 cycles to execute + 4 cycles to fetch
Total cycles = 29 cycles which requires 29 x 0.00125 μsec = 0.03625 μsec




Disadvantages
1. Development time. Writing code in assembly language takes much longer than

, writing in a high-level language.
2. Reliability and security. It is easy to make errors in assembly code. The assembler is not
checking if the calling conventions and register save conventions are obeyed.
3. Debugging and verifying. Assembly code is more difficult to debug and verify because there
are more possibilities for errors than in high-level code.
4. Maintainability. Assembly code is more difficult to modify and maintain because the
language allows unstructured spaghetti code and all kinds of tricks that are difficult for others to
understand. Thorough documentation and a consistent programming style are needed.
5. Portability. Assembly code is platform-specific. Porting to a different platform is difficult.




1. Debugging and verifying. Looking at compiler-generated assembly code or the disassembly
window in a debugger is useful for finding errors and for checking how well a compiler
optimizes a particular piece of code.
2. Making compilers. Understanding assembly coding techniques is necessary for making
compilers, debuggers and other development tools.
3. Embedded systems. Small embedded systems have fewer resources than PCs
and mainframes. Assembly programming can be necessary for optimizing code for speed or size
in small embedded systems.
4. Hardware drivers and system code. Accessing hardware, system control registers,
and so on may sometimes be difficult or impossible with high level code.


5. Accessing instructions that are not accessible from high-level language.
Certain assembly instructions have no high-level language equivalent.


6. Self-modifying code. Self-modifying code is generally not profitable because it

Written for

Institution
Course

Document information

Uploaded on
October 6, 2023
Number of pages
229
Written in
2023/2024
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

Get to know the seller

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
ExellentStudyResources Chamberlain College Of Nursing
Follow You need to be logged in order to follow users or courses
Sold
1095
Member since
4 year
Number of followers
917
Documents
2077
Last sold
1 week ago

3.6

148 reviews

5
66
4
19
3
31
2
4
1
28

Trending documents

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Frequently asked questions