Article View: comp.lang.asm370
Article #970Extended Parameter List
From: SOMITCW
Date: Fri, 16 Feb 1990 12:27
Date: Fri, 16 Feb 1990 12:27
42 lines
2242 bytes
2242 bytes
> I wrote a test program using extended parameter list as bellow. But it
>doesn't work. That is, the parameters I type on command line cannot be
>referred by the module generated by the assembly source. Can anyone
>point out what I mistake?
You cannot use register ZERO for addressing.
Coding hints:
1. Use comments.
2. Use register equates ( macro REGEQU is on CMSLIB MACLIB ).
3. Delete sequence numbers.
4. Use START x'20000' or CSECT instead of START 0.
5. Use SAVE instead of STM ( the SAVE macro is on OSMACRO MACLIB ).
6. Use LR R12,R15 instead of BALR 12,0.
7. Use save areas.
8. Use just L instead of the LA, MVC, L sequence.
*
NOTOKEN CSECT ,
USING *,R15 TELL ASSEMBLER ABOUT THE TEMP. BASE
SAVE (14,12),,NOTOKEN.&SYSDATE..&SYSTIME
LA R12,SAVEAREA LOAD THE SAVE AREA ADDRESS
ST R12,8(,R13) CONNECT SAVE AREAS
ST R13,4(,R12) CONNECT SAVE AREAS
LR R13,R12 CONNECT SAVE AREAS
LR R12,R15 LOAD THE BASE REGITSER
USING NOTOKEN,R12 TELL ASSEMBLER ABOUT THE BASE
DROP R15 STOP USING THE TEMPORARY BASE
LR R1,R0 FIX PARM-LIST ADDRESS TO BE ADDRESSED
LM R2,R4,0(R1) LOAD PARM-LIST ADDRESSES ( WHY R4? )
*
WRTERM (R2),8 DISPLAY THE START OF THE COMMAND
WRTERM (R3),30 DISPLAY OPERANDS OF THE COMMAND
*
L R13,4(,R13) RESTORE CALLER'S R13
RETURN (14,12),RC=0 RETURN TO CALLER
*
SAVEAREA DC 18F'0' NON-RENT REGISTER SAVE AREA
*
REGEQU , REGISTER EQUATES
*
END ,
Technical Details
Message-ID:
<9002161328.AA01747@lilac.berkeley.edu>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!ucbvax!VCCSCENT.BITNET!SOMITCWShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!ucbvax!VCCSCENT.BITNET!SOMITCW From: SOMITCW@VCCSCENT.BITNET Newsgroups: comp.lang.asm370 Subject: Extended Parameter List Message-ID: <9002161328.AA01747@lilac.berkeley.edu> Date: 16 Feb 90 12:27:45 GMT Sender: daemon@ucbvax.BERKELEY.EDU Reply-To: IBM 370 Assembly Programming Discussion List <ASM370%UCF1VM.bitnet@lilac.berkeley.edu> Distribution: inet Organization: The Internet Lines: 42