Re: PAINTCTRUCT.rcPaint is empty ?! -- STD because !!!
- From
- tkl_news@rmts.rnd.su (2:50/128.0)
- To
- All ()
- Date
- 1996-06-21T09:15Z
- Area
- SU.WINDOWS.PROG
X-RealName: "Konstantin L. Topanov"
Hi!
>From: Boris Rudakov <Boris_Rudakov@p4.f9.n5054.z2.fidonet.org>
>Message-ID: <31c96c77@p4.f9.n5054.z2.fidonet.org>
>Subject: [News] PAINTCTRUCT.rcPaint is empty ?! -- STD because !!!
>Date: Thu, 20 Jun 96 15:01:01 +0300
>Единственное, что привлекло мое внимание после пары минут
>его разглядывания, была инструкция STD. Я, чисто проформы ради, при выхоле из
>функции, влепил CLD. И запустил. Когда я увидел, что все заработало, дыхание у
>меня перхватило, а мир начал рушиться.
В документации еще к MS C v5.0 было сказано (в той, что на русском
языке ходила), что при написании на ассемблере обязательно оставляйте
направление 'CLD', т.к. RunTime это предполагает и не устанавливает...
А вот кусочек из документации по VC++ v1.52c
----------------------------------------------------------------------
Preserving Registers with the Inline Assembler
An __asm block inherits whatever register values happen to result from
the normal flow of control. Within a function, you do not need to
preserve the AX, BX, CX, DX, or ES registers. You should preserve DI,
SI, DS, SS, SP, and BP.
If your function changes the direction flag using the STD or CLD
instructions, you should restore the flag to its original value.
If the return value is a char, int, or near pointer, use the AX
register. If the return value is a long or a far pointer, place
the high word in DX and the low word in AX. To return a value longer
than that, store the value in memory and return a pointer to it.
-----------------------------------------------------------------------
Regards,
--
Konstantin L. Topanov
phone: +7-(863-2)-32-43-36, RMTS, Rostov-na-Donu, RUSSIA
---
* Origin: RMTS (2:50/128.0@fidonet)