Skip to content
VUBuddy

CS401 Short Notes Chapter 16

Computer Architecture and Assembly Language Programming PDF 189 KBUpdated 23 Oct 2026
Quiz CS401 Short Notes Chapter 16 PDF 189 KB
vubuddy.com
Type
Quiz
Course
CS401 Computer Architecture and Assembly Language Programming
Size
PDF 189 KB
Updated
23 Oct 2026
Free download 0 of 3 used today
Download free · 189 KB

You get 3 free files a day on the website. Add the Chrome extension for 30 a day.

Unlimited downloads in the Android app Get it free on Google Play

Preview text

Text from page 1 of 1. Download the file for all 1 page.

CS401-ASSEMBLY LANGUAGE AND PROGRAMMING CS401 CHAPTER NO 16 (LECTURE 44)

👉 Also Recommended: CS401 SHORT NOTES CHAPTER 1-7 Midterm

Short Notes Chapter 16 (Lecture 44):

Calling conventions of the language:

To interface an assembly routine with a high-level language program means to be able to call functions back and forth. And to be able to do so requires knowledge of certain behavior of the HLL when calling functions. This behavior of calling functions is called the calling conventions of the language.

Two prevalent calling conventions are:

  • the C calling convention &
  • the Pascal calling convention

What is the naming convention?

C prepends an underscore to every function or variable name while Pascal translates the name to all uppercase. C++ has a weird name mangling scheme that is compiler dependent. To avoid it C++ can be forced to use C style naming with extern “C” directive.

How are parameters passed to the routine?

In C parameters are pushed in reverse order with the rightmost being pushed first. While in Pascal they are pushed in proper order with the leftmost being pushed first.

Which registers must be preserved?

Both standards preserve EBX, ESI, EDI, EBP, ESP, DS, ES, and SS.

Which registers are used as scratch?

Both standards do not preserve or guarantee the value of EAX, ECX, EDX, FS, GS, EFLAGS, and any other registers.

Which register holds the return value?

Both C and Pascal return up to 32-bit large values in EAX and up to 64-bit large values in EDX:EAX.

Who is responsible for removing the parameters?

In C the caller removes the parameter while in Pascal the callee removes them. The C scheme has reasons pertaining to its provision for variable number of arguments.

All CS401 files →
CS401 Computer Architecture and Assembly Language Programming All CS401 handouts, past papers, quizzes and MCQs in one place. Open course page

Get more out of VUBuddy, for free

Android app Free on Google Play
  • Unlimited downloads
  • The explanation behind every MCQ answer
  • Study offline on slow data
Get the Android app
Chrome extension Free on the Chrome Web Store
  • 30 downloads a day instead of 3
  • Sign in and buy Pro Semester here
Add to Chrome

One Pro Semester membership works in both the extension and the app.