IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

What are Assembler directives ?


IBM Mainframe Forums -> PL/I & Assembler
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Harsh Pawar

New User


Joined: 04 Jun 2008
Posts: 25
Location: Noida

PostPosted: Thu Jul 23, 2009 12:00 pm
Reply with quote

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
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Thu Jul 23, 2009 2:57 pm
Reply with quote

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Thu Jul 23, 2009 8:28 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> PL/I & Assembler

 


Similar Topics
Topic Forum Replies
No new posts Build dataset list with properties us... PL/I & Assembler 4
No new posts Finding Assembler programs PL/I & Assembler 5
No new posts How Can I Recall a Migrated Data Set ... PL/I & Assembler 3
No new posts step by step trace 4 ISPF dialog call... TSO/ISPF 17
No new posts Getting SOC4 while calling a Cobol DB... PL/I & Assembler 4
Search our Forums:

Back to Top