试验5
5.5assume 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 ax,a
mov ds,ax
mov ax,b
mov es,ax
mov ax,c
mov ss,ax
mov dx,0
mov cx,8
s: add dl,ds:
add dl,es:
mov ss:,dl
inc bx
mov dl,0
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,9,0ah,0bh,0dh,0eh,0fh,0ffh
a ends
b segment
dw 0,0,0,0,0,0,0,0
b ends
code segment
start: mov ax,a
mov ds,ax
mov ax,b
mov ss,ax
mov bx,0
mov cx,8
mov sp,16
s: push ds:
add bx,2
loop s
mov ax,4c00h
int 21h
code ends
end start 本帖最后由 major_lyu 于 2020-2-14 22:05 编辑
我的答案。欢迎批评指正
5.5
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 ax, a
mov ds, ax
mov ax, b
mov es, ax
mov ax, c
mov ss, ax
mov sp, 8
mov cx,4
mov bx,8
s:sub bx, 1
mov ah,
add ah, es:
sub bx, 1
mov al,
add al,
push ax
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,9,0ah,0bh,0ch,0dh,0eh,0fh,0ffh
a ends
b segment
dw 0,0,0,0,0,0,0,0
b ends
code segment
start:mov ax, a
mov ds, ax
mov ax, b
mov ss, ax
mov sp,10h
mov cx, 8
s:push
add bx,2
loop s
mov ax, 4c00h
int 21h
code ends
end start
有问题, 5.5 你没有初始化 mov bx, 0
页:
[1]