/** asma - aka tolower() first 16 bytes. * * unsigned char *asma(unsigned char *s) * { * int i; * for (i=0; i<16; i++) * { * unsigned char c = s[i]; * c += (c >= 'A' && c <= 'Z') ? 'a'-'A' : 0; * s[i] = c; * } * return s; * } */ /* AMD64 Little Endian byte order * p[0] c0 c1 c2 c3 c4 c5 c6 c7 * p[1] c1 c2 c3 c4 c5 c6 c7 c8 * p[1] * 256 00 c1 c2 c3 c4 c5 c6 c7 * p[0] - 256 * p[1] c0 */ /* WISHLIST signed!? p w/o i */ struct f end; method asma() var p := this; var i := 0; while i < 16 do var a := (p-(0-i)).f; var b := (p-(-1-i)).f; var c := a - (256 * b); /* add 'a'-'A' iff 'A' <= c <= 'Z' */ if 0x40 < c then if c < 0x5B then c := c--0x20; end; end; (p-(0-i)).f := (256 * b) -(0-c); i := i--1; end; return this; end;