汇编语言(王爽 第三版)实验五

时间:2022-02-22 00:11:45
5)
assume cs:code a segment db 1,2,3,4,5,6,7,8 a ends b segment db 8,7,6,5,4,3,2,1 b ends c segment db 0,0,0,0,0,0,0,0 c ends code segment start: mov ax,a mov ds,ax mov ax,b mov ss,ax mov ax,c mov es,ax mov bx,0 mov cx,8 s: mov al,ds:[bx] add al,ss:[bx] mov es:[bx],ax inc bx loop s mov ax,4c00h int 21h code ends end start

6)

mov ax,a
mov ds,ax

mov ax,b
mov ss,ax
mov sp,10h
mov bx,0
mov cx,8

s:    
push ds:[bx]
add bx,2
loop s