CS-401 Quiz 1
CS-401 Quiz 1
CS-401 Quiz 1
Processor Memory
I/O
Basic Computer Organization
Address Bus
Data Bus
Processor Memory
Control Bus
Dimensions of Memory
Horizontal Dimensions = Width of Memory Cell
00000000
Binary 00000001
Vertical
Addresses Dimensions
Of
=
Memory
Cells Size of
00100011 Memory
00100100
00100101
Basic Computer Organization
Processor Memory
Control Bus
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
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
AX
BX
CX
DX
iAPX 88 Registers (16-bit)
General Purpose
16-bit
AX
AH AL
8-bit 8-bit
iAPX 88 Registers (16-bit)
General Purpose
16-bit
BX
BH BL
8-bit 8-bit
iAPX 88 Registers (16-bit)
General Purpose
• AX A Accumulator Register
• BX B Base Register
• CX C Counter Register
• DX D Destination Register
iAPX 88 Registers (16-bit)
Pointer / Index / Base
SI
DI
iAPX 88 Registers (16-bit)
Pointer / Index / Base
• SI SI Source Index
• DI DI Destination Index
• IP IP Instruction Pointer
• SP SP Stack Pointer
• BP BP Base Pointer
iAPX 88 Registers (16-bit)
Flag Register
- - - - O D I T S Z - A - P - C
Function:
Address of next instruction to be executed
Instruction Groups
• AX AH,AL
• BX BH,BL
• CX CH,CL
• DX DH,DL
A Simple Program
NASM
ALINK
Debugger
AFD
mov ax,5
mov bx,10
Add ax,bx
Mov bx,15
Add ax,bx
Mov ax,0x4c00
Int 0x21
EX01.LST
Word Representation
• 4 Byte Word
MSB LSB
• Representation in Memory
Representation 1
0 1 2 3