View previous topic :: View next topic
|
Author |
Message |
Harsh Pawar
New User
Joined: 04 Jun 2008 Posts: 25 Location: Noida
|
|
|
|
I understand that Assembler directives are instructions that direct the assembler to do something. Directives does not take any space in memory. ex: EQU , DS....
But when we write DS 1H it takes 2 bytes of memory so is it(DS 1H) a directive ?
Why we get S0C1 when we write DS 1H in our CSECT ??
Regards,
Harry. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
DS 1H is defining two bytes of memory -- Define Storage 1 Halfword. It is not a directive because those two bytes become part of your load module. Depending on what else the program does (such as initializing them to something, perhaps), having two bytes of undefined value in the middle of your program is an excellent way to generate a S0C1 abend. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
But when we write DS 1H it takes 2 bytes of memory |
Why did you do this? Where is it placed in the code?
Quote: |
Why we get S0C1 when we write DS 1H in our CSECT |
We don't. . . If this is defined in the middle of some executable instructions, an 0c1 is quite likely.
The DS 1H can be considered a "working storage" field and it is never a good idea to try to execute working storage. . . |
|
Back to top |
|
|
|