[null, null, {"document_url": "http://slideplayer.com/slide/273965/", "unformatted_src": "/13/3835832/big_thumb.jpg", "src": "https://slideplayer.com/13/3835832/big_thumb.jpg", "formatted_filename": "big thumb", "alt_text": "The Assembly Language Level"}, null, {"document_url": "http://slideplayer.com/slide/273965/", "unformatted_src": "/37/10706184/big_thumb.jpg", "src": "https://slideplayer.com/37/10706184/big_thumb.jpg", "formatted_filename": "big thumb", "alt_text": "Recap \u2013 Our First Computer WR System Bus 8 ALU Carry output A B S C OUT F 8 8 To registers\u2019 read/write and clock inputs Sequence of control signal combinations."}, null, {"document_url": "http://slideplayer.com/slide/273965/", "unformatted_src": "/16/5141487/big_thumb.jpg", "src": "https://slideplayer.com/16/5141487/big_thumb.jpg", "formatted_filename": "big thumb", "alt_text": "Recap \u2013 Our First Computer WR System Bus 8 ALU Carry output A B S C OUT F 8 8 To registers\u2019 input/output and clock inputs Sequence of control signal combinations."}, null, {"document_url": "http://slideplayer.com/slide/273965/", "unformatted_src": "/33/8205628/big_thumb.jpg", "src": "https://slideplayer.com/33/8205628/big_thumb.jpg", "formatted_filename": "big thumb", "alt_text": "Assembly Language A Brief Introduction. Unit Learning Goals CPU architecture. Basic Assembler Commands High level Programming \uf0e0 Assembler \uf0e0 Machine Language."}, null, {"document_url": "http://slideplayer.com/slide/273965/", "unformatted_src": "/18/6131846/big_thumb.jpg", "src": "https://slideplayer.com/18/6131846/big_thumb.jpg", "formatted_filename": "big thumb", "alt_text": "Chapter 2 Software Tools and Assembly Language Syntax."}, null, {"document_url": "http://slideplayer.com/slide/273965/", "unformatted_src": "/26/8584570/big_thumb.jpg", "src": "https://slideplayer.com/26/8584570/big_thumb.jpg", "formatted_filename": "big thumb", "alt_text": "UHD:CS2401: A. Berrached1 The Intel x86 Hardware Organization."}, null, {"document_url": "http://slideplayer.com/slide/273965/", "unformatted_src": "/31/9727884/big_thumb.jpg", "src": "https://slideplayer.com/31/9727884/big_thumb.jpg", "formatted_filename": "big thumb", "alt_text": "Processor Fundamentals Assembly Language. Learning Objectives Show understanding of the relationship between assembly language and machine code, including."}, null, {"document_url": "http://slideplayer.com/slide/273965/", "unformatted_src": "/1/273964/big_thumb.jpg", "src": "https://slideplayer.com/1/273964/big_thumb.jpg", "formatted_filename": "big thumb", "alt_text": "Intel 8086."}, null, {"document_url": "http://slideplayer.com/slide/273965/", "unformatted_src": "/12/3422617/big_thumb.jpg", "src": "https://slideplayer.com/12/3422617/big_thumb.jpg", "formatted_filename": "big thumb", "alt_text": "1 COMS 361 Computer Organization Title: Instructions Date: 9/28/2004 Lecture Number: 10."}, null, {"document_url": "http://slideplayer.com/slide/273965/", "unformatted_src": "/35/10409361/big_thumb.jpg", "src": "https://slideplayer.com/35/10409361/big_thumb.jpg", "formatted_filename": "big thumb", "alt_text": "Winter 2016CISC101 - Prof. McLeod1 Today Numeric representation (or \u201cHow does binary and hexadecimal work?\u201d). How can a CPU understand instructions written."}, null, {"document_url": "http://slideplayer.com/slide/273965/", "unformatted_src": "/30/9503167/big_thumb.jpg", "src": "https://slideplayer.com/30/9503167/big_thumb.jpg", "formatted_filename": "big thumb", "alt_text": "Question What technology differentiates the different stages a computer had gone through from generation 1 to present?"}, null, {"document_url": "http://slideplayer.com/slide/273965/", "unformatted_src": "/24/7275878/big_thumb.jpg", "src": "https://slideplayer.com/24/7275878/big_thumb.jpg", "formatted_filename": "big thumb", "alt_text": "Chapter 3 Elements of Assembly Language. 3.1 Assembly Language Statements."}, null, {"document_url": "http://slideplayer.com/slide/273965/", "unformatted_src": "/15/4552508/big_thumb.jpg", "src": "https://slideplayer.com/15/4552508/big_thumb.jpg", "formatted_filename": "big thumb", "alt_text": "The CPU Revision Typical machine code instructions Using op-codes and operands Symbolic addressing. Conditional and unconditional branches."}, null, {"document_url": "http://slideplayer.com/slide/273965/", "unformatted_src": "/25/7820662/big_thumb.jpg", "src": "https://slideplayer.com/25/7820662/big_thumb.jpg", "formatted_filename": "big thumb", "alt_text": "INSTRUCTION SET AND ASSEMBLY LANGUAGE PROGRAMMING"}, null, {"document_url": "http://slideplayer.com/slide/273965/", "unformatted_src": "/36/10662541/big_thumb.jpg", "src": "https://slideplayer.com/36/10662541/big_thumb.jpg", "formatted_filename": "big thumb", "alt_text": "CC410: System Programming Dr. Manal Helal \u2013 Fall 2014 \u2013 Lecture 4 - Assembler 1."}, null, {"document_url": "http://slideplayer.com/slide/273965/", "unformatted_src": "/26/8881630/big_thumb.jpg", "src": "https://slideplayer.com/26/8881630/big_thumb.jpg", "formatted_filename": "big thumb", "alt_text": "Represents different voltage levels High: 5 Volts Low: 0 Volts At this raw level a digital computer is instructed to carry out instructions."}, null, {"document_url": "http://slideplayer.com/slide/273965/", "unformatted_src": "/24/7275805/big_thumb.jpg", "src": "https://slideplayer.com/24/7275805/big_thumb.jpg", "formatted_filename": "big thumb", "alt_text": "1/2002JNM1 Basic Elements of Assembly Language Integer Constants \u2013If no radix is given, the integer is assumed to be decimal. Int 21h \uf0b9 Int 21 \u2013A hexadecimal."}, null, {"document_url": "http://slideplayer.com/slide/273965/", "unformatted_src": "/16/5263833/big_thumb.jpg", "src": "https://slideplayer.com/16/5263833/big_thumb.jpg", "formatted_filename": "big thumb", "alt_text": "8051 ASSEMBLY LANGUAGE PROGRAMMING"}, null, {"document_url": "http://slideplayer.com/slide/273965/", "unformatted_src": "/24/7275922/big_thumb.jpg", "src": "https://slideplayer.com/24/7275922/big_thumb.jpg", "formatted_filename": "big thumb", "alt_text": "Machine Instruction Characteristics"}, null, {"document_url": "http://slideplayer.com/slide/273965/", "unformatted_src": "/16/5006999/big_thumb.jpg", "src": "https://slideplayer.com/16/5006999/big_thumb.jpg", "formatted_filename": "big thumb", "alt_text": "TK 2633 Microprocessor & Interfacing Lecture 3: Introduction to 8085 Assembly Language Programming (2) 1 Prepared By: Associate Prof. Dr Masri Ayob."}, null, null]
Assembly Language – 1.

Published byChristopher Carroll Modified over 3 years ago


Presentation on theme: "Assembly Language – 1."— Presentation transcript:

1 Assembly Language – 1

2 1. Machine Language This is what the computer actually sees and deals with. Every command the computer sees is given as a number or sequence of numbers. 2. Assembly Language This is the same as machine language, except the command numbers have been replaced by letter sequences which are easier to memorize. Other small things are done to make it easier as well. 3. High-Level Language They are there to make programming easier. Assembly language requires you to work with the machine itself. High-level languages allow you to describe the program in a more natural language. A single command in a high-level language usually is equivalent to several commands in an assembly language.

3 To study… - SELF-study Syntax Variables
Basic data movements and arithmetic instructions Program organization – comprising code, data & stack Assembly lang prog MUST be converted to a machine lang prog before it can be executed  by an assembler

4 1. Syntax Assembly lang – low-level programming language
An assembly language is specific to a certain computer architecture, in contrast to most high-level programming languages, which generally are portable to multiple systems.

5 Assembler Assembly language programs are converted into executable machine code by a utility program referred to as an assembler, the conversion process being referred to as assembly or assembling the program. Assembler  Microsoft Macro Assembler [MASM]

6 Assembly lang A program written in assembly language consists of a series of (mnemonic) processor instructions and meta-statements (known variously as directives, pseudo-instructions and pseudo-ops), comments and data. Assembly lang. instructions usually consist of  an opcode mnemonic  followed by a list of data, arguments or parameters. These are translated by an assembler into machine language instructions that can be loaded into memory and executed.

7 name operation operand(s) ;comment
START: MOV CX, 5 ;যা ইচ্ছা লিখ! ‘;’ দিও!

8 Example The instruction that tells an x86 processor to move an immediate 8-bit value into a register. The binary code for this instruction: 10110 followed by a 3-bit identifier for which register to use. The identifier for the AL register is 000, so the following machine code loads the AL register with the data

9 MOV AL, 61h ; Load AL with 97 decimal (61 hex)
Instruction AL data B Instruction AL data In HEX  Intel assembly language provides the mnemonic MOV (an abbreviation of move) for instructions such as this so the machine code above can be written as follows in assembly language, complete with an explanatory comment if required, after the semicolon. MOV AL, 61h ; Load AL with 97 decimal (61 hex)

10 while 10110001 (B1) moves it into CL 0110010 (B2) does so into DL.
The Intel opcode (B0) copies an 8-bit value into the AL register, while (B1) moves it into CL (B2) does so into DL. MOV AL, 1h ; Load AL with immediate value 1 MOV CL, 5h ; Load AL with immediate value 5 MOV DL, 3h ; Load AL with immediate value 3

11 The reverse can at least partially be achieved by a disassembler.
MOV EAX, [EBX] ; Move the 4 bytes in memory at the address contained in EBX into EAX MOV [ESI+EAX], CL ; Move the contents of CL into the byte at address ESI+EAX Transforming assembly language into machine code is the job of an assembler, and The reverse can at least partially be achieved by a disassembler.

12 Each computer architecture has its own machine language.
Computers differ in the number and type of operations they support, in the different sizes and numbers of registers, and in the representations of data in storage. While most general-purpose computers are able to carry out essentially the same functionality, the ways they do so differ; the corresponding assembly languages reflect these differences.

13 .section .data Anything starting with a period isn’t directly translated into a machine instruction. Instead, it’s an instruction to the assembler itself. These are called assembler directives or pseudo-operations because they are handled by the assembler and are not actually run by the computer. The .section command breaks your program up into sections. This command starts the data section, where you list any memory storage you will need for data

14 .section .text which starts the text section. The text section of a program is where the program instructions live.

16 _start: It defines the value of the _start label. A label is a symbol followed by a colon. Labels define a symbol’s value. When the assembler is assembling the program, it has to assign each data value and instruction an address. Labels tell the assembler to make the symbol’s value be wherever the next instruction or data element will be. This way, if the actual physical location of the data or instruction changes, you don’t have to rewrite any references to it - the symbol automatically gets the new value.

17 Next is instruction! MOV ADD .

18 Just a recap – Imp – on 8086 processor

19 8086 Internal Configuration

20 Simplified block diagram over Intel 8088 (a variant of 8086); 1=main registers; 2=segment registers and IP; 3=address adder; 4=internal address bus; 5=instruction queue; 6=control unit (very simplified!); 7=bus interface; 8=internal data bus; 9=ALU; 10/11/12=external address/data/control bus


Download ppt "Assembly Language – 1."
 The Assembly Language Level Recap – Our First Computer WR System Bus 8 ALU Carry output A B S C OUT F 8 8 To registers’ read/write and clock inputs Sequence of control signal combinations. Recap – Our First Computer WR System Bus 8 ALU Carry output A B S C OUT F 8 8 To registers’ input/output and clock inputs Sequence of control signal combinations. Assembly Language A Brief Introduction. Unit Learning Goals CPU architecture. Basic Assembler Commands High level Programming  Assembler  Machine Language. Chapter 2 Software Tools and Assembly Language Syntax. UHD:CS2401: A. Berrached1 The Intel x86 Hardware Organization. Processor Fundamentals Assembly Language. Learning Objectives Show understanding of the relationship between assembly language and machine code, including. Intel 8086. 1 COMS 361 Computer Organization Title: Instructions Date: 9/28/2004 Lecture Number: 10. Winter 2016CISC101 - Prof. McLeod1 Today Numeric representation (or “How does binary and hexadecimal work?”). How can a CPU understand instructions written. Chapter 3 Elements of Assembly Language. 3.1 Assembly Language Statements. The CPU Revision Typical machine code instructions Using op-codes and operands Symbolic addressing. Conditional and unconditional branches. CC410: System Programming Dr. Manal Helal – Fall 2014 – Lecture 4 - Assembler 1. Represents different voltage levels High: 5 Volts Low: 0 Volts At this raw level a digital computer is instructed to carry out instructions. 1/2002JNM1 Basic Elements of Assembly Language Integer Constants –If no radix is given, the integer is assumed to be decimal. Int 21h  Int 21 –A hexadecimal. Machine Instruction Characteristics Room: E-3-31 Phone: 03-8921 6726 Dr Masri Ayob TK 2633 Microprocessor & Interfacing Lecture 1: Introduction to 8085 Assembly Language.
