to the operating system

∎ Data transfer (RD, WD)

A buffer is used to store record

Buffering is necessary for different I/O rates

The end of each record is marked with a null character (00)16

The end of the file is indicated by a zero-length record

∎ Subroutines (JSUB, RSUB)

RDREC, WRREC

Save link register first before nested jump

Page 9

9

A simple SIC assembler

∎ Assembler's functions

∎ Convert mnemonic operation codes to their machine

language equivalents

❖ Convert symbolic operands to their equivalent machine

addresses

∎ Decide the proper instruction format

∎ Convert the data constants to internal machine

representations

∎ Write the object program and the assembly listing

Page 10

10

Difficult

∎ Convert symbolic operands to their equivalent

machine addresses

∎ Forward reference

∎ 2 passes

∎ First pass: scan the source program for

label definitions and assign addresses

∎ Second pass: perform actual translation

Page 11

11

Example program with object code

(Figure 2.2 pp. 47)

Page 12

12

Example program with object code

(Figure 2.2 pp. 47)

Page 13

13

Example program with object code

(Figure 2.2 pp. 47)

Page 14

14

Format of object program

(Figure 2.3 pp.49)

Header record

Col. 1

H

Col. 2~7

Program name

Col. 8~13

Starting address of object program (hex)

Col. 14-19 Length of object program in bytes (hex)

Text record

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