Lecture Computer organization and assembly language - Lecture 09: Data Transfer, Add & SUB (Flags)

This chapter explain why computers use the binary number system, list the two main parts of the CPU and explain how they work together, list the steps that make up a machine cycle, explain the difference between RAM and ROM, list three hardware factors that affect processing speed. | CSC 221 Computer Organization and Assembly Language Lecture 09: Data Transfer, Add & SUB (Flags) Lecture 08: Review Basic Elements of Assembly Language Integer constants Integer expressions Character and string constants Reserved words and identifiers Directives and instructions Labels Mnemonics and Operands Comments Lecture 08: Review Microsoft Visual C++ Configuration for Assembly Programming Example: Adding and Subtracting Integers Lecture 08: Review (cont.) .386 INCLUDE INCLUDE INCLUDELIB INCLUDE XXXXXX .data ; (insert variables here) .code XXXYYY: ; (insert executable instructions here) invoke ExitProcess, NULL END XXXYYY Lecture Outline Data Transfer Instructions Operand Types Instruction Operand Notation Direct Memory Operands MOV Instruction Zero & Sign Extension XCHG Instruction Direct-Offset Instructions Addition and Subtraction Which Flags are affected? Data Transfer Instructions Operand Types Instruction Operand Notation Direct Memory | CSC 221 Computer Organization and Assembly Language Lecture 09: Data Transfer, Add & SUB (Flags) Lecture 08: Review Basic Elements of Assembly Language Integer constants Integer expressions Character and string constants Reserved words and identifiers Directives and instructions Labels Mnemonics and Operands Comments Lecture 08: Review Microsoft Visual C++ Configuration for Assembly Programming Example: Adding and Subtracting Integers Lecture 08: Review (cont.) .386 INCLUDE INCLUDE INCLUDELIB INCLUDE XXXXXX .data ; (insert variables here) .code XXXYYY: ; (insert executable instructions here) invoke ExitProcess, NULL END XXXYYY Lecture Outline Data Transfer Instructions Operand Types Instruction Operand Notation Direct Memory Operands MOV Instruction Zero & Sign Extension XCHG Instruction Direct-Offset Instructions Addition and Subtraction Which Flags are affected? Data Transfer Instructions Operand Types Instruction Operand Notation Direct Memory Operands MOV Instruction Zero & Sign Extension XCHG Instruction Direct-Offset Instructions Operand Types Three basic types of operands: Immediate – a constant integer (8, 16, or 32 bits) value is encoded within the instruction Register – the name of a register register name is converted to a number and encoded within the instruction Memory – reference to a location in memory memory address is encoded within the instruction, or a register holds the address of a memory location Instruction Operand Notation Direct Memory Operands A direct memory operand is a named reference to storage in memory The named reference (label) is automatically dereferenced by the assembler .data var1 BYTE 10h .code mov al,var1 ; AL = 10h mov al,[var1] ; AL = 10h alternate format MOV Instruction .data count BYTE 100 wVal WORD 2 .code mov bl,count mov ax,wVal mov count,al mov al,wVal ; error mov ax,count ; error mov eax,count ; error Move from source to destination. Syntax: MOV destination,source No more than .

Không thể tạo bản xem trước, hãy bấm tải xuống
TÀI LIỆU MỚI ĐĂNG
160    321    2    29-04-2024
24    76    1    29-04-2024
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.