MASM display array

  1. Include Irvine32.inc
  2. .data
  3.     total byte "result : ", 0dh, 0ah, 0
  4.     arrayW dword 1, 2, 8, 4, 5, 6
  5.     cal dword 0
  6.     num dword 0
  7. .code
  8.     main proc
  9.     mov ecx, 5
  10.     mov eax, 0
  11.     mov edx, 0
  12.     mov ebx, 4
  13.     L1:
  14.     add cal, ebx
  15.     mov edx, cal
  16.     mov eax, [arrayW + edx]
  17.     call writeint
  18.     call crlf
  19.     Loop L1
  20.     mov edx, offset total
  21.     call writestring
  22.     exit
  23.     main endp
  24.     end main


留言

這個網誌中的熱門文章

Codeforces --- string task

Uva 674 ---- coin change

codeforces 271A --- beautiful year