Hi!
13-Июн-2006 14:59 [EMAIL PROTECTED] (Andreas Berger) wrote to
[email protected]:
AB> me I was lying when I explained something he thought was inaccurate. Of
AB> course he did not mean I was lying but that what I said was not totally
AB> true (or was inaccurate). I guess that in russian the two meanings use
AB> the same word.
No, these meanings use different words in Russian too.
AB> The moral of the story: Let's not get too excited about the words said,
...especially if language isn't native for speaker.
AB> Now the the real reason for the mail. Arkady said that the int*()
AB> function do not pass on the flags correctly.
They do not do this at all.
AB> Alain asked me to show the way that I often call interrupts (for
AB> efficiencies sake).
AB> __emit__(0x1E); // push ds
AB> _CX = 0x7100 | func;
AB> _BX = FP_OFF(c);
AB> _DS = FP_SEG(c);
AB> _DX = _BX;
AB> _FLAGS |= 1;
AB> _AX = _CX;
AB> geninterrupt(0x21);
AB> __emit__(0x1F); // pop ds
AB> Of course using asm{} is more efficient, but is not C++.
This depends. First, yes - in OW asm{} forces saving all registers on
stack (even if in asm{} no registers used), but TC/BC is smarter in this
(they check, which registers mentioned in instructions). BTW, why you
mention "C++"?
Second, see how much workarounds you apply (store firstly to _CX and
_BX, then move to _DX and _AX) to avoid registers injuring. But with
pseudo-variables you can't guarantee non-injuring - only reviewing listing
may ensure, that with this compiler version your code compiled as expected.
Whereas with asm{} you get only what you wrote - no more, no less.
_______________________________________________
Freedos-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freedos-devel