Presentation is loading. Please wait.

Presentation is loading. Please wait.

Assembly Language A Brief Introduction. Unit Learning Goals CPU architecture. Basic Assembler Commands High level Programming  Assembler  Machine Language.

Similar presentations


Presentation on theme: "Assembly Language A Brief Introduction. Unit Learning Goals CPU architecture. Basic Assembler Commands High level Programming  Assembler  Machine Language."— Presentation transcript:

1 Assembly Language A Brief Introduction

2 Unit Learning Goals CPU architecture. Basic Assembler Commands High level Programming  Assembler  Machine Language

3 First: Machine Code Machine Code is a language made of only 1’s and 0’s. It consists of: –Operators (instructions) –Operands (data) you can program in machine code it’s just very tedious

4 What is It? A language which has a one-to-one correspondence with machine code. That is, Every assembly instruction has a unique machine code representation. Assembly language is specific for each processor.

5 Background: CPU The CPU consists of: –ALU – Arithmetic/ Logic Unit Does all the math –Registers Temporary storage for executing instructions. D- Flip-Flops! –Program Counter Stores the address in ram of the current instruction –Decode Unit Figures out what to do with the instruction

6 How it works When the OS lets a program run, it is loaded into RAM Called into the CPU one instruction at a time CPU performs the instruction and updates the program counter.

7 An instruction Consists of: Op Code- a 3 letter pneumonic code representing a instruction (add, mov…) Operands specify which data should be operated on and where the answer should be stored. (Registers, Numbers, addresses in Ram)

8 For Example: mov The move instruction moves one hexadecimal byte into a specified register. Ex: mov AL,3F ;moves the number 3F into register AL

9 Your Code Every line of your assembly code should have a brief comment explaining what it does. Open the Assignment and try make some ASM programs!


Download ppt "Assembly Language A Brief Introduction. Unit Learning Goals CPU architecture. Basic Assembler Commands High level Programming  Assembler  Machine Language."

Similar presentations


Ads by Google