Working off the standards laid out in the Assembler Services Guide as copied
here:
Unless otherwise defined by the individual interface, the calling program should
expect, upon return, that
v The low halves (Bits 32-63) of GPRs 2 through 13 are unchanged
v The high halves (Bits 0-31) of GPRs 2 through 14 are unchanged
v ARs 2 through 13 are unchanged
v FPRs 8 through 15 are unchanged; The Floating Point Control (FPC) Register is
unchanged with the exception of two fields: the IEEE exception flags and the
data exception code (DXC).
v When return information is provided in GPR 0, 1, and/or 15 (for example return
and reason codes), only bits 32-63 of the register contain the returned value.
I use 64 bits of R15, R0, and R1 without saving/restoring them. I also never
count on them being the same over any kind of CALL or SVC interface.
Given that, I might try:
LG R1,STCKV2 ENDING STCK
SGR R1,STCKV1 MINUS START
LGF R15,PERCENTAGE GET SCALE (ASSUMING IT WAS SAVED AS A FULLWORD)
MLGR R0,R15 ELAPSED * SCALE
DLG R0,=DF'100' DIVIDE BY 100 TO GET PERCENTAGE
STG R1,RESULT SAVE THE ANSWER
One poster pointed out you may not want all the bits of the clock, but that is
something you can deal with outside of this.
Christopher Y. Blaicher
Senior Software Developer
Austin Development Lab
phone: 512.340.6154
mobile: 512.627.3803
fax: 512.340.6647
10431 Morado Circle
Austin, TX 78759