Chapter 2 2 ( Leehland) Flashcards

1
Q

Role of Assembler

A

Source code is converted into the object code

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Linker

A

Object code is converted into the executable code.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Loader

A

It loads the executable code onto the memory (RAM) for it to get executed by CPU.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Fundamental functions of the Assemblers

A

Translating the mnemonic operation codes to their machine language equivalent.

Assigning the machine addresses to the symbolic labels.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Assemblers are machine dependent as they have different machine instructions format and _______

A

codes

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Data Transfer (RD, WD)

A

The end of each record is marked with the null character(00[subscript-16])
The end of the file is indicated by the zero-length record.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Subroutines(JSUB, RSUB)

A

(RDREC, WRREC)
Saves the link register first before the nested jump.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Pseudo Instructions

A

Providing instructions to the Assembler.

Not translated into the machine instructions.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Basic Assembler Directive

A

START
END
BYTE
WORD
RESW
RESB

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Object Program

A

Header
Text
End

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

End

A

E
Address of the first executable instruction (hex)
(END_PROGRAM NAME)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

TEXT

A

T
Starting address int his record (hex)
Length of the object code in this record int he bytes (hex)
Object code (69-10+1)/6 =10 instructions

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Header

A

H
Program name
Starting address (hex)
Length of the object program in bytes (hex)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Assembler’s other functions

A

Convert the data constant into the internal machine representations
Build the machine instructions in the proper format
Write the object t program and the assembly listing.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Forward reference

A

reference that is defined later in the program

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Two Pass Assembler:

Pass 1

A

Assign the addresses to all the statements in the program
Save the values assigned to all labels for use in Pass 2
Perform some processing of Assembler directives

17
Q

Pass 2

A

Assemble insrtuctions
Generate data values defined by the BYTE, WORD
Perform processing of Assembler directives not done in Pass 1
Write the object program and the assembly listing

18
Q

Data Structure in the assembler

A

Operation Code (OPTAB)
Symbol Table (SYMTAB)
Location Counter (LOCCTR)

19
Q

OPTAB

A

Content: menmonic, machine code (instruction format, length )etc.

Characteristic: static table

Implementation: array or hash table (easy for search)

20
Q

SYMTAB

A

Content: label name, value, flag, (type, length), etc.

Characteristic: Dynamic table (insert, delete, search)

Implementation: hash table, hashing function, non-random keys

21
Q

Machine Depedent Assembler Features

A

Instruction formats and addressing modes

Program relocation

22
Q

Machine Independent Assembler Features

A

Literals

Symbol-defining statements

Expressions

Program Blocks

Control sections and program linking

23
Q

Register Translation

A

Register Name: A, X, L, B, S, T, F, PC, SW
Their values: 0, 1, 2, 3, 4, 5, 6, 8, 9

24
Q

Address translation

A

register-memory instructions use program counter relative or base relative addressing (op m)

Format 3: 12-bit address field

base relative: 0-4095
pc-relative: -2048 - 2047

Format 4: 20-bit address field

25
Q

NOBASE

A

To inform the assembler that the contents of the base register no longer be relied upon for addressing.