Presentation is loading. Please wait.

Presentation is loading. Please wait.

CS-401 Assembly Language Programming

Similar presentations


Presentation on theme: "CS-401 Assembly Language Programming"— Presentation transcript:

1 CS-401 Assembly Language Programming
Lecture-2 Introduction to Assembly Language

2 Basic Computer Organization
REGISTERS

3 Mathematical and Logical Operations
Registers Accumulator Register Function: Mathematical and Logical Operations

4 Holds the Address of Operands
Registers Pointer / Index / Base Function: Holds the Address of Operands

5 Registers General Purpose Function: Temporary Storage of
Intermediate Results

6 Registers Flag / Program Status Word Function:
Collection of different boolean information each bit has an independent meaning

7 Registers Flag / Program Status Word A sample 8 – bit flag register
C O P D Z I A S A sample 8 – bit flag register C = Carry Flag Z = Zero Flag

8 Registers Carry Flag 16 – bit Accumulator Carry Flag = CF

9 Address of next instruction to be executed
Registers Program Counter Instruction Pointer Function: Address of next instruction to be executed

10 MNEMONIC

11 Instruction Groups Data Movement Instructions
Arithmetic / Logic Instructions Program Control Instructions Special Instructions

12 Data Movement mov ax,bx ; move data from bx to ax
lda ; load 0234 into ; accumulator

13 Arithmetic and Logic Instructions
and ax, ; AND 1234 with ax add bx, ; ADD 0534 to bx add bx,[1200] ; ADD data at address 1200 to bx add ax,[1234] ; ADD data from address 1234 to ax

14 Program Control Instructions
cmp ax,0 ; Compare ax with 0 jne ; Jump if not equal to the instruction ; at address 1234

15 Special Instructions sti ; Set the interrupt flag
cli ; Clear the interrupt flag sti ; Set the interrupt flag


Download ppt "CS-401 Assembly Language Programming"

Similar presentations


Ads by Google