well, I know that CLD clears direction flag and STD sets direction flag. but what\'s the point in setting and clearing direction flag?
If using Windows, then as per the STDCALL calling convention -
Under STDCALL, the direction flag is clear on entry and must be returned clear.
So if you set DF, then before an API call you must clear it.