Advertisement
Jong

Switching between the 3rd and 6th bit

Jan 27th, 2013
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //Puts the 3rd bit in dl.
  2. mov al, 1;
  3. shl al, 2;
  4. mov dl, cl;
  5. and dl, al;
  6. //Puts the 6th bit in dh.
  7. mov ah, 1;
  8. shl ah, 5;
  9. mov dh, cl;
  10. and dh, ah;
  11. //Puts the 6th bit instead of the 3rd.
  12. not al;
  13. and cl, al;
  14. shr dh, 3;
  15. or cl, dh;
  16. //Puts the 3rd bit instead of the 6th.
  17. not ah;
  18. and cl, ah;
  19. shl dl, 3;
  20. or cl, dl;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement