0% found this document useful (0 votes)
28 views

Assembly Language Programming - CS401 Power Point Slides Lecture 02

This document provides an introduction to assembly language and basic computer organization. It discusses different types of registers including the accumulator, pointer/index/base, general purpose, and flag/program status word registers. It also outlines some common instruction groups like data movement, arithmetic/logic, program control, and special instructions and provides examples of mov, add, and, cmp, jne instructions.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
28 views

Assembly Language Programming - CS401 Power Point Slides Lecture 02

This document provides an introduction to assembly language and basic computer organization. It discusses different types of registers including the accumulator, pointer/index/base, general purpose, and flag/program status word registers. It also outlines some common instruction groups like data movement, arithmetic/logic, program control, and special instructions and provides examples of mov, add, and, cmp, jne instructions.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 15

CS-401

Assembly Language Programming

Lecture-2
Introduction to Assembly Language
Basic Computer Organization

REGISTERS
Registers

Accumulator Register

Function:
Mathematical and Logical Operations
Registers

Pointer / Index / Base

Function:
Holds the Address of Operands
Registers

General Purpose

Function:
Temporary Storage
of
Intermediate Results
Registers

Flag / Program Status Word

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

C O P D Z I A S

A sample 8 – bit flag register

C = Carry Flag
Z = Zero Flag
Registers
Carry Flag

1111111111111111
+1111111111111111
0000000000000001
0000000000000000

16 – bit Accumulator
Carry Flag = CF
Registers

Program Counter
Instruction Pointer

Function:
Address of next instruction to be executed
Instruction Groups

Data Movement Instructions


Arithmetic / Logic Instructions
Program Control Instructions
Special Instructions
Data Movement

mov ax,bx ; move data from bx to ax

lda 0234 ; load 0234 into


; accumulator
Arithmetic and Logic Instructions

and ax,1234 ; AND 1234 with ax

add bx,0534 ; ADD 0534 to bx

add bx,[1200] ; ADD data at address 1200 to


bx

add ax,[1234] ; ADD data from address 1234


to ax
Program Control Instructions

cmp ax,0 ; Compare ax with 0

jne 1234 ; Jump if not equal to the


instruction
; at address 1234
Special Instructions

cli ; Clear the interrupt flag

sti ; Set the interrupt flag

You might also like