I\'m in a microprocessors class and we are using assembly language in Freescale CodeWarrior to program a 68HCS12 micro controller. Our assignment this week is to revers a by
For example, if you have in al the byte number the easiest way is
mov al, 10101110
mov ecx, 8
we put 8 in ecx for loop
mov ebx, 0
In bl we will havee the result, we will make ebx, only to see what happens better
loop1:
sal al, 1;
In carry flag now you have the last bit from left
rcr bl, 1;
now you add in bl what you have in carry
loop loop1
and that's all