主题:[讨论]求求大家,帮帮我吧,问个问题,急需呀!!!
stack segment stack
dw 100 dup(0)
stack ends
datasegment
bin dw 7462
buf db 6 dup(0),0dh,0ah,‘$’
ten dw 10
dataends
codesegment
assume cs:code,ds:data,ss:stack
start: mov ax, data
mov ds,ax
mov ax,bin
or ax,ax
jns plus
neg ax
mov buf,‘-’
jmp next
plus: mov buf,‘+’
next: mov cx,5
l1: mov dx,0
div ten
push dx
loop l1
mov cx,5
lea bx,buf+1
l2: pop ax
add al,30h
mov[bx], al
inc bx
loopl2
lea dx,buf
movah,9
int 21h
mov ah,4ch
int 21h
codeends
end start
这个程序的功能是什么?
列程序完成将键盘输入的两个字符串连接并分散对齐显示输出功能,补充并完成下列程序段,要求给程序添加必要的注释,给出程序框图及程序的执行结果
data segment
num equ 60
p1 db 0ah,0dh,‘string:’,‘$’
p2 db 0ah,0dh,‘right-adjusting of string:’,0ah,0dh,‘$’
string1 db num,0,num duo(‘ ’),0ah,0dh,‘$’
string2db num,0,num dup(‘ ’),0ah,0dh,‘$’
data ends
stack1 segment para stack
stack1 ends
code segment
assume cs:code,ds:data,ss:stack1,es:data
start:
code ends
end start
dw 100 dup(0)
stack ends
datasegment
bin dw 7462
buf db 6 dup(0),0dh,0ah,‘$’
ten dw 10
dataends
codesegment
assume cs:code,ds:data,ss:stack
start: mov ax, data
mov ds,ax
mov ax,bin
or ax,ax
jns plus
neg ax
mov buf,‘-’
jmp next
plus: mov buf,‘+’
next: mov cx,5
l1: mov dx,0
div ten
push dx
loop l1
mov cx,5
lea bx,buf+1
l2: pop ax
add al,30h
mov[bx], al
inc bx
loopl2
lea dx,buf
movah,9
int 21h
mov ah,4ch
int 21h
codeends
end start
这个程序的功能是什么?
列程序完成将键盘输入的两个字符串连接并分散对齐显示输出功能,补充并完成下列程序段,要求给程序添加必要的注释,给出程序框图及程序的执行结果
data segment
num equ 60
p1 db 0ah,0dh,‘string:’,‘$’
p2 db 0ah,0dh,‘right-adjusting of string:’,0ah,0dh,‘$’
string1 db num,0,num duo(‘ ’),0ah,0dh,‘$’
string2db num,0,num dup(‘ ’),0ah,0dh,‘$’
data ends
stack1 segment para stack
stack1 ends
code segment
assume cs:code,ds:data,ss:stack1,es:data
start:
code ends
end start