Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Why/when we go for an assembler program?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> PL/I & Assembler
View previous topic :: :: View next topic  
Author Message
yugendran

New User


Joined: 14 Dec 2007
Posts: 51
Location: indore

PostPosted: Mon May 17, 2010 11:16 am    Post subject: Why/when we go for an assembler program?
Reply with quote

Hi Guys,

when/why we go for an assembler program if we can complete the same with other languages like COBOL etc.

If the answer is performance/efficiency, could you pls just elaborate on that with examples?

could you pls give me some examples where we have to use only assembler? ie the things which can't be handled by other languages..

Thanks,
Yuge
Back to top
View user's profile Send private message

Garry Carroll

Active Member


Joined: 08 May 2006
Posts: 990
Location: Dublin, Ireland / Edinburgh, Scotland

PostPosted: Mon May 17, 2010 12:57 pm    Post subject:
Reply with quote

If you look at the LIST output from Cobol or PL/1, you can see how generalised the generated code is in certain areas. Writing in Assembler, you can avoid these generalisations and be more specific. This reduces the instruction path-length and this can improve run-time efficiency.

Some exits available in software packages must be written in Assembler, so if these are required you must code Assembler.

Garry.
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2422
Location: Netherlands, Amstelveen

PostPosted: Mon May 17, 2010 1:24 pm    Post subject:
Reply with quote

Accessing system control blocks is mostly done in assembler.
Back to top
View user's profile Send private message
yugendran

New User


Joined: 14 Dec 2007
Posts: 51
Location: indore

PostPosted: Mon May 17, 2010 2:40 pm    Post subject: Reply to: Why/when we go for an assembler program?
Reply with quote

@Garry,

Thanks for the reply.. It would be very helpful if you pls explain the below point with example?

"If you look at the LIST output from Cobol or PL/1, you can see how generalised the generated code is in certain areas. Writing in Assembler, you can avoid these generalisations and be more specific. This reduces the instruction path-length and this can improve run-time efficiency."

Thanks again.. icon_smile.gif
Back to top
View user's profile Send private message
Garry Carroll

Active Member


Joined: 08 May 2006
Posts: 990
Location: Dublin, Ireland / Edinburgh, Scotland

PostPosted: Mon May 17, 2010 3:07 pm    Post subject:
Reply with quote

The pseudo-assembler from a PL/1 OPEN of a file

Code:
                ST       r1,_temp1(,r13,200)         
                L        r1,MYFILE(,r6,8)           
                ST       r1,_temp1(,r13,196)         
                ST       r0,_temp1(,r13,192)         
                LA       r0,_temp1(,r13,192)         
                L        r15,=V(IBMQOFOP)(,r3,6)     
                LA       r1,#MX_TEMP1(,r13,152)     
                ST       r0,#MX_TEMP1(,r13,152)     
                BASR     r14,r15                     


which involves a call to external routine IBMQOFOP compares with an assembler OPEN macro expansion


Code:
+         CNOP  0,4             
+         BAL   1,*+8           
+         DC    AL1(128)         
+         DC    AL3(MYFILE)       
+         SVC   19               


The generalisation is in the IBMQOFOP routine which caters for many file types.

The same holds true for many code expansions in high-level languages.

Garry.
Back to top
View user's profile Send private message
yugendran

New User


Joined: 14 Dec 2007
Posts: 51
Location: indore

PostPosted: Mon May 17, 2010 3:14 pm    Post subject: Reply to: Why/when we go for an assembler program?
Reply with quote

Thanks a lot Garry!!! It helps...
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7913
Location: Bellevue, IA

PostPosted: Mon May 17, 2010 4:47 pm    Post subject:
Reply with quote

One case where assembler comes in handy is when vendors are writing programs to access multiple files of different length records. COBOL, for example, requires at compile time that the record length be known since the FD must be completed. This information can be deferred to run time with assembler.
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Mon May 17, 2010 7:50 pm    Post subject:
Reply with quote

Hello,

Quote:
when/why we go for an assembler program if we can complete the same with other languages like COBOL etc.
There are many "things" that assembler does and cobol and other high-level languages do not. . . Like the cases Peter and Robert mentioned along with the considerations from Garry.

Usually, assembler is not chosen when the program can be implemented using the "standard" application development language for the organization. There are fewer and fewer solid assembler people in the business icon_sad.gif
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2422
Location: Netherlands, Amstelveen

PostPosted: Mon May 17, 2010 8:51 pm    Post subject:
Reply with quote

Quote:

There are fewer and fewer solid assembler people in the business


Yes Dick,

we (I) belong to a dying breed. icon_eek.gif
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Mon May 17, 2010 8:57 pm    Post subject: Reply to: Why/when we go for an assembler program?
Reply with quote

we should apply UNESCO to be included in the protected world heritage treasures icon_biggrin.gif
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2422
Location: Netherlands, Amstelveen

PostPosted: Mon May 17, 2010 9:58 pm    Post subject: Re: Reply to: Why/when we go for an assembler program?
Reply with quote

enrico-sorichetti wrote:
we should apply UNESCO to be included in the protected world heritage treasures icon_biggrin.gif


Absolutely Enrico,

but do we IT people fit in this "Social and Human Sciences" program?
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Mon May 17, 2010 10:14 pm    Post subject:
Reply with quote

Quote:
"Social and Human Sciences"


more likely, archeology icon_lol.gif
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> PL/I & Assembler All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts I can not compile my program PL1 V3.R... Miguel Fernandez PL/I & Assembler 13 Tue Dec 06, 2016 8:30 pm
No new posts IMS BMP program causes 878 system abend Artemk IMS DB/DC 7 Tue Nov 22, 2016 8:26 pm
No new posts A sample of exit program for exit XMN... lind sh CICS 2 Mon Oct 03, 2016 5:07 pm
No new posts Need points to tune IMS Checkpoint Pr... satish.ms10 IMS DB/DC 2 Fri Sep 30, 2016 4:12 pm
No new posts ISPF program to set SCRNAME prino TSO/ISPF 5 Fri Sep 30, 2016 2:18 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us