Lindy:
You mention moving a nibble but your INTENDED code doesn't do that. You are
just moving the 9A from the LO byte to the HO byte. A nibble as I recall is 4
bits of a byte, either the LO or HO 4. To move out a nibble:
LA R4,X'9A'
SRDL R4,4
SRL R5,28
That will yield:
R4= 00000009
R5= 0000000A
Alternatively, to move it to the HO byte of R5 instead of to the LO byte, SRL
R5,4. You could then do a STCM R5 of either the HO byte or the LO byte.
Using the algebraic Shift involves a sign so use the logical.
Bill
> Date: Fri, 28 Dec 2007 14:52:59 +0100> From: [EMAIL PROTECTED]> Subject:
Shifting nibbles to the end of a register> To: [email protected]> > I want
to pull the bits off of a register a nibble at a time. Is SLDL> on an even/odd
register the best way to go?> > If so, I'm having a bit of trouble moving the
bits to the top end. For> example, I want this:> > 0000009A -> 9A000000> > I
thought I could do it this way:> > LA R3,X'9A'> SLA R3,24> > But for some
reason that produces 1A000000 in R3 and I'm not sure why.> Would someone
explain what is happening here?> > Thanks,> Lindy> > (ps Gotta love Don's
assembler coding contest (-: )> >
----------------------------------------------------------------------> For
IBM-MAIN subscribe / signoff / archive access instructions,> send email to
[EMAIL PROTECTED] with the message: GET IBM-MAIN INFO> Search the archives at
http://bama.ua.edu/archives/ibm-main.html
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html