Advertisement
olgierd

ASK_ZAD6

Dec 10th, 2018
156
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //Zadanie 6: Napisz kod w asemblerze odpowiadający poniższemu fragmentowi kodu w C.
  2. // (wyjscie = wejscie * 20)
  3. unsigned char a = 0x02;
  4.     unsigned char wynik;
  5.     _asm {
  6.         Mov al, a
  7.         Mov bl, a
  8.         Shl al, 5
  9.         Shl bl, 2
  10.         Sub al, bl
  11.         Shl bl, 1
  12.         Sub al, bl
  13.  
  14.         Mov wynik, al
  15.     }
  16.     printf("%d * 20 = %d", a, wynik);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement