求 商品单价 输入 数量 总价格 但是编译时 没有生成相应文件 求解
代码如下
dseg segment
prompt1 db 'the quantity of parts:$'
prompt2 db 'the value of parts:$'
crlf db 0dh,0ah,'$'
quantity db 8,?,8 dup(' ')
value db 8,?,8 dup(' ')
qty dw ?
price dw ?
dseg ends
stack segment stack
db 200 dup(?)
stack ends
StrDisp macro message;显示宏
lea dx, message
mov ah, 09h
int 21h
endm
StrInput macro NumStr;输入
lea dx,NumStr
mov ah,0ah
int 21h
endm
cseg segment
main proc far
assume cs:cseg,ds:dseg
start:
push ds
sub ax,ax
push ax
mov ax,dseg
mov ds,ax
begin:
StrDisp prompt1
StrInput quantity
StrDisp crlf
StrDisp prompt2
StrInput value
StrDisp crlf
call subconv;从键盘输入
call subcalc
call subdisp
StrDisp crlf
jmp start
ret
main endp
subconv proc near
IRP reg,<ax,bx,cx,si,di>
push reg
endm
lea si,quantity
mov al,[si+1]
cbw
mov cx,ax