In a message dated 12/04/05 12:01:19 GMT Daylight Time, [EMAIL PROTECTED] writes:
> > [EMAIL PROTECTED] wrote: > >The only snag I can see is if the code for MWDEF, which has to tell > >whether the channel is sent by reference or value, gets it wrong for > >Turbo. This could happen if, for example, MWDEF assumes (wrongly) > >that the parameter is passed by value if the pointer to the Name > >List in the Name Table is -1. I imagine this is very unlikely. > > Oops, I confess I'm pretty new to all this, but for me it looks like > actually this IS how it works: > > move.w 2(a6,a3.l),d0 ;set error return variable > blt.s @1 > ext.l d0 > lsl.l #3,d0 > add.l $18(a6),d0 > move.l d0,error_var(a5) > move.l 0(a6,d0.l),error_id1(a5) > move.l 4(a6,d0.l),error_id2(a5) > @1 > > But I can change everything. I guess the right way to do it is to > check that the type of the parameter is $0203? > > As far as I know BP_LET changes a parameter by copying the value on the maths stack to the address at byte 4 of the parameter entry on the Name Table. I had assumed that this 4-byte pointer would be set. Instead MWDEF seems to be copying both the pointer into the name table as well as the 8-byte entry from the name table. Yes, the type of parameter should indeed be $0203. I assume that at the time the code you quote is obeyed A3 still points to the name table entry for the channel parameter, but that A5 has been set to the address of the window definition (perhaps plus a constant). Cheers George _______________________________________________ QL-Users Mailing List http://www.q-v-d.demon.co.uk/smsqe.htm