You do not need to define those in the data section for both of the following fixes. A seperate procedure may be easier to understand:
LineMove:
FRAME hdcPrn, Vert1, Vert2, Horz3, Horz5
invoke MoveToEx,[hdcPrn],[Vert1],[Horz3],NULL
invoke LineTo,[hdcPrn],[Vert2],[Horz5]
ret
ENDF
However, since I take it that your hdcPrn is LOCAL, I think the following is what you were trying to do:
invoke LineMove, 150, 2000, 598, 598
;other code
ret
LineMove:
invoke MoveToEx, [hdcPrn],[esp+0Ch],[esp+10h],NULL
invoke LineTo, [hdcPrn],[esp+0Ch],[esp+10h]
retn 16
Note that your invoke LineMove in this case does not require hdcPrn passed as an argument.