Advertisement
Guest User

Untitled

a guest
Apr 14th, 2019
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //#include <stdlib>
  2. #include <iostream>
  3. #include <cstdio>
  4. int main() {
  5.     short res;
  6.     char a = 19, b = 15, c = 26, d = -14;
  7.     __asm {
  8.         mov cl, c
  9.         mov al, d
  10.         imul cl
  11.         mov cx, ax
  12.         mov bl, b
  13.         mov al, a
  14.         mov ah, 0
  15.         div bl
  16.         mov al, 0
  17.         mov al, ah
  18.         mov ah, 0
  19.         mov res, ax
  20.         add cx, ax
  21.         mov al, a
  22.         imul al
  23.         sub ax, 7
  24.         add cx, ax
  25.         mov res, cx
  26.     }
  27.     printf("\n\n\nres = %d\n\n\n", res);
  28.     printf("%d\n",c*d + a % b + a*a - 7);
  29.     system("pause");
  30.     return 0;
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement