Assembly Language Programming By Ytha Yu, Charles Marut Chap 1(Microcomputer Systems)
This document discusses computer languages and microprocessor-based systems. It describes how machine language uses binary instructions to directly control a processor's circuitry. Assembly language and high-level languages were developed to bridge the gap between machine language and what is convenient for humans. Assembly language uses symbolic names for operations and memory locations and converts to machine language via an assembler. High-level languages like Pascal and COBOL use expressions and symbols from English and convert to machine language via a compiler. Advantages of assembly language include better performance and access to hardware for some applications where speed and size are critical.
• Difficult andtedious for people to use because of simplicity • A large gap between what is convenient for People and what for computers • People want to do X but computers limitation is only to Y
6.
Machine Language Ex. 10100001 0000000000000000 00000101 00000100 00000000 10100011 00000000 00000000 Collection of binary numbers Assembly Language Computer languages Assembly Language High-Level Language Ex. MOV AX,A ADD AX,4 MOV A,AX Ex. A = A + 4 Combines algebraic language (I.e. symbolic names are used to represent operations, registers & memory locations expressions & symbols taken from English language (ex. Pascal, COBOL FORTRAN, …etc)
7.
Computer languages (Continue) Notstandard (I.e. different Not standard (I.e. different Standard (I.e. programs are machine language for assembly language for independent of the machine every type of machine every type of machine) on which they will be executed) Machine Language Assembly Language High-Level Language Directly understood by a Assembler Compiler (or interpreter) computer converts to machine converts to machine language language 1 assembly language 1 HLL instruction = many instruction = 1 machine machine language language instruction instructions
8.
Advantages of AssemblyLanguage • Performance: • A well-written Assembly language program produces a faster, shorter machine language program. For Some applications speed and size is critical • Access to hardware: •Some operations, such as reading or writing to specific memory locations & I/O ports can be done easily in Assembly but may be impossible by a higher level language. • Studying ASM language gain a feeling of the way the computer thinks and the way things happen inside the computer.