Hi!
20-Июл-2004 22:04 [EMAIL PROTECTED] (Eric Auer) wrote to
[EMAIL PROTECTED]:
EA> So "small bugfix" must be clarified as "if you use ONE (not sure which)
EA> dsk.c patch from Arkady,
"If you use 2035a...
EA> you *must* also use this 'small bugfix' patch,
...you must apply this patch".
EA> Arkady, if you do not start explaining in more detail WHY you patch
EA> WHAT and HOW,
WHY: bug; my fault. WHAT: dsk.c. HOW: changing source. _Here_ all clear
and fix here is a fix, not change, thus here not need more explanations.
EA> The whole optimization of this code seems to have started because some
EA> compiler created "big" code "if ... then AL=0 else AL=1", with some
EA> jumps...
And because BC doesn't optimizes far pointers and long values.
EA> Or try:
rp->>r_ai->AI_Flag = 0;
EA> if (!(descflags & DF_NOACCESS)) rp->r_ai->AI_Flag++;
Eric, I already say you, that you have not enough experience in
studying listings. Original listing for access AI_Flag includes:
mov es,word ptr [bp-10H]
mov bx,word ptr es:[bx+13H]
mov si,word ptr [bp-0eH]
mov es,word ptr es:[si+15H]
Now double this code, and you get your "optimization". In theory, for some
compilers this may be solved with help of another temporary vatiable:
UBYTE flag = 0; if (...) flag++;
rp->r_ai->AI_Flag = flag;
But, at least for TC/BC, such code (eve with "register" word) usually
generates stack variable.
Thus: least possible 16-bit assembler code is 7-8 bytes. Currently, for
my C code generated 10 bytes. _If_ you wish to optimize it more, try this.
If you find (not suggest!) way to get shorter code (without hardly
disturbing source) - fine. I already do what I may.
EA> Whatever, this discussion has been going on off-list for 10 mails or
EA> so, while we are actually only talking about at most +/- 6 byte
EA> optimization.
So why you continue this thread?
EA> And no, if it is 7 byte, you do not have to write a clarifying answer on
EA> list.
?
-------------------------------------------------------
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