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

Assembly Language Programming - CS401 Power Point Slides Lecture 02

This document discusses assembly language programming and basic computer organization. It describes different types of registers including the accumulator, pointer/index/base, general purpose, and flag/program status word registers. It explains that registers are used for mathematical and logical operations, storing addresses, temporary data storage, and collecting boolean status information. The document also outlines common instruction groups for data movement, arithmetic/logic, program control, and special operations. It provides examples of mov, lda, and, add, cmp, jne, cli, and sti instructions.

Uploaded by

usmanahmadawan
Copyright
© © All Rights Reserved
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
64 views

Assembly Language Programming - CS401 Power Point Slides Lecture 02

This document discusses assembly language programming and basic computer organization. It describes different types of registers including the accumulator, pointer/index/base, general purpose, and flag/program status word registers. It explains that registers are used for mathematical and logical operations, storing addresses, temporary data storage, and collecting boolean status information. The document also outlines common instruction groups for data movement, arithmetic/logic, program control, and special operations. It provides examples of mov, lda, and, add, cmp, jne, cli, and sti instructions.

Uploaded by

usmanahmadawan
Copyright
© © All Rights Reserved
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
O P D Z I A C 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


MNEMONIC


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

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
Arithmetic and Logic Instructions

cmp ax,0 ; Compare ax with 0

jne 1234 ; Jump if not equal to the
instruction
; at address 1234

Program Control Instructions

cli ; Clear the interrupt flag

sti ; Set the interrupt flag

Special Instructions

You might also like