| SkippyPB 2007-06-23, 9:56 pm |
| On Sat, 23 Jun 2007 16:31:37 +1200, "Pete Dashwood"
<dashwood@removethis.enternet.co.nz> wrote:
>
>"Joel C. Ewing" <jcREMOVEewing@CAPS.acm.org> wrote in message
>news:de0fi.102$tj6.15@newsread4.news.pas.earthlink.net...
>Thanks Joel. This helped me put my finger on what it was that flagged it to
>me. I came out of the background you describe and I'm sure you're right
>about the BR 14 vs SVC (I think it was 15 or 16, can't really remember
>now...).
>
>But leaving all of that aside, it just seems "illogical" to terminate a main
>program with GOBACK. I accept the idea that it is returning to the OS, but
>that's pretty tenuous, given that EVERYTHING returns to the OS eventually.
>
>You summed it up perfectly:
>
>"...to me using GOBACK to terminate a main program would appear to be a
>violation of the intended
>semantic conventions of COBOL, making it less obvious to a viewer of the
>code that it is intended to be used as a main program. "
>
>I feel much better now... :-)
>
>Pete.
>
Using IBM Assembler, a standard linkage is BALR 14,15 where 14
contains the return address and 15 the address you want to go to.
Therefore, a BR14 is needed in the called program to return to the
next instruction in the calling program. In the case of a main Cobol
program, the BR14 would return to the OPSYS.
Regards,
////
(o o)
-oOO--(_)--OOo-
"I once made love to a female clown. It was weird
because she twisted my penis into a poodle."
--Dan Whitney
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Remove nospam to email me.
Steve
|