Posted: Thu Oct 09, 2003 9:44 am Post subject: Assembler compilation
Hi,
I'm learning ASSEMBLER and trying to assemble a program that I got from the web. But the compilation is failing with the following error message:
Quote:
ST R13,SAVREG13
** ASMA044E Undefined symbol - SAVREG13
Below is the code that I tried to compile.
Code:
ASMASMA3 CSECT
SAVE (14,12)
BALR 12,0 PREPARE A BASE REGISTER
USING *,12 ESTABLISH BASE REGISTER
ST R13,SAVREG13
*
WTO '* ASMASMA3 is starting, example of LINK macro......'
WTO '* ASMASMA3 linking to ASMASMAA with four parameters...'
LA R13,SAVEAREA
LINK EP=ASMASMAA,PARAM=(PARM01,PARM02,PARM03,PARM04),VL=1
WTO '* ASMASMA3 return...'
EOJAOK EQU *
WTO '* ASMASMA3 is complete, example of LINK macro......'
L R13,SAVREG13
RETURN (14,12),RC=0
ABEND08 EQU *
WTO '* ASMASMA3 is abending...RC=0008'
L R13,SAVREG13
RETURN (14,12),RC=8
DS 0F + Force alignment
*
SAVEAREA EQU *
DC F(0)
DC F(0)
SAVREG13 DC F(0)
DC 15F(0) * Used by SAVE/RETURN functions
*
PARM01 DC H(28),H(0),CL26'* ASMASMA3 parameter 01 '
PARM02 DC H(28),H(0),CL26'* ASMASMA3 parameter 02 '
PARM03 DC H(28),H(0),CL26'* ASMASMA3 parameter 03 '
PARM04 DC H(28),H(0),CL26'* ASMASMA3 parameter 04 '
*
* Register EQUates
*
R0 EQU 0
R1 EQU 1
R2 EQU 2
R3 EQU 3
R4 EQU 4
R5 EQU 5
R6 EQU 6
R7 EQU 7
R8 EQU 8
R9 EQU 9
R10 EQU 10
R11 EQU 11
R12 EQU 12
R13 EQU 13
R14 EQU 14
R15 EQU 15
*
END
Thanks Mervyn. But the problem was with the variable declaration. The compiler is not able to understand DC F(0)
** ASMA035S Invalid delimiter - F _________________ Regds,
Somu
Joined: 02 Dec 2002 Posts: 1618 Topics: 31 Location: San Jose
Posted: Fri Oct 10, 2003 9:02 am Post subject:
Were you trying to get a fullword of 0 with F(0)? If so, the correct syntax is F'0' (in case you haven't figured it out yet). _________________ Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
Thanks Frank and Kolusu.I have figured this when I sent the reply to Mervyn.
I have another doubt. I'm calling a sub program using LINK EP= PGM2 in program PGM1. I'm not passing any PARMS.But in PGM2 I'm capturing some fields and want to use these values in PGM1(Calling program). Both the programs are in ASSEMBLER.
I have searched in IBM site but didn't get much info. Appreciate any link
or tips. _________________ Regds,
Somu
Joined: 02 Dec 2002 Posts: 1618 Topics: 31 Location: San Jose
Posted: Sat Oct 11, 2003 9:52 am Post subject:
One way to do this is to have PGM1 set up a communication area (getmained or obtained or static), pass its address to PGM2, and have PGM2 fill it in for PGM1 to use. As long as PGM1 and PGM2 "map" the communication area in the same way , they can manipulate the fields in that area any way they like. _________________ Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum