_takumi

hw3n13.asm

Feb 21st, 2022 (edited)
351
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. %include "io.inc"
  2.  
  3. section .bss
  4.     arr resd 10000
  5.  
  6. section .text
  7. global CMAIN
  8. CMAIN:
  9.     mov ebp, esp; for correct debugging
  10.     GET_DEC 4, eax
  11.     xor ecx, ecx
  12. .readarr:
  13.     cmp ecx, eax
  14.     jge .readarr_end
  15.     GET_DEC 4, edx
  16.     mov dword [arr + ecx * 4], edx
  17.     inc ecx
  18.     jmp .readarr
  19. .readarr_end:
  20.     GET_DEC 1, cl
  21.     mov ebx, 1
  22.     shl ebx, 31
  23.     sar ebx, cl
  24.     rol ebx, cl
  25. .loop:
  26.    
  27.     xor eax, eax
  28.     ret
Add Comment
Please, Sign In to add comment