The task is given: to replace the combination 1011 in the given word with the combination 1101.
I do not fully understand how to do this task:
- I copy the data to the register
- I select the low 4 bits through AND with the mask 1111
- I do CMP c 1011.
- Depending on the result, I do JMP
- I write the result in another register (I'm trying to collect the result in another register)
- I restore the original data in the register (Before applying AND) and make a shift by 1
- I perform all the checks again
- Now we need to combine the results of this iteration with step 5 ... Here at this step I do not understand what to do ... How can I combine the results of the current iteration with the results of the previous iteration in the result register?
I would be grateful if you tell me how to do this or even better, throw an example on TASM.
10111111b? Depending on whether you are checking from left to right or right to left, there will be different results. - VladD