Hi numpad1,
If you are looking for a Pelles C example :
#include <stdio.h>
#define a 97
#define z 122
char *szUpper(char *text)
{
__asm{
mov eax, text
dec eax
@repeat:
add eax, 1
cmp BYTE PTR [eax], 0
je @end
cmp BYTE PTR [eax], a
jb @repeat
cmp BYTE PTR [eax], z
ja @repeat
sub BYTE PTR [eax], 32
jmp @repeat
@end:
}
return text;
}
int main(int argc,char *argv[])
{
char message[]="string converted to uppercase";
printf("%s",szUpper(message));
return 0;
}