in 16bit assembly ( .model tiny, .com program) the param is stored at address 82h. the byte at offset 80h contains the length of the param ( 1 byte for carriage return included ), 81h contains a space ( 20h) value.
here is a short example how i get a filename from the param area:
Code:
---------------------------------------
; get param filename
;-------------------------------------------
; param area starts at 80h
; 1. byte length
; 2.nd blank
b05_get_file:
xor cx,cx
xor bx,bx
mov bl,080h
mov al,[bx]
cmp al,0
ja b05_ok
print err_parm ; length= 0-> error message
jmp b00_exit
b05_ok:
mov cl,al
dec cx ; sub 1 byte for carriage return
lea di,e_dat ; variable to store filename ( predefined with zeroes