PASM v2.01 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.

How does it work?
  Usage : PASM <file.asm>
  PASM goes through the file and outputs it into \pasm.tmp.
As it encounters strings "" it will move the string into another file
called _str_.tmp which is also in \pasm.tmp.  Then the string is replaced
with 'offset _string' so that a DWORD will be put it it's place.
When PASM encounters an 'include' directive it will also output this file
into \pasm.tmp (but under a different name, like 'i001').  Then when all
files have been outputed into \pasm.tmp you can compile \pasm.tmp\file.asm
or whatever name you have given PASM.
In order for the _str_.tmp file to be included into your program you
must insert the following string somewhere in your code where it would
be most appropriate.
;;include_pasm_strings;;
The reason you can not simply put 'include _str_.tmp' into your source is
that PASM will try and open _str_.tmp for preprocessing and will then
fail.  If PASM does not find the special remark above it will just issue
a warning.

PASM also expands the following:
 \t  into  9
 \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)

Notes :

 - If you are using QLIB then the special remark to include '_str_.tmp'
   is already in 'qlib.inc'.

 - Since you are compiling the files in \pasm.tmp, if you encounter
   any errors it will become difficult to find where they came from.

URL : http://qforce.home.ml.org
Email : sub_death@geocities.com

Enjoy...

