Advanced Procedures COE 205 Computer Organization and Assembly
Advanced Procedures COE 205 Computer Organization and Assembly Language Computer Engineering Department King Fahd University of Petroleum and Minerals
Presentation Outline v Stack Parameters v Local Variables and Stack Frames v Simplifying the Writing of Procedures v Recursion v Creating Multi-Module Programs Advanced Procedures COE 205 – KFUPM © Muhamed Mudawar – Slide # 2
Parameter Passing - Revisited v Parameter passing in assembly language is different ² More complicated than that used in a high-level language v In assembly language ² Place all required parameters in an accessible storage area ² Then call the procedure v Two types of storage areas used ² Registers: general-purpose registers are used (register method) ² Memory: stack is used (stack method) v Two common mechanisms of parameter passing ² Pass-by-value: parameter value is passed ² Pass-by-reference: address of parameter is passed Advanced Procedures COE 205 – KFUPM © Muhamed Mudawar – Slide # 3
Stack Parameters v Consider the following max procedure int max ( int x, int y, int z ) { int temp = x; if (y > temp) temp = y; if (z > temp) temp = z; return temp; } Calling procedure: mx = max(num 1, num 2, num 3) Register Parameters mov eax, num 1 mov ebx, num 2 mov ecx, num 3 call max mov mx, eax Advanced Procedures Stack Parameters push num 3 Reverse push num 2 Order push num 1 call max mov mx, eax COE 205 – KFUPM © Muhamed Mudawar – Slide # 4
Passing Parameters on the Stack v Calling procedure pushes parameters on the stack v Procedure max receives parameters on the stack ² Parameters are pushed in reverse order ² Parameters are located relative to ESP max PROC Passing mov EAX, [ESP+4] ESP Parameters cmp EAX, [ESP+8] ESP on the stack jge @1 ESP mov EAX, [ESP+8] ESP push num 3 @1: cmp EAX, [ESP+12] push num 2 jge @2 push num 1 mov EAX, [ESP+12] call max mov mx, EAX @2: ret add ESP, 12 max ENDP Advanced Procedures COE 205 – KFUPM Stack high addr Used num 3 num 2 num 1 Return Addr ESP + 12 ESP + 8 ESP + 4 ESP Unused © Muhamed Mudawar – Slide # 5
Accessing Parameters on the Stack v When parameters are passed on the stack ² Parameter values appear after the return address v We can use ESP to access the parameter values ² [ESP+4] for num 1, [ESP+8] for num 2, and [ESP+12] for num 3 ² However, ESP might change inside procedure Stack v A better choice is to use the EBP register high addr Used ² EBP is called the base pointer ² EBP does not change during procedure ² Start by copying ESP into EBP ESP + 12 ESP + 8 ESP + 4 ESP ² Use EBP to locate parameters num 3 num 2 num 1 Return Addr Unused ² EBP must be restored when a procedure returns Advanced Procedures COE 205 – KFUPM © Muhamed Mudawar – Slide # 6
Using the Base Pointer Register v EBP is used to locate parameters on the stack v Like any other register, EBP must be saved before use max PROC push mov Passing cmp Parameters jge on the stack mov @1: cmp push num 3 jge push num 2 mov push num 1 @2: pop call max ret mov mx, EAX add ESP, 12 max ENDP Advanced Procedures EBP, ESP EAX, [EBP+8] EAX, [EBP+12] @1 EAX, [EBP+12] EAX, [EBP+16] @2 EAX, [EBP+16] EBP COE 205 – KFUPM Stack high addr ESP ESP ESP Used num 3 num 2 num 1 Return Addr Saved EBP + 16 EBP + 12 EBP + 8 EBP + 4 EBP Unused © Muhamed Mudawar – Slide # 7
Who Should Clean up the Stack? v When returning for a procedure call … ² Who should remove parameters and clean up the stack? v Clean-up can be done by the calling procedure ² add ESP, 12 ; will clean up stack v Clean-up can be done also by the called procedure ² We can specify an optional integer in the ret instruction ² ret 12 ; will return and clean up stack v Return instruction is used to clean up stack ² ret n ; n is an integer constant ² Actions taken § EIP = [ESP] § ESP = ESP + 4 + n Advanced Procedures COE 205 – KFUPM © Muhamed Mudawar – Slide # 8
Example of Cleanup Done by Return max PROC push num 3 mov num 2 mov num 1 cmp max jge mx, EAX mov No need @1: cmp for caller jge to clean up mov the stack @2: pop ret max ENDP Caller push call mov Advanced Procedures EBP, ESP EAX, [EBP+8] EAX, [EBP+12] @1 ESP EAX, [EBP+12] ESP EAX, [EBP+16] ESP @2 ESP EAX, [EBP+16] EBP 12 Clean up the stack COE 205 – KFUPM Stack high addr Used num 3 num 2 num 1 Return Addr Saved EBP + 16 EBP + 12 EBP + 8 EBP + 4 EBP Unused © Muhamed Mudawar – Slide # 9
Register versus Stack Parameters v Passing Parameters in Registers ² Pros: Convenient, easier to use, and faster to access ² Cons: Only few parameters can be passed § A small number of registers are available § Often these registers are used and need to be saved on the stack § Pushing register values on stack negates their advantage v Passing Parameters on the Stack ² Pros: Many parameters can be passed § Large data structures and arrays can be passed ² Cons: Accessing parameters is not simple § More overhead and slower access to parameters Advanced Procedures COE 205 – KFUPM © Muhamed Mudawar – Slide # 10
Next. . . v Stack Parameters v Local Variables and Stack Frames v Simplifying the Writing of Procedures v Recursion v Creating Multi-Module Programs Advanced Procedures COE 205 – KFUPM © Muhamed Mudawar – Slide # 11
Local Procedure Variables v Local procedure variables are dynamic in nature ² Come into existence when the procedure is invoked ² Disappear when the procedure terminates v Cannot reserve space for local variables in data segment ² Because such space allocation is static § Remains active even after returning from the procedure call ² Also because it does not work with recursive procedures v Local variables can be stored in registers or on the stack ² Registers are best used for local variables when. . . § Variables are small in size and frequently used (e. g. loop counter) ² Local variables are stored on the stack when … § They are large in size (e. g. arrays) or cannot fit in registers § Recursive calls are made by the procedure Advanced Procedures COE 205 – KFUPM © Muhamed Mudawar – Slide # 12
Stack Frame v For each procedure call Stack ² Caller pushes parameters on the stack high addr ² Return address is saved by CALL instruction Used ² Procedure saves EBP and sets EBP to ESP Parameters ² Local variables are allocated on the stack ² Registers are saved by the procedure EBP Local Variables v Stack Frame ² Area on the stack reserved for … § Parameters § Return address § Saved registers ESP Known also as the Activation Record Return Addr Saved EBP Saved Registers Unused § Local variables ² Designed specifically for each procedure Advanced Procedures COE 205 – KFUPM © Muhamed Mudawar – Slide # 13
Example on Local Variables v Consider the following procedure: median v To compute the median of an array of integers ² First, copy the array (to avoid modifying it) into a local array ² Second, sort the local array ² Third, find the integer value at the middle of the sorted array int median (int array[], int len) { int local[100]; // local array (100 int) for (i=0; i<len; i++) local[i] = array[i]; // Copy the array bubble. Sort(local, len); // Sort the local array return local[len/2]; // Return middle element } Advanced Procedures COE 205 – KFUPM © Muhamed Mudawar – Slide # 14
Stack Frame for Median Procedure median PROC Caller push EBP push len mov EBP, ESP push OFFSET array sub ESP, 400 call median push {regs} mov med, EAX. . . pop {regs} mov ESP, EBP sub ESP, 400 pop EBP Allocates 400 bytes ret 8 on the stack for the median ENDP local array Stack high addr ESP EBP ESP + 12 EBP ESP + 8 EBP ESP + 4 ESP EBP –ESP 400 ESP Puts a limit on the maximum array length = 100 int Used len array addr Return Addr Saved EBP Local Array 100 DWORD Saved Registers Unused [EBP – 400] is the address of local array on the stack Advanced Procedures COE 205 – KFUPM © Muhamed Mudawar – Slide # 15
Median Procedure – slide 1 of 2 median push mov sub push mov lea L 1: mov add loop Advanced Procedures PROC EBP, ESP, ECX ESI EDI ECX, ESI, EDI, Stack ESP 400 ; save EBP ; EBP = ESP ; local array Save Regs [EBP+12] ; len [EBP+8] ; array addr [EBP-400]; local addr EAX, [ESI] [EDI], EAX ESI, 4 EDI, 4 L 1 high addr Used EBP + 12 EBP + 8 EBP + 4 ESP EBP – 400 ESP Copy array COE 205 – KFUPM len array addr Return Addr Saved EBP Local Array 100 DWORD Saved Registers Unused © Muhamed Mudawar – Slide # 16
Median Procedure – slide 2 of 2 ; Call sort procedure to sort local array ; Parameters are passed on the stack push DWORD PTR [EBP+12] lea EDI, [EBP-400] EBP + 12 push EDI ; local array address EBP + 8 call sort ; sort local array EBP + 4 ESP EBP mov ESI, [EBP+12] ; len shr ESI, 1 ; ESI = len/2 mov EAX, [EDI+ESI*4] ; local[len/2] pop EDI EBP – 400 pop ESI Restore Regs pop ECX ESP mov ESP, EBP ; free local pop EBP ; restore EBP ret 8 ; return & cleanup median ENDP Advanced Procedures COE 205 – KFUPM Stack high addr Used len array addr Return Addr Saved EBP Local Array 100 DWORD Saved Registers Unused © Muhamed Mudawar – Slide # 17
Next. . . v Stack Parameters v Local Variables and Stack Frames v Simplifying the Writing of Procedures v Recursion v Creating Multi-Module Programs Advanced Procedures COE 205 – KFUPM © Muhamed Mudawar – Slide # 18
Simplifying the Writing of Procedures v PROC directive ² Specifies registers to be saved and restored ² Specifies parameters MASM provides useful directives to simplify the writing of procedures v LOCAL directive ² Declares local variables v PROTO directive ² Specifies procedure prototypes v INVOKE directive ² Simplifies procedure calls Advanced Procedures COE 205 – KFUPM © Muhamed Mudawar – Slide # 19
PROC Directive v Declares a procedure with an optional list of parameters v Syntax: proc. Name PROC [USES reglist], param. List v param. List is list of parameters separated by commas param 1: type 1, param 2: type 2, . . . v Each parameter has the following syntax param. Name: type v type must either be one of the standard ASM types BYTE, SBYTE, WORD, SWORD, DWORD, … etc. Or it can be a pointer to one of these types Advanced Procedures COE 205 – KFUPM © Muhamed Mudawar – Slide # 20
PROC Example v Swap Procedure: exchanges two 32 -bit integer variables v Two stack parameters: ptr 1 and ptr 2 swap PROC USES esi edi , parameter ptr 1: PTR DWORD, list ptr 2: PTR DWORD mov esi, ptr 1 mov edi, ptr 2 push DWORD PTR pop DWORD PTR ret swap ENDP Advanced Procedures comma is required ; pointer to 1 st integer ; pointer to 2 nd integer ; get pointers [esi] [edi] ; ; COE 205 – KFUPM push first integer push second integer replace first integer replace second integer © Muhamed Mudawar – Slide # 21
MASM Generates the Following Code swap PROC USES esi edi, ptr 1: PTR DWORD, ptr 2: PTR DWORD mov esi, ptr 1 mov edi, ptr 2 push DWORD PTR pop DWORD PTR ret swap ENDP Advanced Procedures [esi] [edi] swap PROC push ebp mov ebp, esp push esi USES esi edi push edi mov esi, [EBP+8] ; ptr 1 mov edi, [EBP+12] ; ptr 2 push DWORD PTR [esi] push DWORD PTR [edi] pop DWORD PTR [esi] pop DWORD PTR [edi] pop edi USES esi edi pop esi leave ret 8 swap ENDP COE 205 – KFUPM © Muhamed Mudawar – Slide # 22
ENTER and LEAVE Instructions v ENTER instruction creates stack frame for a procedure ² Pushes EBP on the stack push ebp ² Sets EBP to the base of the stack frame mov ebp, esp ² Reserves space for local variables esp, nbytes sub v Example: myproc PROC enter 8, 0 nbytes is equivalent to level push ebp mov ebp, esp sub esp, 8 v LEAVE instruction is equivalent to mov esp, ebp pop ebp Advanced Procedures COE 205 – KFUPM © Muhamed Mudawar – Slide # 23
Language Specifier v. MODEL directive ² Specifies program's memory model and language specifier. MODEL Memory. Model [, Model. Options] v Example: . MODEL flat, stdcall v Language specifier specifies ² Procedure naming scheme ² Parameter passing conventions ² Options: STDCALL, C, FORTRAN, SYSCALL, etc. v We are using the STDCALL language specifier ² Procedure arguments are pushed on stack in reverse order ² Called procedure cleans up the stack Advanced Procedures COE 205 – KFUPM © Muhamed Mudawar – Slide # 24
LOCAL Directive v The LOCAL directive declares a list of local variables ² Immediately follows the PROC directive ² Each variable is assigned a type ² Syntax: LOCAL varlist v Syntax: LOCAL var 1: type 1, var 2: type 2, . . . v Example: myproc PROC LOCAL var 1: DWORD, ; var 1 is a DWORD var 2: WORD, ; var 2 is a WORD var 3[20]: BYTE Advanced Procedures ; array of 20 bytes COE 205 – KFUPM © Muhamed Mudawar – Slide # 25
LOCAL Example v Given myprocedure v MASM generates: myproc PROC push ebp mov ebp, esp add esp, -28 mov eax, [EBP-4] mov bx, [EBP-6] mov dl, [EBP-26]. . . leave ret myproc ENDP myproc PROC LOCAL var 1: DWORD, var 2: WORD, var 3[20]: BYTE mov eax, var 1 mov bx, var 2 mov dl, var 3. . . ret myproc ENDP Advanced Procedures COE 205 – KFUPM © Muhamed Mudawar – Slide # 26
More on Local Variables v Local variables can be of different sizes v Created on the stack by the LOCAL directive: ² 8 -bit: assigned to next available byte ² 16 -bit: assigned to next even (word) boundary ² 32 -bit: assigned to next doubleword boundary Stack high addr Example PROC Used LOCAL v 1: BYTE, EBP + 4 ESP EBP – 1 EBP – 8 EBP – 10 v 2: DWORD, v 3: WORD. . . Unused Example ENDP Advanced Procedures Return Addr Saved EBP v 1 v 2 v 3 COE 205 – KFUPM © Muhamed Mudawar – Slide # 27
PROTO Directive v Creates a procedure prototype v Syntax: proc. Name PROTO param. List v Uses the same parameter list that appears in procedure v Prototypes are required for … ² Procedures called by INVOKE ² Calling external procedures v Standard configuration: ² PROTO appears at top of the program listing ² Procedure implementation occurs later in the program Advanced Procedures COE 205 – KFUPM © Muhamed Mudawar – Slide # 28
PROTO Examples v Prototype for the Array. Sum procedure: Array. Sum PROTO, array. Ptr: PTR DWORD, pointer array. Len: DWORD ; array length v Prototype for the swap procedure: swap PROTO, ptr 1: PTR DWORD, ; 1 st int pointer ptr 2: PTR DWORD ; 2 nd int pointer Advanced Procedures COE 205 – KFUPM © Muhamed Mudawar – Slide # 29
INVOKE Directive v INVOKE is a powerful replacement for CALL instruction v Lets you pass multiple arguments v Syntax: INVOKE proc. Name param. List v Param. List is an optional list of procedure arguments v MASM requires that every procedure called by the INVOKE directive to have a prototype v Arguments can be: ² Immediate values and integer expressions ² Variable names ² Addresses ² Register names Advanced Procedures COE 205 – KFUPM © Muhamed Mudawar – Slide # 30
INVOKE Examples v Consider the following procedure prototypes: Array. Sum PROTO, array. Ptr: PTR DWORD, array. Len: DWORD swap PROTO, ptr 1: PTR DWORD, ptr 2: PTR DWORD v We can use INVOKE to call these procedures: INVOKE Array. Sum, ADDR array, ecx MASM Generates push ecx push OFFSET array call Array. Sum ADDR is the Address operator INVOKE swap, ADDR var 1, esi Advanced Procedures COE 205 – KFUPM MASM Generates push esi push OFFSET var 1 call swap © Muhamed Mudawar – Slide # 31
Rewriting the Median Procedure - 1 median PROC USES ECX ESI EDI, MASM Generates arrayptr: PTR SDWORD, push EBP len: DWORD mov EBP, ESP sub ESP, 400 local sorted[100]: SDWORD push ECX push ESI push EDI mov ECX, len mov ECX, [EBP+12] mov ESI, arrayptr mov ESI, [EBP+8] lea EDI, sorted lea EDI, [EBP-400] L 1: mov EAX, [ESI] mov [EDI], EAX Copy add ESI, 4 Array add EDI, 4 loop L 1 Advanced Procedures COE 205 – KFUPM © Muhamed Mudawar – Slide # 32
Rewriting the Median Procedure - 2 ; Call sort procedure lea EDI, sorted INVOKE sort, edi, len mov shr mov ESI, len ESI, 1 EAX, [EDI+ESI*4] ret median ENDP Advanced Procedures MASM Generates lea EDI, [EBP-400] push [EBP+12] push EDI call sort mov ESI, [EBP+12] shr ESI, 1 mov EAX, [EDI+ESI*4] pop EDI pop ESI pop ECX leave ret 8 median ENDP COE 205 – KFUPM © Muhamed Mudawar – Slide # 33
More on LEA Instruction v LEA returns address of both direct and indirect operands ² Used for obtaining address of a stack parameter or local variable v OFFSET operator can only return constant offsets ² Offsets of global variables declared in the data segment v Example: example PROC, count: DWORD LOCAL temp[20]: BYTE mov lea Advanced Procedures edi, esi, OFFSET count OFFSET temp count temp COE 205 – KFUPM ; ; invalid operand ok ok © Muhamed Mudawar – Slide # 34
Next. . . v Stack Parameters v Local Variables and Stack Frames v Simplifying the Writing of Procedures v Recursion v Creating Multi-Module Programs Advanced Procedures COE 205 – KFUPM © Muhamed Mudawar – Slide # 35
What is Recursion? v The process created when. . . ² A procedure calls itself ² Procedure A calls procedure B, which in turn calls procedure A v Using a graph in which each node is a procedure and each edge is a procedure call, recursion forms a cycle Advanced Procedures COE 205 – KFUPM © Muhamed Mudawar – Slide # 36
Calculating Factorial (1 of 3) This function calculates the factorial of integer n A new value of n is saved in each stack frame int factorial(int n) { if(n == 0) return 1; else return n * factorial(n-1); } As each call instance returns, the product it returns is multiplied by the previous value of n Advanced Procedures COE 205 – KFUPM © Muhamed Mudawar – Slide # 37
Calculating Factorial (2 of 3) Factorial PROC push ebp mov ebp, esp mov eax, [ebp+8] cmp eax, 0 ja L 1 mov eax, 1 jmp L 2 L 1: dec eax push eax call Factorial Return. Fact: mov ebx, [ebp+8] mul ebx L 2: pop ebp ret 4 Factorial ENDP Advanced Procedures ; ; eax = n n > 0? yes: continue no: return 1 ; Factorial(n-1) ; ; get n eax = eax * ebx return EAX clean up stack COE 205 – KFUPM © Muhamed Mudawar – Slide # 38
Calculating Factorial (3 of 3) Suppose we want to calculate 12! This diagram shows the first few stack frames created by recursive calls to Factorial Each recursive call uses 12 bytes of stack space for: parameter n return address saved ebp Advanced Procedures COE 205 – KFUPM © Muhamed Mudawar – Slide # 39
Next. . . v Stack Parameters v Local Variables and Stack Frames v Simplifying the Writing of Procedures v Recursion v Creating Multi-Module Programs Advanced Procedures COE 205 – KFUPM © Muhamed Mudawar – Slide # 40
Multi-Module Programs v Large ASM files are hard to manage v You can divide a program into multiple modules ² Each module is a separate ASM file ² Each module is assembled into a separate OBJ file v The linker combines all OBJ files into a single EXE file ² This process is called static linking ² You can also link OBJ files with one or more libraries v Advantages: ² A module can be a container for logically related code and data ² Separate modules are easier to write, maintain, and debug ² Modules can be reused in different programs if written properly v PROTO and INVOKE simplify external procedure calls Advanced Procedures COE 205 – KFUPM © Muhamed Mudawar – Slide # 41
Creating a Multi-Module Program v Steps to follow when creating a multi-module program ² Create the main module ² Create a separate module for each set of related procedures ² Create an include file that contains procedure prototypes for external procedures (ones that are called between modules) ² Use the INCLUDE directive to make your procedure prototypes available to each module Advanced Procedures COE 205 – KFUPM © Muhamed Mudawar – Slide # 42
Example: Array. Sum Program v Let's review the Array. Sum program Each of the four white rectangles will be a module Advanced Procedures COE 205 – KFUPM © Muhamed Mudawar – Slide # 43
Main Module TITLE Array Summation Main Module INCLUDE sum. inc Count = 5 (main. asm) ; modify count to change array length . data prompt 1 BYTE "Enter a signed integer: ", 0 prompt 2 BYTE "The sum of the integers is: ", 0 array DWORD Count DUP(? ). code main PROC call INVOKE call INVOKE main ENDP END main Advanced Procedures Clrscr Read. Array, ADDR prompt 1, ADDR array, Count Array. Sum, ADDR array, Count Display. Sum, ADDR prompt 2, eax Crlf Exit. Process, 0 COE 205 – KFUPM © Muhamed Mudawar – Slide # 44
INCLUDE File ; Include file for the Array. Sum Program (sum. inc) . 686. MODEL FLAT, STDCALL. STACK INCLUDE Irvine 32. inc Read. Array PROTO, ptr. Prompt: PTR BYTE, ptr. Array: PTR DWORD, array. Size: DWORD ; prompt string ; points to the array ; size of the array Array. Sum PROTO, ptr. Array: PTR DWORD, count: DWORD ; points to the array ; size of the array Display. Sum PROTO, ptr. Prompt: PTR BYTE, the. Sum: DWORD ; prompt string ; sum of the array Advanced Procedures COE 205 – KFUPM © Muhamed Mudawar – Slide # 45
Read Array Module TITLE Read Array Module INCLUDE sum. inc (read. Array. asm) . code Read. Array PROC USES ecx edx esi, prompt: PTR BYTE, array: PTR DWORD, arraysize: DWORD mov mov L 1: call mov add loop ecx, arraysize edx, prompt esi, array ; prompt address ; array address Write. String Read. Int Crlf [esi], eax esi, 4 L 1 ; ; ; display string read integer into EAX go to next output line store in array next integer ret Read. Array ENDP END Advanced Procedures COE 205 – KFUPM © Muhamed Mudawar – Slide # 46
Array Sum Module TITLE Array. Sum Module INCLUDE sum. inc (Arraysum. asm) . code Array. Sum PROC USES ecx esi, ptr. Array: PTR DWORD, array. Size: DWORD mov mov cmp jle L 1: eax, esi, ecx, L 2 0 ptr. Array array. Size 0 add eax, [esi] add esi, 4 loop L 1 L 2: ret Array. Sum ENDP END Advanced Procedures ; pointer to array ; size of array ; set the sum to zero ; array size <= 0? ; yes: quit ; ; add each integer to sum point to next integer repeat for array size return sum in EAX COE 205 – KFUPM © Muhamed Mudawar – Slide # 47
Display Sum Module TITLE Display Sum Module (display. Sum. asm) INCLUDE Sum. inc. code Display. Sum PROC USES eax edx, ptr. Prompt: PTR BYTE, the. Sum: DWORD mov call edx, ptr. Prompt Write. String eax, the. Sum Write. Int Crlf ; prompt string ; the array sum ; pointer to prompt ; display EAX ret Display. Sum ENDP END Advanced Procedures COE 205 – KFUPM © Muhamed Mudawar – Slide # 48
Custom Batch File REM make. Array. Sum. bat REM Batch file Customized for the Array Sum program @echo off cls REM assembling ASM source modules into OBJ files ML -Zi -c -Fl -coff main. asm display. Sum. asm array. Sum. asm read. Array. asm if errorlevel 1 goto terminate REM linking object (OBJ) files to produce executable file LINK 32 main. obj display. Sum. obj array. Sum. obj read. Array. obj irvine 32. lib kernel 32. lib /OUT: array. Sum. exe /SUBSYSTEM: CONSOLE /DEBUG : terminate pause Advanced Procedures COE 205 – KFUPM © Muhamed Mudawar – Slide # 49
Summary v Stack parameters ² More convenient than register parameters ² Passed by value or by reference ² ENTER and LEAVE instructions v Local variables ² Created on the stack by decreasing the stack pointer v MASM procedure-related directives ² PROC, USES, LOCAL, PROTO, and INVOKE ² Calling conventions (STDCALL, C) v Recursive procedure calls v Multi-Module Programs and Custom Make Advanced Procedures COE 205 – KFUPM © Muhamed Mudawar – Slide # 50
- Slides: 50