IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Multiple Entry


IBM Mainframe Forums -> PL/I & Assembler
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
josephineyeow

New User


Joined: 12 Mar 2020
Posts: 11
Location: USA

PostPosted: Sat Jul 25, 2020 1:07 am
Reply with quote

I have assembler program with

ENTRY labelA
ENTRY labelB
LabelA ... assembler code
LabelB ... assembler code

I understand this program can be called for LabelA or LabelB
Question - does execution of LabelA code includes execution of LabelB after or does execution of LabelA result in return to calling program
Back to top
View user's profile Send private message
prino

Senior Member


Joined: 07 Feb 2009
Posts: 1306
Location: Vilnius, Lithuania

PostPosted: Sat Jul 25, 2020 1:36 am
Reply with quote

That's entirely up to you. You can code it to do either.
Back to top
View user's profile Send private message
josephineyeow

New User


Joined: 12 Mar 2020
Posts: 11
Location: USA

PostPosted: Sat Jul 25, 2020 2:21 am
Reply with quote

Thank you. It was the first I’ve seen of an assembler program with more than 1 ENTRY. Guess if I don’t want processing of LabelA to be followed by processing of LabelB I should a conditional Branch.
Back to top
View user's profile Send private message
steve-myers

Active Member


Joined: 30 Nov 2013
Posts: 917
Location: The Universe

PostPosted: Sat Jul 25, 2020 4:15 am
Reply with quote

As prino says, the mechanics are up to you.

I have one TSO command processor with 3 entry points. 90% of the processing is identical, and the code, obviously, is shared. Each entry point implies options, and the entry point that is used sets the options.

I have another program with 3 entry points. Each entry point is a subroutine with distinct code, There is no shared code between the 3 subroutines. The primary routine is used to format messages. One of its formats converts the decimal time of day as returned by TIME DEC to character strings in various formats. Not too long after I wrote the formatter I started working with SMF data. Its time of day is generally in the time of day format as returned by TIME BIN. The code to convert from binary time of day to packed decimal time of day is tricky enough I don't want to recode it all the time, so I wrote the conversion routine and added it as a fully independent subroutine with its own ENTRY statement. Even then I goofed. It takes its time of day in reg 0 (as from TIME BIN) and returns the decimal time of day in reg 0 (as from TIME DEC). So most of my programs that process SMF data have a subroutine to load the binary time of day from storage into reg 0, call the binary time of day to decimal time of day routine, and store the decimal time of day over the binary time of day.

The third entry point left justifies a character string that is right justified in a fixed length data area.
Back to top
View user's profile Send private message
josephineyeow

New User


Joined: 12 Mar 2020
Posts: 11
Location: USA

PostPosted: Mon Jul 27, 2020 8:15 pm
Reply with quote

Sure learning a lot of assembler. I'm basically a dinosaur cobol programmer now in a project to move assembler to cobol (worked on assembler eons ago and tried to forget the pain). It's nice to know I can count on support. THANK YOU. icon_lol.gif
Back to top
View user's profile Send private message
Phrzby Phil

Senior Member


Joined: 31 Oct 2006
Posts: 1042
Location: Richmond, Virginia

PostPosted: Mon Jul 27, 2020 11:54 pm
Reply with quote

I learned a little FORTRAN in high school (1964).

When I took my first college computer course and learned assembler (Control Data 1604) I really got hooked - fun and also a good challenge.

My programming career was all non-assembler (mostly FORTRAN, COBOL, APL, BASIC, PL/I, SAS), but the few times I taught programming I always included assembler, even if a simple mock up on paper or simulated, so that my students always knew what was really going on.

Of course, languages like SAS are interpreted, rather than being compiled into pure machine language, but that's another issue.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> PL/I & Assembler

 


Similar Topics
Topic Forum Replies
No new posts INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts Multiple table unload using INZUTILB DB2 2
No new posts Grouping by multiple headers DFSORT/ICETOOL 7
No new posts How to append a PS file into multiple... JCL & VSAM 3
Search our Forums:

Back to Top