View previous topic :: View next topic |
Author |
Message |
SrilathaB Beginner
Joined: 29 Dec 2004 Posts: 2 Topics: 1
|
Posted: Fri Jun 10, 2005 12:35 am Post subject: Getting RC '4056' in running Assembler Program |
|
|
Hi
I have written a small assembler program to add two numbers and subtract '1' from the total.
When I assembled the program I got zero return code. But when I am runnning the program
I am getting RC '4056'
Here is the code.
Code: |
PROG1 START 0
*
BALR 12,0
USING *,12
L 1,A
A 1,B
A 1,S1
ST 1,C
BR 14
* END OF PROGRAM
A DC F'3'
B DC F'2'
S1 DC F'-1'
C DS F
END
|
I would like to know why I am getting rc 4056 for this program.
Thanks,
Srilatha. _________________ srilatha Bandi |
|
Back to top |
|
|
nevilh Beginner
Joined: 11 Aug 2004 Posts: 115 Topics: 0
|
Posted: Fri Jun 10, 2005 1:44 am Post subject: |
|
|
Register 15 has not been cleared |
|
Back to top |
|
|
Dibakar Advanced
Joined: 02 Dec 2002 Posts: 700 Topics: 63 Location: USA
|
Posted: Fri Jun 10, 2005 2:01 am Post subject: |
|
|
But what is 4056, I am also getting it if I don't clear R15. |
|
Back to top |
|
|
nevilh Beginner
Joined: 11 Aug 2004 Posts: 115 Topics: 0
|
Posted: Fri Jun 10, 2005 3:22 am Post subject: |
|
|
4056 is x'fd8' which in this case would be the low order part of the load address of the program tha was invoked |
|
Back to top |
|
|
Mervyn Moderator
Joined: 02 Dec 2002 Posts: 415 Topics: 6 Location: Hove, England
|
Posted: Fri Jun 10, 2005 3:53 am Post subject: |
|
|
When I run it, the low order part is x'FC8', which is decimal 4040. I still get return code 4056 though. Where does the extra 16 come from? _________________ The day you stop learning the dinosaur becomes extinct |
|
Back to top |
|
|
Mervyn Moderator
Joined: 02 Dec 2002 Posts: 415 Topics: 6 Location: Hove, England
|
Posted: Fri Jun 10, 2005 4:25 am Post subject: |
|
|
OK, here's an update.
I put in an ABEND macro to show the register contents, and got this result:
Code: |
IEA995I SYMPTOM DUMP OUTPUT 175
USER COMPLETION CODE=0999
TIME=09.33.04 SEQ=37865 CPU=0000 ASID=00E1
PSW AT TIME OF ERROR 078D1000 00007FEA ILC 2 INTC 0D
ACTIVE LOAD MODULE ADDRESS=00007FC8 OFFSET=00000022
NAME=MURPHY
DATA AT PSW 00007FE4 - 00181610 0A0D0000 00000003
GR 0: 80000000 1: 800003E7
2: 00000040 3: 007CA9D4
4: 007CA9B0 5: 007F1768
6: 007ADFE0 7: FD000000
8: 00796100 9: 0079B088
A: 00000000 B: 007F1768
C: 40007FCA D: 00006F60
E: 80FCB1E8 F: 00007FC8
END OF SYMPTOM DUMP
|
Entry address 7FC8, right?
If I replace the ABEND with DC A(0), I get this:
Code: |
IEA995I SYMPTOM DUMP OUTPUT 817
SYSTEM COMPLETION CODE=0C1 REASON CODE=00000001
TIME=10.19.09 SEQ=43503 CPU=0000 ASID=00E1
PSW AT TIME OF ERROR 078D2000 00007FEC ILC 2 INTC 01
ACTIVE LOAD MODULE ADDRESS=00007FD8 OFFSET=00000014
NAME=MURPHY
DATA AT PSW 00007FE6 - 5010C022 00000000 00000000
GR 0: FD000008 1: 00000004
2: 00000040 3: 007CA9D4
4: 007CA9B0 5: 007F1768
6: 007ADFE0 7: FD000000
8: 00796100 9: 0079B088
A: 00000000 B: 007F1768
C: 40007FDA D: 00006F60
E: 80FCB1E8 F: 00007FD8
END OF SYMPTOM DUMP
|
Entry address 7FD8.
I'm confused!
_________________ The day you stop learning the dinosaur becomes extinct |
|
Back to top |
|
|
nevilh Beginner
Joined: 11 Aug 2004 Posts: 115 Topics: 0
|
Posted: Fri Jun 10, 2005 5:03 am Post subject: |
|
|
I used the DC f'0' to get the abend and low order bytes of entry address and return code always correspond if I use standard assembler linkage conventions.
If I use the pgm as coded above I get a discrepancy of 8 bytes between the entry address and the return code |
|
Back to top |
|
|
Mervyn Moderator
Joined: 02 Dec 2002 Posts: 415 Topics: 6 Location: Hove, England
|
Posted: Fri Jun 10, 2005 6:30 am Post subject: |
|
|
I guess that means we're BOTH confused!
The principle's perfectly correct, though!
Cheers,
Merv _________________ The day you stop learning the dinosaur becomes extinct |
|
Back to top |
|
|
Dibakar Advanced
Joined: 02 Dec 2002 Posts: 700 Topics: 63 Location: USA
|
Posted: Fri Jun 10, 2005 10:41 pm Post subject: |
|
|
One more question, why does everybodies program gets loaded at the same address? |
|
Back to top |
|
|
Dibakar Advanced
Joined: 02 Dec 2002 Posts: 700 Topics: 63 Location: USA
|
Posted: Fri Jun 10, 2005 11:23 pm Post subject: |
|
|
I did a DC F'0' with this code and this is what I got -
Code: |
GR 0: FD000008 1: 00000004
2: 00000040 3: 009C99D4
4: 009C99B0 5: 009EFE88
6: 009B2FE0 7: FD000000
8: 009FD160 9: 009C8D28
A: 00000000 B: 009EFE88
C: 40007FD2 D: 00006F60
E: 80FCC568 F: 00007FD0
|
Rgeister 15 is different fom those obtained by Mervyn. |
|
Back to top |
|
|
SrilathaB Beginner
Joined: 29 Dec 2004 Posts: 2 Topics: 1
|
Posted: Sat Jun 11, 2005 12:06 am Post subject: |
|
|
Thanks Mervyn!
I also used ABEND with DC A(0), I too got same results .
The Reg R15 is contains F: 00007FD8.
But when I am expediting I am getting R15 value as
R15 ==> 000070E0
Plz can anybody let me know why different value is coming while expediting.
Thanks,
Srilatha. _________________ srilatha Bandi |
|
Back to top |
|
|
nevilh Beginner
Joined: 11 Aug 2004 Posts: 115 Topics: 0
|
Posted: Sat Jun 11, 2005 3:49 am Post subject: |
|
|
Dibakar;The reason programs get lo loaded at more or less the same point (24 bit residency) is that at address space creation time the system will copy the PSA into the first 4k and after this storage is reserved for system getmains (16k I think) and then the system will put what it requires in and then your program will be loaded. There is a good description of this in one of the Initialization and Tuning manuals |
|
Back to top |
|
|
Dibakar Advanced
Joined: 02 Dec 2002 Posts: 700 Topics: 63 Location: USA
|
Posted: Sat Jun 11, 2005 5:12 am Post subject: |
|
|
Thanks nevilh. |
|
Back to top |
|
|
|
|