PASM v1.2 by : Peter Quiring

PASM is a utility to allow you to insert strings directly into your ASM
source code.  So basically any of the following is possible when using PASM:

.code
  mov edx,"Program error$"
  mov ah,9
  int 21h

  invoke printf,"I am %d years old\n",21

So you can see this looks a lot better than this:

.data
  m1 db 'Program error$'
  m205 db 'I am %d years old',13
.code
  mov edx,offset m1  ; what's m1?
  mov ah,9
  int 21h

  invoke printf,offset m205,21  ;maybe m205 could be far away or
                                ; in another file?

So the benifits are ovious.  PASM works by you give it the filename of your
source code (the main file) and it will output it to ASM.TMP (always).
And when it sees double quotes, it will output the string to a seperate file
called _STR_.TMP (always) and give it same name and then place OFFSET name
in the source code where the string was.  It will process thru all included
files and contine to output to ASM.TMP and _STR_.TMP.  Then you would just
compile ASM.TMP thru MASM or TASM.  But for the ASM compiler to include
the _STR_.TMP file you must place a include _str_.tmp in the appropriate
location in your source code.  But if you do that then PASM will try and open
it and really get messed up.  So when you include the _str_.tmp file do
it as follows:
  #include _str_.tmp
And when PASM sees the # it will remove it and output the line as normal to
the output file (ASM.TMP).

PASM expands:
 \t  into  9     (new in v1.11)
 \n  into  10
 \r  into  13
 \0  into  0
 \"  into  "
 ""  into  "
 \'  into  '     (just in case)
 '   into  ''    (so you no longer have to double them up yourself - v1.2)

And that's it... remember that if you get errors to change your source file
and not ASM.TMP, which makes finding errors harder but oh well, nothing
that MS designed is perfect.

http://www.globalserve.net/~subdeath

Enjoy...

