Hi!
24-Июл-2004 14:37 [EMAIL PROTECTED] (Bart Oldeman) wrote to
[EMAIL PROTECTED]:
BO> apart from the drawbacks there is another problem:
BO> mov bp, [bp + 20] ; store id (in SS:) unless it's NULL
BO> or bp, bp
BO> jz nostore
BO> mov [bp], bx
BO> nostore:
>> if (*id)
>> *id = r.b.x;
[above code from tom's patch, where he tries to replace asm by C code]
BO> The first * in this part is wrong, and also id lives on the stack, but
BO> SS!=DS here (!), see the comments elsewhere in nls.c.
Line 114:
COUNT muxLoadPkg(UWORD cp, UWORD cntry)
{
UWORD id; /* on stack, call_nls in int2f.asm takes care of this
* if DS != SS */
BO> it would need to be
BO> if (id != NULL) /* or if (id) */
BO> poke(_SS, id, r.b.x);
Yes. Very ugly. :(
BO> returning a "long" (or a struct with two ints, but I'm not sure if all
BO> compilers we use put that in dx:ax)
BC does, TC does, OW does. Don't know about MSVC, but I doubt that it
doesn't.
BO> would be another way to avoid this, and save a bit of stack space too.
Hm. You mean, return in DX value of BX instead storing it at *id?
-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_idG21&alloc_id040&op=click
_______________________________________________
Freedos-kernel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freedos-kernel