Click here to Skip to main content
15,915,163 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionAny assembly geeks out there? Pin
Chris Losinger13-Jan-03 8:55
professionalChris Losinger13-Jan-03 8:55 
AnswerRe: Any assembly geeks out there? Pin
Rama Krishna Vavilala13-Jan-03 9:00
Rama Krishna Vavilala13-Jan-03 9:00 
GeneralRe: Any assembly geeks out there? Pin
Chris Losinger13-Jan-03 9:11
professionalChris Losinger13-Jan-03 9:11 
AnswerRe: Any assembly geeks out there? Pin
Tim Smith13-Jan-03 9:12
Tim Smith13-Jan-03 9:12 
GeneralRe: Any assembly geeks out there? Pin
Chris Losinger13-Jan-03 9:15
professionalChris Losinger13-Jan-03 9:15 
GeneralRe: Any assembly geeks out there? Pin
Tim Smith13-Jan-03 9:25
Tim Smith13-Jan-03 9:25 
AnswerRe: Any assembly geeks out there? Pin
Chris Richardson13-Jan-03 10:30
Chris Richardson13-Jan-03 10:30 
AnswerRe: Any assembly geeks out there? Pin
Chris Losinger13-Jan-03 10:54
professionalChris Losinger13-Jan-03 10:54 
just FYI, this takes less than 15% of the time of the first invert loop i posted:

int z;
BYTE *pb = pBuf;

// handle non-aligned lead bytes
UINT32 uLeadUp = (DWORD)pBuf & 0x03;
for (z=0;z < uLeadUp;z++)
{
   *pb = ~(*pb);pb++;
}

uLen-=uLeadUp;

// handle as many aligned dwords as we can
UINT32 dwords = uLen / 4;
UINT32 leftovers = uLen % 4;

DWORD *p = (DWORD*)pb;

for (z=0;z < dwords;z++)
{
   *p = ~(*p);
   p++;
}

pb+=4; // skip that last DWORD

// finish the tail
for (z=0;z < leftovers;z++)
{
   pb[z] = ~pb[z];
}


-c



I'm not the droid you're looking for.

GeneralRe: Any assembly geeks out there? Pin
Chris Richardson13-Jan-03 11:48
Chris Richardson13-Jan-03 11:48 
GeneralRe: Any assembly geeks out there? Pin
Tim Smith13-Jan-03 12:04
Tim Smith13-Jan-03 12:04 
GeneralRe: Any assembly geeks out there? Pin
Chris Richardson13-Jan-03 12:13
Chris Richardson13-Jan-03 12:13 
AnswerRe: Any assembly geeks out there? Pin
nde_plume13-Jan-03 11:48
nde_plume13-Jan-03 11:48 
GeneralWindow position Pin
electronicman_x13-Jan-03 8:18
electronicman_x13-Jan-03 8:18 
Generaltext formatting question. Pin
Maximilien13-Jan-03 8:06
Maximilien13-Jan-03 8:06 
GeneralForget it, I found it ... Pin
Maximilien13-Jan-03 8:11
Maximilien13-Jan-03 8:11 
GeneralChanging MessageBox button captions. Pin
rghin13-Jan-03 7:23
rghin13-Jan-03 7:23 
GeneralRe: Changing MessageBox button captions. Pin
Navin13-Jan-03 7:23
Navin13-Jan-03 7:23 
GeneralRe: Changing MessageBox button captions. Pin
Jim A. Johnson13-Jan-03 7:34
Jim A. Johnson13-Jan-03 7:34 
GeneralRe: Changing MessageBox button captions. Pin
Nish Nishant13-Jan-03 8:46
sitebuilderNish Nishant13-Jan-03 8:46 
GeneralGetting Hardware Profile in Win9x Pin
Jim Hewitt13-Jan-03 7:11
Jim Hewitt13-Jan-03 7:11 
Generalspawning of process Pin
wavk13-Jan-03 6:54
susswavk13-Jan-03 6:54 
GeneralRe: spawning of process Pin
Navin13-Jan-03 7:25
Navin13-Jan-03 7:25 
GeneralAdding right click menu to CDialogBar Pin
Aaron Schaefer13-Jan-03 6:56
Aaron Schaefer13-Jan-03 6:56 
GeneralSaving window state of docking window Pin
Aaron Schaefer13-Jan-03 6:46
Aaron Schaefer13-Jan-03 6:46 
GeneralRe: Saving window state of docking window Pin
Maximilien13-Jan-03 6:56
Maximilien13-Jan-03 6:56 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.