First Half 30 Questns

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 10

Mnemonic represent:

A. Operation codes

B. Strings

C. Address

D. None of these

Answer: A

Assembler works in______ phases:

A. 1

B. 3

C. 2

D. 4

Answer: C

The assembler in first pass reads the program to collect symbols defined with offsets in a
table_______:

A. Hash table

B. Symbol table

C. Both a& b

D. None of these

Answer: B

In second pass, assembler creates _______in binary format for every instruction in program and
then refers to the symbol table to giving every symbol an______ relating the segment.

A. Code and program


B. Program and instruction

C. Code and offset

D. All of these

Answer: C

Which of the 2 files are created by the assembler:

A. List and object file

B. Link and object file

C. Both a & b

D. None of these

Answer: A

In which code is object file is coded:

A. Link code

B. Decimal code

C. Assembly code

D. Binary code

Answer: D

Symbol table stores

A. Name of symbol used

B. Information of constants

C. Temporary variable’s information

D. All of the above


Answer: A

________ is a data structure to implement memory allocation.

A. Location table

B. Location count

C. Location counter

D. Location area

Answer: C

Which assembler directive indicates that the first word of the target program generated by the
assembler should be placed in the memory word with address.

A. LABEL

B. END

C. START

D. STOP

Answer: C

Which assembler directive indicates that the end of the source program.

A. EXIT

B. END

C. START

D. LABEL END

Answer: B

Instruction in computer languages consists of

A. OPCODE
B. OPERAND

C. Both of above

D. None of above

Answer: C

How many types of entities contained by assembler to handle program:

A. 4

B. 2

C. 3

D. 5

Answer: C

When a RESW assembler directive is used the LOCCTR value is calculated by:

A. LOCCTR=LOCCTR+#OPERAND VALUE

B. LOCCTR =LOCCTR+3*#OPERAND VALUE

C. LOCCTR=LOCCTR+3

D. LOCCTR=LOCCTR+LENGTH OF THE CONSTANTS IN BYTES

Answer: B

The assembler stores all the labels and their corresponding values in _____

A) Special purpose Register

B) Symbol Table

C) Value map Set

D) None of these

ANSWER: B
Which of these features of assembler are Machine-Dependent ?

A) Instruction formats

B) Addressing modes

C) Program relocation

D) All of the mentioned

ANSWER: D

A simple two-pass assembler does which of the following in the first pass?

A) It allocates space for the literals

B) It computes the total length of the program

C) It builds the symbol table for the symbols and their values

D) All of these

ANSWER: D

Pass 2 –

A) Perform processing of assembler directives not done during pass 1

B) Write the object program and assembly listing

C) Assemble instruction and generate data

D) All of these

ANSWER: D

Pass 1 –

A) save the values assigned to all labels for use in pass 2

B) perform some processing of assembler directives

C) assign address to all statements in the program

D) all of these

ANSWER: D
Which table is permanent databases that has an entry for each terminal symbol ?

A) Literal table

B) Symbol table

C) Operation code table

D) None of these

ANSWER: C

An assembler is

A) Programming language dependent.

B) Syntax dependant.

C) Machine dependant.

D) Data dependant.

ANSWER: C

An assembly language is a

A) Low level programming language

B) Middle level programming language

C) High level programming language

D) Internet based programming language

ANSWER: A

Which of the following is a Assembly Directive

A) STA

B) LDA

C) JSUB

D) START

ANSWER: D
Which of the following is not a Assembly Directive

A) END

B) BYTE

C) RSUB

D) RESB

ANSWER: C

The address of the first machine instruction in object program is stored

A) Header record

B) Text Record

C) End Record

D) Modification Record

ANSWER: C

The assembly directive used to define symbols

A) RESW

B) RESB

C) EQU

D) ORG

ANSWER: C

Convert the given SIC/XE instruction into object code 1000 STL RETADR (PC)=1003,(B)=1033,
Address of RETADR=1033,STL=14,

A) 172030

B) 172003

C) 171000

D) 174000

ANSWER: A
Convert SIC/XE instruction into object code where CLEAR=B4,

CLEAR X,

CLEAR A,

A) B410 & B420

B) B410 & B400

C) B430 & B420

D) B400 & B410

ANSWER: B

Determine the object code,

104E STCH BUFFER X,

considering (B)=0033,TA=0036,STCH=54,(PC)=1051

A) 57201B

B) 57A01B

C) 57C003

D) 57C103

ANSWER: C

Generate the address of second instruction,

0036 BUFFER1 RESB 4096,

_____ RDREC CLEAR X,

A) 4096

B) 40CC

C) 4132

D) 1036

ANSWER: D
Which of the following is not converted to object code ?

A) START

B) BASE

C) LTORG

D) All of these

ANSWER: D

The modification record for the instructions given below,

0006 4B101036

A) M^000007^05

B) M^000006^05

C) M^000008^05

D) None of these

ANSWER: A

Determine the current LOCCTR value in the following code,

1000 LDA LABEL,

ORG 1040 ,

SYMBOL RESB 6,

VALUE RESW 1,

A) 1040

B) 1000

C) 1049

D) 1046

ANSWER: C

Convert the foloowing instruction to object code,


001A LDA =c'EOF',

at address 002D the constant =c'EOF' is defined,

(PC)=001D

A) 32010

B) 3202D

C) 3201D

D) 3201A

ANSWER: A

You might also like