SASDDI@VM.SAS.COM (Dale Ingold) (05/03/91)
We have an assembler module which does a conditional COPY (via AIF/AGO/ANOP logic). When attempting to assemble the module with the SET symbols set such that the COPY instruction is not executed, we get a message that the member specified on the COPY instruction is not found, to wit: IEV060 *** ERROR *** COPY CODE NOT FOUND -- SASCRAB The message in itself is correct; the member does not exist on the system on which the assembly is running. A further interesting fact is the position of the message within the listing; although the COPY instruction appears near the end of the module, the error message appears much closer to the top of the listing. Final relevant fact: we are running Assembler (H) V2 Speculation: doesn't the assembler do lookahead? And if so, could it be looking for (via BLDL?) or actually reading in, any member specified on a COPY instruction whether or not the instruction is actually "executed"? Is this surprising? Perhaps not, since the sequence symbol being branched to might lie within the COPYed code. Well, sitting here typing this in, I think I've answered my own question, but perhaps it'll spark some interesting dialog. ========================================================================= Dale D. Ingold SAS Institute Inc. snoddi@mvs.sas.com MVS Host Group SAS Campus Drive 919/677-8000 x7603 Cary, NC 27513-2414
ralerche@LINDY.STANFORD.EDU ("Robert A. Lerche") (05/03/91)
This is an interesting point. The COPY operation is applied during pass 1 of an assembly, and simply redirects the input to a SYSLIB member. Thus, there is no such thing as a "conditional COPY". A consequence of this is that a COPY is _not_allowed_ to be generated by MACRO. If a MACRO generates a COPY the error "IEV001 ... OPCODE NOT ALLOWED TO BE GENERATED" results. (To generate a COPY you have to "trick" the assembler by defining a SETC symbol to be 'COPY' and using it in the opcode field. If you just put a COPY inside a MACRO definition the text of the copied member will be placed _inside_ the definition.)
phil@ux1.cso.uiuc.edu (Phil Howard KA9WGN) (05/03/91)
ralerche@LINDY.STANFORD.EDU ("Robert A. Lerche") writes: >(To generate a COPY you have to "trick" the assembler by defining a SETC >symbol to be 'COPY' and using it in the opcode field. If you just put >a COPY inside a MACRO definition the text of the copied member will be >placed _inside_ the definition.) In fact, I have used COPY to actually insert PORTIONS of conditional code -- /***************************************************************************\ / Phil Howard -- KA9WGN -- phil@ux1.cso.uiuc.edu | Guns don't aim guns at \ \ Lietuva laisva -- Brivu Latviju -- Eesti vabaks | people; CRIMINALS do!! / \***************************************************************************/
news@ucf1vm.BITNET (05/03/91)
ralerche@LINDY.STANFORD.EDU ("Robert A. Lerche") writes: >(To generate a COPY you have to "trick" the assembler by defining a SETC >symbol to be 'COPY' and using it in the opcode field. If you just put >a COPY inside a MACRO definition the text of the copied member will be >placed _inside_ the definition.) In fact, I have used COPY to actually insert PORTIONS of conditional code -- /***************************************************************************\ / Phil Howard -- KA9WGN -- phil@ux1.cso.uiuc.edu | Guns don't aim guns at \ \ Lietuva laisva -- Brivu Latviju -- Eesti vabaks | people; CRIMINALS do!! / \***************************************************************************/