I once worked together for 2 years with a russian programmer. It took me
some time to get used to what he said. I remember the first time he told
me I was lying when I explained something he thought was inaccurate. Of
course he did not mean I was lying but that what I said was not totally
true (or was inaccurate). I guess that in russian the two meanings use
the same word.
The moral of the story: Let's not get too excited about the words said,
but try to understand the spirit it was said in. I think Arkady really
was trying to help, just that the russian way of saying things may seem
harsh to some westerners.
Now the the real reason for the mail. Arkady said that the int*()
function do not pass on the flags correctly.
Arkady V.Belousov wrote:
> BC> - r.r_ax = func;
> BC> + r.r_ax = 0x7100 | func;
> BC> + r.r_dx = FP_OFF( path );
> BC> r.r_ds = FP_SEG(path);
> BC> + r.r_flags = 1;
> BC> + intr( 0x21, &r );
>
> Again bug: you have no ways to pass _your_ Carry flag value into
> interrupt through int*() functions.
>
Alain asked me to show the way that I often call interrupts (for
efficiencies sake).
__emit__(0x1E); // push ds
_CX = 0x7100 | func;
_BX = FP_OFF(c);
_DS = FP_SEG(c);
_DX = _BX;
_FLAGS |= 1;
_AX = _CX;
geninterrupt(0x21);
__emit__(0x1F); // pop ds
Of course using asm{} is more efficient, but is not C++.
_______________________________________________
Freedos-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freedos-devel