Advertisement
_takumi

asm

Feb 21st, 2022 (edited)
1,490
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.     GET_DEC 4, edx
  14.     mov dword [arr + ecx * 4], edx
  15.     inc ecx
  16.     cmp ecx, eax
  17.     jl .readarr
  18.     xor ecx, ecx
  19. .print:
  20.     mov edx, dword [arr + ecx * 4]
  21.     PRINT_DEC 4, edx
  22.     inc ecx
  23.     cmp ecx, eax
  24.     jl .print
  25.     xor eax, eax
  26.     ret
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement