MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Assembler compilation

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming
View previous topic :: View next topic  
Author Message
somuk
Beginner


Joined: 04 Feb 2003
Posts: 113
Topics: 37

PostPosted: Thu Oct 09, 2003 9:44 am    Post subject: Assembler compilation Reply with quote

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

_________________
Regds,
Somu
Back to top
View user's profile Send private message Yahoo Messenger
Mervyn
Moderator


Joined: 02 Dec 2002
Posts: 415
Topics: 6
Location: Hove, England

PostPosted: Thu Oct 09, 2003 3:43 pm    Post subject: Reply with quote

Somu,

You have a blank line after "RETURN (14,12),RC=8 "

Try removing it.
_________________
The day you stop learning the dinosaur becomes extinct
Back to top
View user's profile Send private message
somuk
Beginner


Joined: 04 Feb 2003
Posts: 113
Topics: 37

PostPosted: Fri Oct 10, 2003 12:24 am    Post subject: Reply with quote

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
Back to top
View user's profile Send private message Yahoo Messenger
Frank Yaeger
Sort Forum Moderator
Sort Forum Moderator


Joined: 02 Dec 2002
Posts: 1618
Topics: 31
Location: San Jose

PostPosted: Fri Oct 10, 2003 9:02 am    Post subject: Reply with quote

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
Back to top
View user's profile Send private message Send e-mail Visit poster's website
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Fri Oct 10, 2003 9:37 am    Post subject: Reply with quote

Somu,

The following Piece of code compiles successfully.

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                                                           



Hope this helps...

cheers

kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
somuk
Beginner


Joined: 04 Feb 2003
Posts: 113
Topics: 37

PostPosted: Sat Oct 11, 2003 2:26 am    Post subject: Reply with quote

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
Back to top
View user's profile Send private message Yahoo Messenger
Frank Yaeger
Sort Forum Moderator
Sort Forum Moderator


Joined: 02 Dec 2002
Posts: 1618
Topics: 31
Location: San Jose

PostPosted: Sat Oct 11, 2003 9:52 am    Post subject: Reply with quote

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
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
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


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group