I have an assembler program that creates a sub-task using ATTACHX. It sets up a parameter list, pointed to by R01, for the sub-task.
The C code is a main program and so has main (int argc, char *argv[]) It has #pragma environment(main) The program is compiled with SS,LIS,SO,OPT,RENT,LO,NOSTART,DEF(USE_SPC) When I attempt to get at argc and argv, R01 does not point to the right place. So I forced an S0C4 at the very beginning of the C program and got an SVC dump. The system trace table clearly shows the ATTACH SVC entry with R01 pointing to the correct place. TCBFSA of the ATTACHed task points to a save area and the value of R01 is correct. The C sub-task code has prolog code that is called with a BALR R15,R15 and this must be modifying R01. I'm wondering if someone has done this before and got it to work. This C code has to be a sub-task and there is too much C code to rewrite. Any help will be greatly appreciated. Thanks in advance, Pierre. ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN