On 8/6/2013 12:48 PM, John Parke wrote:
Perhaps that is where I am going wrong.


Well, I don't know Metal C linkages, but
some things look suspect to me:

* your parm list is 64-bit addresses - does
  Metal C work with that as default?

* as mentioned, you might need to have R1 point
  to a pointer to your parm list: and the pointer
  should be a 31-bit address

so maybe

   LA  R1,Parms
.
.
.
Parms  dc  a(parmlist)


* Your prolog disturbs me a bit; although I
  am not aware of the Metal C interface it
  seems to go against several conventions:

LARL  R15,@@LIT@2
Using @@LIT@2,R15
STMG  R14,R12,8(R13)
LGR   R9,R1     Save R1

LGR   R2,R0     <-- Save R0
LGHI  R0,312    <-- Load x'0138' into R0, pad left with binary 0's
LA    R1,1      <-- Load x'00000001' into right hand word (RHW) of R0
SLL   R1,20     <-- this shift results in x'00100000' in RHW of R0
AGR   R0,R1     <-- R0 now contains x'00000000 00100138' (why?)
 <-- and why such a convoluted path to get, essentially,
 <-- a constant result?

Storage Obtain  <-- what parameters are you specifying?

.
.
.

-Steve Comstock

Reply via email to