Docsity

Assembler Instructions and Techniques in ECE 4436: A University of Houston Course, Study notes of Microprocessors

Partial preview of the text

Download Assembler Instructions and Techniques in ECE 4436: A University of Houston Course and more Study notes Microprocessors in PDF only on Docsity!

Chap 5: The AssemblerChap. 5: The Assembler

Dept. of Electrical & Computer Engineering

University of Houston

ll Fall 2008

ECE 4436ECE 4436

Relocatable Assembler & Linker

e oca ab e

sse

b e &

e

Fig 2-15 LinkerFig. 2-15 Linker

Table 5-1 Source Code Fields

Ex. 5-2 Labels

Table 5-1 Source Code Fields

Ex. 5-

OperationOperation

Field

Specifying ASCII CharactersSpec

y

g

SC

C a ac e s

Ex. 5-5 ASCII

Assembler Expressions

sse

b e

p ess o s

Table 5 4Table 5-4Assembler

Expressions

CommentsCo

e

s

•^

The last field in the statement, the comment starts with a

semicolon (;).

-^

Any line starting with a semicolon (;) or asterisk (*) in

l^

1 i

f ll li

t

column 1 is a full-line comment.

ECE 4436ECE 4436

bl

l

5.4 Assembler Control 5.5 Assembler Directives

Directives…

appear in the opcode field

  • appear in the opcode field,– but they give directions to the assembler;– they are not assembled as executable instructions forthe processorthe processor.

Table 5-5Table 5-5Directives

(cont’d)

Table 5-5Table 5-5Directives

(cont’d)

For Relocatable Assembly

Ex. 5-

SECTION

Starts at zero Starts at zero

Ex. 5-12 EQUEx. 5 12 EQU

Ex 5-15 DefineEx. 5-15 Define

Constant

Ex 5-16 ASCIIEx. 5-16 ASCII

Strings