汇编语言的题目 要求用emu8086解决

题目就是这样子啦 大神帮帮忙
2024-12-30 22:54:08
推荐回答(1个)
回答1:

code segment
assume cs:code
d_buf db 1,4,7,-3,6,-8,-9,0,6,87,-45
count equ $-d_buf
p_dat db count dup(-1)
n_dat db count dup(1)
start:push cs
pop ds
push cs
pop es
lea si,d_buf
lea di,p_dat
lea bx,n_dat
cld
mov cx,count
@1:
lodsb
cmp al,0
jl @2
stosb
jmp @3
@2:
mov [bx],al
inc bx
@3:
loop @1
mov ah,4ch
int 21h
code ends
end start