Lecture Microcomputer principles and applications - Chapter 3: Assembly language programming

Contents: Introduction to Assembly, Instruction Cycle, Addressing Modes | Chapter 3 Assembly language programming Introduction to Assembly High level vs. Assembly High level languages • More programmer friendly. • More ISA independent. • Each high-level statement translates to several instructions in the ISA of the computer. Assembly language • Lower level, closer to ISA. • Very ISA-dependent. • Each instruction specifies a single ISA instruction. • Makes low level programming more user friendly. • More efficient code. Microcomputer principles and applications Introduction to Assembly Assembler syntax {label[:]} mnemonic {operand list} {;comment} • Symbols: ⋄ ⋄ ⋄ • Used as labels, constants, and substitution values and stored in a symbol table. A symbol name is a string of up to 200 alphanumeric characters (A-Z, a-z, 0-9, $, and _), cannot contain embedded blanks, is case sensitive. The first character cannot be a number. Labels: ⋄ Labels are symbols. Microcomputer principles and applications Introduction to Assembly Assembler syntax {label[:]} mnemonic {operand list} {;comment} • Labels: ⋄ ⋄ ⋄ ⋄ • Begined in column 1 and is optionally followed by a colon. The value of a label is the current value of the Location Counter (address within program). A label on a line by itself is a valid statement. Labels used locally within a file must be unique. Mnemonics: ⋄ Cannot start in column 1. If it does, it is interpreted as a label. Microcomputer principles and applications Introduction to Assembly Assembler syntax {label[:]} mnemonic {operand list} {;comment} • Mnemonics: ⋄ ⋄ ⋄ • Contains one of the following items: Instruction, Assembler directive, Macro directive, Macro invocation. A label on a line by itself is a valid statement. Labels used locally within a file must be unique. Operands: ⋄ ⋄ ⋄ Contains one or more operands. An operand may consist of: symbols, constants, expressions. Operands are separated with commas. Microcomputer principles and .

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
Đã 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.