[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] Another blitting surface to itself crash



Greg Ewing wrote:

Lenard Lindstrom wrote:

The direction of the copy is controlled by a register flag... The flag was set by the SDL copy code, but not cleared afterwards.

Blarg. Modes are a bad thing in machine languages
as well as user interfaces!

Hi Greg,

Yes, I wondered why a flag was used instead of distinct reverse copy instructions. Just as a "movs" instruction is transformed into a string copy by a single byte prefix code "rep", the operation could be reversed with an additional prefix. Maybe Intel thought copy code could be reused for both forwards an backwards copies. Or they wanted to keep the byte count down. But since the data pointers have to be set up specifically for copy direction it probably doesn't make much of a difference.

--
Lenard Lindstrom
<len-l@xxxxxxxxx>