6.4. SCANTEXT: Processing Bytes

Modern computers are used to do much more than perform mathematical functions. Many applications involve analysis of character data, since characters can be stored and considered one byte at a time, as continuous strings, and even as groups of records.

One might suppose that the extract and deposit instructions would be ideal for working with byte data. Given that accessing memory is slower than using registers, it might be tempting to read data as quad words and then analyze the bytes individually, using loops.

Different operating systems, separated principally into the little-endian camp (e.g., most Linux implementations) and the big-endian camp (e.g., most Unix implementations), store and interpret groups of ...

Get Itanium® Architecture for Programmers: Understanding 64-Bit Processors and EPIC Principles now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.