Easiest way is to go find the AutoCAD acad.lin file, make a copy of it, open your copy with a text editor like Notepad, and see how the basic lines are put together. AutoCAD help will give you a few clues, but I learned quicker by just experimenting with a copy of the standard .lin file.
A= ALIGNMENT (ALWAYS A)
.5= PEN DOWN .5 UNITS
-2= PICK PEN UP .2 UNITS
"HW"= TEXT
STANDARD= TEXT STYLE
S= SCALE OF TEXT
R= ROTATION OF TEXT
X= HORIZONTAL OFFSET OF TEXT
Y= VERTICAL OFFSET OF TEXT
-2= PICK PEN UP .2 UNITS
All spelled out in the Customization Guide of the Online Manuals