PDA

View Full Version : How exactly does the "movi" instruction work?



Patrick1ab
11-05-2010, 09:40 PM
I would like to copy the 9 LSBs of one register to the 9 MSBs of another register, without changing any other bits.

Is this what "movi" does?

for example:




rgb := %00110100_00010000_01000001_11111111
arg0 := %00000000_01101010_11101011_10100011

movi arg0, rgb

(new arg0 = %11111111_11101010_11101011_10100011)

Mike Green
11-05-2010, 09:47 PM
Yes, that's exactly what MOVI does.

Beau Schwabe
11-05-2010, 09:50 PM
Patrick1ab,

As Mike says, but in your example, you have arg0 having more than 32 bits.

bazi
11-05-2010, 09:52 PM
Patrick1ab,

As Mike says, but in your example, you have arg0 having more than 32 bits.
It's a 33bit looong ;)

Patrick1ab
11-05-2010, 10:00 PM
I can only see 32 bits :-P

Thanks for your replies.
Now I know, that my approach was right.