Question: suppose that you have a simple one pass macro pro reyuired in pass macro processor built uoo rcses the general scheme described in Section 4.1.
reyuired in pass macro processor built uoo rcses the general scheme described in Section 4.1. a have a two-pass macroassembler- hat is, a one- into Pass 1 of a two-pass assembler. The s Suppose that we macro processor nse that we want t the programmer to be able to invoke include the macro definitions in the For example, a programmer might simply write otnt in his or her program-the macro processor retrieve the definition of RDBUFF from a ry. Briefly describe how this feature could be programmer having to Su macros withou source a Suppose that am. his a RDBUFF statement macro standard implemented efficien tly that macros are not allowed to have the same name as instructions. For example, if the programmer tries to de- named CLEAR, the macroassembler should give an ecause CLEAR is a SIC/XE machine instruction). CLEA fine a macro Describ e how this restriction could be implemented. e that we do want to allow macros to have the same machine instructions. For example, if the programmer d CLEAR, then any CLEAR statements in ssembled should be expanded as macro invo- If the programmer does not define a macro named CLEAR, then any CLEAR statements should be assembled as ma- c Now suppose name as defines a macro name the program being a cations. chine instructions. Describe how this could be implemented. d. Suppose, as in part (c), that macros are allowed to have the sam name as machine instructions. Suppose that we want to have th definitions of such macros retrieved automatically from a macr library, as in part (a). What problems arise? How might yo solve these problems? on 4.2
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
