TAILIEUCHUNG - Lecture Computer organization and assembly language - Lecture 16: Procedures
In this lecture, students will be able to understand: Computer organization, data representation, integer arithmetic, binary representation, floating point representation, machine instruction characteristics, instruction cycles, types of operands, pentium and power PC data types, microporessor bus structure, address, data, control buses and registers, memory organization and structure, addressing modes. | CSC 221 Computer Organization and Assembly Language Lecture 16: Procedures Lecture 15: Review Elements are only added/removed to/from the top. LIFO (Last In First Out) structure. Managed by the CPU, using two registers: SS:ESP PUSH and POP Instructions PUSH syntax: PUSH r/m16 PUSH r/m32 PUSH imm32 POP syntax: POP r/m16 POP r/m32 10 9 8 7 6 5 4 3 2 1 Top Bottom Lecture 15: Review (cont.) PUSHFD and POPFD push and pop the EFLAGS register PUSHAD pushes the 32-bit general-purpose registers on the stack order: EAX, ECX, EDX, EBX, ESP, EBP, ESI, EDI POPAD pops the same registers off the stack in reverse order PUSHA and POPA do the same for 16-bit registers Lecture Outline Defining and Using PROCEDURES Creating Procedures Documenting Procedures Example: SumOf Procedure CALL and RET Instructions Nested Procedure Calls Local and Global Labels Procedure Parameters Flowchart Symbols USES Operator Creating Procedures Large problems can be divided into smaller tasks to make them more manageable.
đang nạp các trang xem trước