Skip to Main Content
Itanium® Architecture for Programmers: Understanding 64-Bit Processors and EPIC Principles
book

Itanium® Architecture for Programmers: Understanding 64-Bit Processors and EPIC Principles

by James S. Evans - Lawrence University, Gregory L. Trimper - viika
April 2003
Intermediate to advanced content levelIntermediate to advanced
576 pages
15h 13m
English
Pearson
Content preview from Itanium® Architecture for Programmers: Understanding 64-Bit Processors and EPIC Principles

6.8. BACKWARD: Using Byte Manipulations

We now develop a somewhat more complex program that uses the capability just illustrated to obtain and print characters. The BACKWARD program (Figure 6-8) obtains and stores a line of text. It then accesses the stored bytes in such a way as to reverse their order completely. Input such as evil will be printed as live.

Figure 6-8. BACKWARD: An illustration of accessing bytes
 // BACKWARD Print a string backwards // This program pauses for the user to enter a line // of text, and prints that text backwards. NL = 0xa // Newline character LEN = 96 // Line length allowed .global chrget,chrput // External references .type chrget,@function // and their .type chrput,@function // types .data // Declare storage .align ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

ARM System Developer's Guide

ARM System Developer's Guide

Andrew Sloss, Dominic Symes, Chris Wright
Intel Xeon Phi Processor High Performance Programming, 2nd Edition

Intel Xeon Phi Processor High Performance Programming, 2nd Edition

James Jeffers, James Reinders, Avinash Sodani

Publisher Resources

ISBN: 0131013726Purchase book