Advertisement
Guest User

Untitled

a guest
Apr 7th, 2020
168
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.42 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <Windows.h>
  3.  
  4. unsigned short num = 5;
  5. char format[] = "%hu\n";
  6.  
  7. int main(void)
  8. {
  9.     __asm
  10.     {
  11.         mov cx, 6
  12.  
  13.         lp:
  14.         shl num, 1
  15.         mov ax, num
  16.         push ax
  17.         mov ax, offset format
  18.         push ax
  19.         call printf
  20.         pop ax
  21.         pop ax
  22.             dec cx
  23.             cmp cx, 0
  24.             jne lp
  25.     }
  26.    
  27.     //printf("%hu", num);
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement