cao project final

Post on 09-Jun-2015

306 Views

Category:

Education

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Group Members:

• Salman Bajwa(3746)• M. Taimour (4727)• Shahrukh Ahmed (4798)• Akhtar Waqar (4682)

Course: CAOC.Id: 10440

Instructor: Mr. Kamran Ali

Project Presentation

Introduction:

• Using EMU-8086 processor.• It’s a low level-assembly language based processor.• It’s a 16 bit processor.

We will be using here 4 instructions• MOV• ADD• LOOP• SUB

MOVSYNTAX: MOV DESTINATION , SOURCE

EXAMPLE:

ORG 100H MOV AH,10H MOV BL,AH RET

FETCH CYCLE

CPU RAMAddress-Bus

0100H

CPU RAMControl-Bus

READ

CPU RAMData-Bus

10H

10h0100H

RAM

IP is incremented

CPU RAMAddress-Bus

0104H

CPU RAMControl-Bus

Read

CPU RAMData-Bus

10H

10H

RAM

10H

0100H

0104H

IP is incremented

ADDSYNTAX: ADD Register , Number place in memory

EXAMPLE:

ORG 100hMOV AH,10hMOV BH,5hADD AH,BHMOV DL,AHRET

BEFORE AFTER

FETCH CYCLE

CPU RAMAddress-Bus

0100H

CPU RAMControl-Bus

READ

CPU RAMData-Bus

10H

10h0100H

RAM

IP is incremented

CPU RAMAddress-Bus

0104H

CPU RAMControl-Bus

Read

CPU RAMData-Bus

5H

10H

RAM

5H

0100H

0104H

IP is incremented

CPU RAMAddress-Bus

0106H

CPU RAMControl-Bus

Read

CPU RAMData-Bus

15H

10H

RAM

5H

0100H

0104H

0106H 15H

IP is incremented

LOOPSYNTAX: TAG:

LOOP , TAG(NAME)

EXAMPLE:ORG 100hMOV AH,0EHMOV BL,30HMOV CL,0AHAGAIN:MOV AL,BLINT 10HINC BLLOOP AGAINRET

FETCH CYCLE

CPU RAMAddress-Bus

0102H

CPU RAMControl-Bus

Read

CPU RAMData-Bus

OEh

0eH

RAM

0102H

IP is incremented

CPU RAMAddress-Bus

0104H

CPU RAMControl-Bus

Read

CPU RAMData-Bus

15H

0eH

RAM

30H

0102H

0104H

IP is incremented

CPU RAMAddress-Bus

0106H

CPU RAMControl-Bus

Read

CPU RAMData-Bus

0AH

0eH

RAM

30H

0100H

0104H

0106H 0AH

IP is incremented

CPU RAMAddress-Bus

0108H

CPU RAMControl-Bus

Write

CPU RAMData-Bus

30H

oeH

RAM

30H

0100H

0104H

0106H 0AH

Loop is now continue for 10 values

0108H 30H

SUBSYNTAX: SUB REGISTER, NUMBER

EXAMPLE:

ORG 100H

MOV AH,10

SUB AH,5

MOV BL,AH

RET

BEFORE AFTER

FETCH CYCLE

CPU RAMAddress-Bus

0100H

CPU RAMControl-Bus

READ

CPU RAMData-Bus

10H

10h0100H

RAM

IP is incremented

CPU RAMAddress-Bus

0102H

CPU RAMControl-Bus

Read

CPU RAMData-Bus

10H

10h0100H

RAM

IP is incremented

0102H 10H

CPU RAMAddress-Bus

0102H

CPU RAMControl-Bus

Read

CPU RAMData-Bus

10H

10h0100H

RAM

IP is incremented

0102H 10H

0105H 5H

CPU RAMAddress-Bus

0107H

CPU RAMControl-Bus

Write

CPU RAMData-Bus

5H

10h0100H

RAM

IP is incremented

0102H 10H

0105H 5H

0107H 5H

top related