100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached
logo-home
COS2633 EXAM PACK 2023 R44,76   Add to cart

Exam (elaborations)

COS2633 EXAM PACK 2023

 4 views  0 purchase

COS2633 EXAM PACK 2023

Preview 4 out of 229  pages

  • August 25, 2023
  • 229
  • 2023/2024
  • Exam (elaborations)
  • Questions & answers
All documents for this subject (15)
avatar-seller
Diana2024
ADMIN
[COMPANY NAME]

,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

The benefits of buying summaries with Stuvia:

Guaranteed quality through customer reviews

Guaranteed quality through customer reviews

Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.

Quick and easy check-out

Quick and easy check-out

You can quickly pay through EFT, credit card or Stuvia-credit for the summaries. There is no membership needed.

Focus on what matters

Focus on what matters

Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!

Frequently asked questions

What do I get when I buy this document?

You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.

Satisfaction guarantee: how does it work?

Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.

Who am I buying this summary from?

Stuvia is a marketplace, so you are not buying this document from us, but from seller Diana2024. Stuvia facilitates payment to the seller.

Will I be stuck with a subscription?

No, you only buy this summary for R44,76. You're not tied to anything after your purchase.

Can Stuvia be trusted?

4.6 stars on Google & Trustpilot (+1000 reviews)

82871 documents were sold in the last 30 days

Founded in 2010, the go-to place to buy summaries for 14 years now

Start selling
R44,76
  • (0)
  Buy now