685 views
State whether the following statements are True or False with reasons for your answer

A symbol declared as ‘external’ in an assembly language program is assigned an address outside the program by the assembler itself.

### 1 comment

https://en.wikipedia.org/wiki/External_variable

If the program is in several source files, and a variable is defined in file1 and used in file2 and file3, then extern declarations are needed in file2 and file3 to connect the occurrences of the variable. The usual practice is to collect extern declarations of variables and functions in a separate file, historically called a header, that is included by #include at the front of each source file. The suffix .h is conventional for header names.

$\textsf{extern}$ symbol in an assembler $($or $C)$ compilation unit (a file and all its included ones) is used to refer to $\textsf{global}$ symbols (either variables or functions) in other parts of the program including any shared libraries.

Now, an assembler at the time of assembling has no information about the address of these extern symbols. It is the job of the linker to resolve them once assembling is over.

So, $\textsf{FALSE}.$
by

1
1,182 views