0% found this document useful (0 votes)
139 views21 pages

Computer Organization & Assembly Language Programming

The document discusses the Intel iAPX 88 processor and its basic architecture. It describes the iAPX 88 as a 16-bit processor used in early IBM PCs. It details the iAPX 88 registers including the general purpose registers AX, BX, CX, DX and their 8-bit counterparts. It also discusses the flag, pointer, index, base, program counter and segment registers. It provides examples of simple assembly programs and tools used for assembly like NASM, ALINK and AFD.

Uploaded by

Muhammad Ehsan
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)
139 views21 pages

Computer Organization & Assembly Language Programming

The document discusses the Intel iAPX 88 processor and its basic architecture. It describes the iAPX 88 as a 16-bit processor used in early IBM PCs. It details the iAPX 88 registers including the general purpose registers AX, BX, CX, DX and their 8-bit counterparts. It also discusses the flag, pointer, index, base, program counter and segment registers. It provides examples of simple assembly programs and tools used for assembly like NASM, ALINK and AFD.

Uploaded by

Muhammad Ehsan
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/ 21

Computer Organization & Assembly

Language Programming

Lecture-3
Introduction to Assembly Language
Basic Computer Organization
iAPX 88 Registers (16-bit)
• IBM PC based on Intel architecture because of free assemblers
and debuggers available for it.
• iAPX88 stands for “Intel Advanced Processor Extensions 88.”
It was a very successful processor also called 8088 and was
used in the very first IBM PC machines.
• we will use iAPX386 which is very advanced and powerful
processor. 8088 is a 16bit processor with its accumulator and
all registers of 16 bits. 386 on the other hand, is a
32bitprocessor. However, it is downward compatible with
iAPX88 .
Basic Computer Organization
HISTORY
•Intel did release some 4bit processors in the beginning but the first
meaningful processor was 8080, an 8bit processor.
•Advanced version was released as 8085.The processor became
widely popular in the engineering community again due to its simple
and logical nature.
•Intel introduced the first 16bit processor named 8088 at a time when
the concept of personal computer was evolving. With a maximum
memory of 64Kon the 8085, the 8088 allowed a whole mega byte.
•IBM embedded this processor in their personal computer. The first
machines ran at 4.43 MHz; a blazing speed at that time
iAPX 88 Registers (16-bit)

General Purpose

AX
BX
CX
DX
X in their names stand for extended meaning 16bit registers.
For example, AX means we are referring to the extended
16bit “A” register
iAPX 88 Registers (16-bit)

General Purpose
16-bit

AX
AH AL
8-bit 8-bit

Its upper and lower byte are separately accessible as AH (A


high byte) and AL (A low byte). All general-purpose
registers can be accessed as one 16bit register or as two 8
bits registers. The two registers AH and AL are part of the
big whole AX.
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
• BX stands for Base because of its role in memory addressing.
• C of CX stands for Counters there are certain instructions that work with an
automatic count in the register.
• The D of DX stands for Destination as it acts as the destination in I/O operations.
iAPX 88 Registers (16-bit)

Pointer / Index / Base

SI
DI
• These are the index registers of the Intel architecture which hold
address of data and used in memory access.
• Intel allows many mathematical and logical operations on these
registers as well like the general registers.
• SI and DI are 16bit and cannot be used as8bit register pairs like
AX, BX, CX, and DX.
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

C = Carry S = Sign Bit


P = Parity T = Trap Flag
A= Auxiliary Carry I = Interrupt Flag
Z= Zero Bit D = Direction Flag
O = Overflow
it is bit wise significant and accordingly each bit is named separately. The
Registers

Program Counter
Instruction Pointer

Function:
Address of next instruction to be executed
• This is the special register containing the address of the next
instruction to be executed.
• No mathematics or memory access can be done through this
register. It is out of our direct control and is automatically used.
Playing with it is dangerous and needs special care. Program
control instructions change the IP register.
iAPX 88 Registers (16-bit)

Segment

CS CS Code Segment


DS DS Data Segment
SS SS Stack Segment
ES ES Extra Segment
Will be discussed next……. In coming lectures.
iAPX 88 Registers (16-bit)

General Purpose

AX AH,AL
BX BH,BL
CX CH,CL
DX DH,DL
A Simple Program

Move 5 to AX mov ax,5


Move 10 to BX mov bx,10
ADD BX to AX add ax,bx
Move 15 to BX mov bx,15
ADD BX to AX add ax,bx
General Instruction Format

instruction dest, src


instruction dest
instruction src
Assembler

NASM

The Netwide Assembler


Linker

ALINK
Debugger

AFD

Advanced Full Screen Debug


EX01.ASM
[ORG 0X100]

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
Little Endian Notation MSB LSB
0 1 2 3
Representation 2
Big Endian Notation LSB MSB
0 1 2 3

You might also like