汇编_数组求和

data segment
  array dw 1,2,3,4
  sum dw ?
data ends

code segment
  assume cs:code ,ds:data
start:
     mov ax,data
     mov ds,ax

     mov cx,4
     mov ax,0
LP:
    add ax,[bx]
    inc bx
    loop LP

    mov ax,4cx
    int 21h
code ends
   end start
posted @ 2018-12-19 18:37  IAMjm  阅读(1292)  评论(1编辑  收藏  举报