p; ;unit parameter is used to save the parameter
lodsb ;load a byte from [si] to al,and si=si+1
cmp al,0dh ; Enter?
jz scanexit ;if yes then scan parameter end
cmp al,'' ''
jz judgespace
lodsb
continue:
push si
cmp al,''/''
jz parascanloop
jmp error ;wrong parameter
judgespace:
lodsb
; call debug ;set break point
cmp al,0dh
je scanexit
cmp al,'' ''
je judgespace
jne continue
parascanloop: ;saved the parameter to unit parameter
mov [bx],al ;save al to [bx],just save the parameters
lodsb
cmp al,0dh ;Enter?
jz choise ;if yes then jump choise
inc bx
jnb parascanloop ;the next char
scanexit:
lea dx,noparametermsg
call disp
call rettodos
choise:
lea si,parameter
mov al,[si+1] ;load the parameter to al
cmp al,''?'' ;judge the parameter and choose ;the different process
jz help
cmp al,''p''
jz print
cmp al,''P''
jz print
jmp error ;wrong parameter
print:
lea dx,message
call disp
call rettodos
help: ;print the help message
lea dx,helpmsg
call