Page 1 of 1

In assembler, how can we initialize the register to 0000?

Posted: Wed Jul 01, 2015 12:08 pm
by RoyW
Hi,

In assembler, how can we initialize the register to 0000? Are there some best practices to choose from? Appreicate your help.

Re: In assembler, how can we initialize the register to 0000

Posted: Wed Jul 01, 2015 3:14 pm
by enrico-sorichetti

Code: Select all

         SR    <your-reg>,<your-reg>
         ...
         XR    <your-reg>,<your-reg>
once upon a time
( when people looked at the smallest details to squeeze everything out of the CPU available )
XR was preferred for being slightly faster

nowadays the issue is probably irrelevant

Re: In assembler, how can we initialize the register to 0000

Posted: Tue Jul 21, 2015 10:22 pm
by RoyW
enrico thanks for your help.