Hi!
25-Июн-2004 20:02 [EMAIL PROTECTED] (tom ehlert) wrote to Eduardo Casino
<[EMAIL PROTECTED]>:
>> + lrc = DosSeek(r.BX, (LONG)((((ULONG) (r.CX)) << 16) | r.DX), r.BP);
>> + if (lrc == -1)
>> + lrc = DE_INVLDHNDL;
>> + else
>> + {
>> + r.DX = (UWORD)(lrc >> 16);
>> + lrc = (UWORD) lrc;
>> + }
>> + goto long_check;
>> +long_check:
>> + if (lrc >= SUCCESS)
>> + {
>> + r.AX = (UWORD)lrc;
>> + goto real_exit;
>> + }
te> b) lseek(0x1ffff) will fail due to fall from locng_check into
te> shortcheck.
It shouldn't, because high word of lrc is truncated by
"lrc=(UWORD)lrc". But in _my_ inthndlr.c INT21/42 is rewritten, to make
code simpler and faster:
______________O\_/_________________________________\_/O______________
/* Dos Seek */
case 0x42:
{
sft FAR *s = idx_to_sft(lr.BX);
rc = _SftSeek(s, ((ULONG)lr.CX << 16) | lr.DX, lr.AL);
if (rc >= SUCCESS)
{
lr.DX = (UWORD)(s->sft_posit >> 16);
lr.AX = (UWORD) s->sft_posit;
}
goto short_check;
}
_____________________________________________________________________
O/~\ /~\O
(here _SftSeek() is a new function, which is common for INT21/42 and
SftSeek(); DosSeek() is removed).
-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 -
digital self defense, top technical experts, no vendor pitches,
unmatched networking opportunities. Visit www.blackhat.com
_______________________________________________
Freedos-kernel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freedos-kernel