Hi All,
I am writing a code for the following algorithm:
b7 = g7
b6 = b7 xor g6
b5 = b6 xor g5
.......
b0 = b1 xor g0
In the above, assuming g7 - g0 is in Wreg initially!
I came up with the following code as attached!
I posted it here coz I NEVER took the time to learn how to simulate codes with MPlab Sim...(I'll try reading on it so I won't post such thang nomore).
As you can notice there is a repetition of a block of code...if the logic is ok, I will turn that block into a macro in order to reduce the number instruction cycles.
BTW, I was tipsy when writing this code so if....yeah...
All comments/critics are welcomed!
I am writing a code for the following algorithm:
b7 = g7
b6 = b7 xor g6
b5 = b6 xor g5
.......
b0 = b1 xor g0
In the above, assuming g7 - g0 is in Wreg initially!
I came up with the following code as attached!
I posted it here coz I NEVER took the time to learn how to simulate codes with MPlab Sim...(I'll try reading on it so I won't post such thang nomore).
As you can notice there is a repetition of a block of code...if the logic is ok, I will turn that block into a macro in order to reduce the number instruction cycles.
BTW, I was tipsy when writing this code so if....yeah...
All comments/critics are welcomed!
Attachments
-
1.2 KB Views: 30