XLC defines a macro __R1 in stdlib.h. It is the contents of GPR 1 on entry to 
the program. Looking at stdlib, it is #defined as __gtab(12) -- or there may be 
further #defines farther back -- that is as far as I have researched. I am 
guessing __gtab() is a magically-defined internal function. I use __R1 and I am 
totally under control on it, but I have some questions:

1. Where is it documented? As I say, I use it and it works, but I don't recall 
how I learned about it, and wondered if and where it was documented.

2. Is there any equivalent way to get the contents of GPR 0 (short of writing 
an assembler front-end, which is a small PITA of its own)? Why? So a routine 
called from Rexx could get the Environment Block address. Or does anyone have 
another good way of getting that?

3.Any other cool stuff available from __gtab()?

Thanks,
Charles

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

Reply via email to