Advertisement
olgierd

ASK_ZAD5

Dec 10th, 2018
167
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //Zadanie 5: Napisz kod w asemblerze odpowiadający poniższemu fragmentowi kodu w C z wykorzystaniem FLAGI C.
  2. // (if(wejscie<0xC0)wyjscie //=0 else wyjscie = 1)
  3. unsigned char a = 0xC1;
  4.     unsigned char b = 0x0;
  5.     __asm {
  6.         mov al, a;
  7.         mov ah, 0x0;
  8.         add ax, 0x40;
  9.         mov b, ah;
  10.     };
  11.     printf("a = 0x%02X, b = %d", a, b);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement