State whether the following statements are True or False with reasons for your answer
A subroutine cannot always be used to replace a macro in an assembly language program.
A symbol declared as ‘external’ in an assembly language program is assigned an address outside the program by the assembler itself.
For part (B) refer ->
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.
Chhotu
why a is true?Any ref?
a)"The macros can take function like arguments, the arguments are not checked for data type"
Macros are preprocessor directive
But subroutine call is like function call, which can call nested function call.
So, subroutine call and macros are works for different objective
https://www.geeksforgeeks.org/interesting-facts-preprocessors-c/
b)The extern keyword means "declare without defining".
extern
So, "program is assigned an address outside the program"- this is a wrong statement
it is true... but the question is we can replace every Macro by Sub-routine ?