WSA is the writable static area. If your using static variables in your Metal/C code you will need to allocate the storage. It's all in the manual which I suggest you read. Metal/C is a tricky environment to use if you expect it to be just like using LE C.

On 2020-01-26 11:23 AM, Joseph Reichman wrote:
Hi

I have been getting S0C4 on initialization to my Metal C program seems like
the local/stack storage are addressed off register 0 this is the compiler
code (  ST    0,#WSA_1 ) WSA must stand for working storage. I complied the
program as re-entrant. So I would assume the compiler would get storage and
point off 13.  To invoke the program LOAD EP=  an do LR R15,0 and BASR to it

So when I get into my program register 0 points to the entry point My fix
around this was to have prologue code (via pragma prolog which points R0 to
storage that had been obtained by the storage macro. Enough to cover
register save area of my routines and the largest local area for any of my
routines

thanks


----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to