TAILIEUCHUNG - Lecture Computer organization and assembly language - Lecture 14: Flow Control Instructions in Assembly Language

In this lecture, students will be able to understand: Computer organization, data representation, integer arithmetic, binary representation, Assembly language examples, control flow, JMP Instruction, LOOP Instruction, LOOP Example Summing an Integer Array. | CSC 221 Computer Organization and Assembly Language Lecture 14: Flow Control Instructions in Assembly Language Lecture 13: Review top: . . jmp top JMP Instruction JMP is an unconditional jump to a label that is usually within the same procedure. Syntax: JMP target Logic: EIP target Example: Clock Cycle Instruction Cycle Lecture 13: Review (cont.) LOOP Instruction The LOOP instruction creates a counting loop Syntax: LOOP target Logic: ECX ECX – 1 if ECX != 0, jump to target 00000000 66 B8 0000 mov ax,0 00000004 B9 00000005 mov ecx,5 00000009 66 03 C1 L1: add ax,cx 0000000C E2 FB loop L1 0000000E offset machine code source code Lecture 13: Review (cont.) Nested Loops .data count DWORD ? .code mov ecx,100 ; set outer loop count L1: mov count,ecx ; save outer loop count mov ecx,20 ; set inner loop count L2: . . loop L2 ; repeat the inner loop mov ecx,count ; restore outer loop count loop L1 ; repeat the outer loop Lecture Outline Assembly Language Examples: Control Flow JMP .

TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã 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.