Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Architecture - Microcomputer Structures - Lecture Slides, Slides of Microcomputers

The lecture slides of the Microcomputer Structures are very easy to understand and the main points are:Architecture, Data, Types and Addressing, Modes, Assembler Language, Programmers Model, Registers, Addressing Modes, Programming Language, Native Language

Typology: Slides

2012/2013

Uploaded on 05/08/2013

anandini
anandini 🇮🇳

4.7

(9)

123 documents

1 / 25

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
9/20/6 Lecture 2 - Prog Model 1
Architecture, Data
Types and Addressing Modes
Docsity.com
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19

Partial preview of the text

Download Architecture - Microcomputer Structures - Lecture Slides and more Slides Microcomputers in PDF only on Docsity!

9/20/6 Lecture 2 - Prog Model 1

Architecture, Data

Types and Addressing Modes

9/20/6 Lecture 2 - Prog Model 2

Lecture Overview

 Assembler Language

 Programmers Model

 Registers

 Addressing Modes

9/20/6 Lecture 2 - Prog Model 4

Assembler Directives

 TTL

 “Title” – gives the program a user-defined name

 EQU

 **Links a pneumonic name to a value. Very valuable in making the program “readable”.  Example to reserve 128 bytes for a stack.  STACK_FRAME EQU 128 Define a stack frame of 128 bytes  ***  LINK A1,# -STACK_FRAME

9/20/6 Lecture 2 - Prog Model 5

Assembler Directives (2)

 DC

 Define constant. Allows the programmer to set memory locations to specific values.  Qualifier specifies data type: .B, .W, .L ORG $ FST DC.B 10, 66 Set constants of 10 and 66 DC.L $0A1234 Store $000A1234 in memory STR DC.B „April‟ Store ASCII values

9/20/6 Lecture 2 - Prog Model 7

Assembler Code Example

9/20/6 Lecture 2 - Prog Model 8

Programmers Model

 When looking at any architecture what does

the programmer see?

 REGISTERS (General purpose)  ADDRESS REGISTERS  SPECIAL PURPOSE REGISTERS  MEMORY  Allowable operations and data transfers supported

9/20/6 Lecture 2 - Prog Model 10

Address Registers

 8 Address Regs

 Labeled A0 to A

 Entire 32 bits is single entity value

 Any operation permitted on Ai is also allowed

on Aj

 2‟s complement value treatment

 Used in instructions to address memory

9/20/6 Lecture 2 - Prog Model 11

Special Purpose Registers

 2 such registers

 PC – Program Counter  Contains the address of the next instruction to be executed.  SR – Status Register  16 bits divided into two bytes  MSB – System byte – control operation mode  LSB – Condition codes

9/20/6 Lecture 2 - Prog Model 13

Addressing Modes

 Modes supported are reflective of even the most

modern architecture

 Some Notation

 [Dx] means the “contents of”  % num means binary  $ num means hexadecimal   indicates transfer of information

 Table on page 27 lists meaning of symbols and

notation

9/20/6 Lecture 2 - Prog Model 14

Immediate Addressing

 ACTION: The value of the operand (data) is loaded into the specified register at the time the program runs.  The value of the operand is used in the operation  Note that general form of instructions is  Operation #Source, Destination  MOVE.W #$8123,D3 [D3(0:15)]$  Fill the low order bytes of De  MOVE.L #$8123,D3 [D3(0:31)]$  Fills all 32 bits of register D

9/20/6 Lecture 2 - Prog Model 16

Register Direct Addressing

 Register to register operation

 The assembler instruction lists both register

which will be used for operand of the operation

to be performed

 The 2nd^ register listed is both the 2nd^ operand of

the operation and gets the results of the

operation.

 Example: MOVE.L D0,D

 Effect: [D3]  [D0]

9/20/6 Lecture 2 - Prog Model 17

Address Register Indirect

 Register Indirect means that the address of the operand is in a register, the address registers.  Ex: ASSEMBLERMOVE.L (A0), D3^ [D3]RTL  [M(A0)] MOVE.W D4, (A6) [M([A6])]  [D4(0:15)]

Forms of Address Reg. Indirect (2)

 Address Register Indirect with displacement

 A 16-bit displacement is specified in instruction  Displacement added to address register to obtain the effective address of the operand

 Register Indirect with Index Addressing

 Effective address is calculated by adding the address register + 8-bit signed displacement + contents of general purpose register  Ref fig 2.15 of text, pg.

9/20/6 Lecture 2 - Prog Model 19

9/20/6 Lecture 2 - Prog Model 20

PC Relative

 Similar to register indirect except that the

address of the operand is specified with

respect to the PC contents.

 Allows data to be located relative to the

location of the program in memory, i.e.,

relative to the Program Counter –

allows WHAT????

 Restricted to only the source operand