assembler

345 0 0
                                        

Put your story text here...

Page 1

1

Chapter 2 Assemblers

-- Basic Assembler Functions

Page 2

2

Outline

∎ Basic assembler functions

∎ A simple SIC assembler

∎ Assembler algorithm and data structure

Page 3

3

Basic assembler functions

∎ Translating mnemonic operation codes to

their machine language equivalents

∎ Assigning machine addresses to symbolic

labels

Source Program

• Mnemonic opcode

• Symbol

Assembler

Object code

Page 4

4

Assembler directive

∎ Assembler directives are pseudo instructions

They provide instructions to the assembler itself

They are not translated into machine operation codes

∎ SIC assembler directive

START : specify name & starting address

END

: end of source program, specify the first

execution instruction

BYTE, WORD, RESB, RESW

End of record

: a null char (00)

End of file

: a zero-length record

Page 5

5

Example program (Figure 2.1 pp. 45)

Forward

reference

Page 6

6

Example program (Figure 2.1 pp. 45)

Page 7

7

Example program (Figure 2.1 pp. 45)

Page 8

8

Example program (Figure 2.1 pp. 45)

∎ Purpose of example program

Reads records from input device (code F1)

Copies them to output device (code 05)

At the end of the file, writes EOF on the output device, then RSUB

You've reached the end of published parts.

⏰ Last updated: Aug 16, 2010 ⏰

Add this story to your Library to get notified about new parts!

assemblerWhere stories live. Discover now