王爽 汇编语言 实验五第5题和第6题

时间:2022-05-01 01:30:08
assume cs:code

a segment
db 1,2,3,4,5,6,7,8
a ends

b segment
db 1,2,3,4,5,6,7,8
b ends

c segment
db 0,0,0,0,0,0,0,0
c ends

code segment
start:
mov cx , 8
mov bx , 0
s:mov dl , 0

mov ax , a
mov ds , ax
add dl , ds:[bx]

mov ax , b
mov ds , ax
add dl , ds:[bx]

mov ax , c
mov ds , ax
add ds:[bx] , dl
inc bx
loop s

MOV AX,4C00H
INT 21H
code ends

end start



王爽 汇编语言 实验五第5题和第6题


assume cs:code

a segment
dw 1,2,3,4,5,6,7,8
a ends

b segment
dw 0,0,0,0,0,0,0,0
b ends

code segment
start:
mov ax , b
mov ss , ax
mov sp , 10h

mov ax , a
mov ds , ax
mov bx , 0
mov cx , 8
s: push ds:[bx]
add bx , 2
loop s

MOV AX,4C00H
INT 21H
code ends

end start

王爽 汇编语言 实验五第5题和第6题