Advertisement
olgierd

ASK_ZAD4

Dec 10th, 2018
1,108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //Zadanie 4: Napisz kod w asemblerze odpowiadający poniższemu fragmentowi kodu w C.
  2. // (If(wejscie == 0x32) wyjscie =0; else wyjscie = 1
  3. unsigned char a = 0x32;
  4. unsigned char b = 0x0;
  5.     __asm {
  6.         mov al, a;
  7.         mov bl, 0x0;
  8.         add al, 0xCE;
  9.         jz skok
  10.             add bl, 0x1;
  11.     skok:
  12.         mov b, bl;
  13.     };
  14.     printf("a = 0x%02X, b = %d", a, b);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement