Hi! Is it possible to write a program on assembler with subroutines in the same file? I.e. the main program begins with the normal "CEEENTRY" macro and then it is calling subroutines belonging to the same CSECT? I'd like not to change the base register, but those subroutines should create new DSAs and all other staff necessary for calling LE services from the subroutines? I want each subroutine to perform a sepatrate function. Does anyone know how to do it?
Like this:
TEST CEEENTRY PPA=MAINPPA,AUTO=WORKSIZE,MAIN=YES,BASE=(R10,R11)
STORAGE OBTAIN,LENGTH=COPYSIZE,LOC=BELOW
LR R9,R1 Move address of storage
L R2,=A(COPYAREA) Point to data to copy
L R3,=A(COPYSIZE) Get size to copy
LR R14,R9 Point to destination
LR R15,R3 Output size = input size
MVCL R14,R2 Copy the data
USING COPYAREA,R9 And now address our copy
* ====================================================================
* First verify that POSIX is ON -- cannot run if not
* ====================================================================
BAL R14,QPOSIX Make sure POSIX enabled
BNZ CLEANUP Failed, get out now
* ====================================================================
* Next let's fetch and display version information.
* ====================================================================
BAL R14,QVERSION Query and display VERSION info
BNZ CLEANUP Failed, get out now
* ====================================================================
* OK, we got and displayed the version. Now create a context.
* ====================================================================
BAL R14,CREATE Create a context
BNZ CLEANUP Failed, get out now
Thank you very much!
Eugene
Subroutines in LE assembler program
-
epesin
- Posts: 1
- Joined: Tue Jun 22, 2010 9:51 pm
- Skillset: Assembler, Rexx, TSO, ISPF, JCL
- Referer: yahoo
-
- Similar Topics
- Replies
- Views
- Last post
-
- 0
- 2828
-
by XY09
View the latest post
Wed Oct 15, 2025 8:18 pm
-
-
Calling Java program on UNIX/USS from a COBOL CICS program?
by zbius » Tue Nov 05, 2024 2:37 pm » in IBM Cobol - 2
- 6486
-
by zbius
View the latest post
Wed Nov 06, 2024 6:02 pm
-
-
- 2
- 5620
-
by enrico-sorichetti
View the latest post
Mon Oct 30, 2023 6:25 pm
-
- 4
- 4395
-
by sergeyken
View the latest post
Mon May 22, 2023 12:52 am
-
- 1
- 4086
-
by engh
View the latest post
Fri Jul 08, 2022 7:31 pm