View previous topic :: View next topic
|
Author |
Message |
Pankaj Shrivastava Currently Banned New User
Joined: 24 Jul 2009 Posts: 51 Location: Pune
|
|
|
|
Hi ,
I encountered following instruction in a program ,
Code: |
AP RECCT2HE,RECCT2C0
SBAL R07,LON1000
ZAP RECCT1C0,=P'0'
|
Could any body help me in understanding , wat does SBAL stands for and wat it does?
Thanks |
|
Back to top |
|
|
prino
Senior Member
Joined: 07 Feb 2009 Posts: 1306 Location: Vilnius, Lithuania
|
|
|
|
Ever considered looking it up on Google or in a manual? |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10872 Location: italy
|
|
|
|
the best thing would be to ask the programmer who wrote the code
looking together at the assembler listing |
|
Back to top |
|
|
Bill O'Boyle
CICS Moderator
Joined: 14 Jan 2008 Posts: 2501 Location: Atlanta, Georgia, USA
|
|
|
|
This instruction does not appear in any POPS manual, which indicates that it is most likely, a home-grown Macro.
What happens when you Assemble the program?
Does SBAL expand correctly or does the Assembler find it unrecognisable?
I don't ever recall such an instruction.
It looks like a customised "BAL" instruction of some sort, based upon the "Rx,Label" convention and the prefixed "S".
You need to speak with the author and attempt to resolve it together....
Bill |
|
Back to top |
|
|
Pankaj Shrivastava Currently Banned New User
Joined: 24 Jul 2009 Posts: 51 Location: Pune
|
|
|
|
Hi ,
Even in the listing it is behaving diffrently , the first SBAL expaned as 0700 and the second one expaned as 5070A460 ,
It appears as if it behaves similar to BAL ( as per code analysis) , I dont understand how it could give different listing ?
Code: |
0700 6679 SBAL R07,WHLD703P
6686 *
00000448 6687 WRITT73L EQU *
95E8 C3D2 000013D1 6688 CLI REC703L1,C'Y'
4770 A464 00000464 6689 BNE WRITT705
5070 A460 00000460 6690 SBAL R07,WHLD703L
|
|
|
Back to top |
|
|
Bill O'Boyle
CICS Moderator
Joined: 14 Jan 2008 Posts: 2501 Location: Atlanta, Georgia, USA
|
|
|
|
Ensure that PRINT GEN is specified in the program so that SBAL can be expanded.
The 0700 indicates the Assembler is attempting alignment.
OPCODE 50 is a ST (RX format) instruction and the remainder concludes it's a ST.
I don't understand why someone would make a ST this complicated?
Cleverness without documentation leads to confusion and unanticipated "opportunities".
Bill |
|
Back to top |
|
|
Pankaj Shrivastava Currently Banned New User
Joined: 24 Jul 2009 Posts: 51 Location: Pune
|
|
|
|
Hi Bill,
It turned out to be a macro and the whole buzz was to just resuse the reigister. This has been wriiten just to screw the programmer like me
Thanks Bill for your help , It speeded my analysis.
Code: |
6691 SBAL R07,WHLD703L
6692+ CNOP 0,4
5070 A460 00000460 6693+ ST R07,*+16
4570 A750 00000750 6694+ BAL R07,WHLD703L
5870 A460 00000460 6695+ L R07,*+8
47F0 A464 00000464 6696+ B *+8
00000000 6697+ DC F'0'
6698 PRINT NOGEN
|
|
|
Back to top |
|
|
Bill O'Boyle
CICS Moderator
Joined: 14 Jan 2008 Posts: 2501 Location: Atlanta, Georgia, USA
|
|
|
|
If this Macro is used in CICS/Assembler, it introduces non-reentrant code.
But regardless, branching using current location counter plus "whatever" can bite you quicker than a scorpion in your shorts.
If someone adds an instruction, storage, etc, within the range of the branch, you're probably going to get a S0C1 (invalid OPCODE) or perhaps, execute an instruction that wasn't supposed to be executed.
Branching to labels is always the best approach and (IMHO) should always be done this way.
Bill |
|
Back to top |
|
|
|