On 18 Sep 2010, at 22:25, Tobias Fröschle wrote: > you seem to be taking this from HOT_REXT. Where did you get the sources for > this? > When looking into SMSQ/E sources, there is nothing comparable to what you see > there (sms.lthg is in util_thg_lthg_asm. Nothing in there touches memory on > negative offsets to the linkage block (and, instead of linking in "manually", > the mem.llst vector is used), at least in my version of SMSQ/E. > And, you're right, the code you cite boils down to the two instructions you > mention. The documentation mentions that the linkage block needs to be memory > allocated through sms.alchp, so -12(a1) actually seems to be pointing into > the heap header and mangles something in there.
The source code I quote from is in fact from SMSQ/E but the instructions will almost certainly be the same as in HOT_REXT. The code to load a thing is, as Tobias says, in util_thg_lthg_asm. This calls the routine th_newth which contains the peculiar instructions, This routine is in util_thg_usage_asm. If you allocate space using sms.alchp you will find that -12 from the start is where the ID of the calling job is in the header for the space. Surely it is silly to overwrite that! George _______________________________________________ QL-Users Mailing List http://www.q-v-d.demon.co.uk/smsqe.htm
