TAILIEUCHUNG - Lecture Computer organization and assembly language - Lecture 28: Macros & Win32 console programming
In this lecture, students will be able to understand: Introducing macros, defining macros, invoking macros, Windows 32 console programming, Background Information, Win32 console programs, API and SDK, windows data types, standard console handles, console input, console output. | CSC 221 Computer Organization and Assembly Language Lecture 28: Macros & Win32 Console Programming Lecture 27: Review Two Dimensional Arrays Basic Concept 2-D Array Representation Row-major: (Most Common) : Order Lecture 27: Review Base-Index Operands A base-index operand adds the values of two registers (called base and index), producing an effective address. [base + index] (cont.) .data array WORD 1000h,2000h,3000h .code mov ebx,OFFSET array mov esi,2 mov ax,[ebx+esi] ; AX = 2000h mov edi,OFFSET array mov ecx,4 mov ax,[edi+ecx] ; AX = 3000h mov ebp,OFFSET array mov esi,0 mov ax,[ebp+esi] ; AX = 1000h Lecture 27: Review Base-Index Displacement A base-index-displacement operand adds base and index registers to a constant, producing an effective address. Displacement can be the name of a variable or a constant expression. (cont.) [ base + index + displacement ] displacement [ base + index ] RowNumber = 1 ColumnNumber = 2 mov ebx,NumCols * RowNumber mov esi,ColumnNumber mov .
đang nạp các trang xem trước