ExEd!

Use: PCOM <source>[.SRC]|<option> [args].


Converts a source-file into a .COM, .EXE or .ASM file.

      Options: /? = Advanced help pages;
               /a = Ascii-table (hex);
               /b = Ascii-table (dec);
               /o = Color-chart;
               /c = Show all valid commands;
               /g = Show PCOM.CFG settings, overrule -? with -?- argument;
               /t = Translator utility (ASCII->hex&dec);
               /d = Decimal to hex number conversion;
               /h = Hex to decimal number conversion.
      Args   : -d = Debug compiler mode;
               -s = Debug compiler mode without output;
               -x = Generate a .EXE output file;
               -l = Use long filename support;
               -e = Encrypt output file;
               -i = Include anti-hacker code;
               -p = Compress output file;
               -r = Run the .EXE/.COM after creation;
               -a = Create assembler output file;
               -A = Create assembler output file with source comments.

Options and arguments are case sensitive, source commands not.
Command list:
;...       = Comments.
@...       = Output ... to screen.
@~!:...    = Output ... to screen without a newline.
@~xx:...   = Colored .. output to screen, xx is the colornumber. (xx=hex).
+...       = Opens file ... in read/overwrite/add mode.
+...>...   = Like +..., but shows the 2nd ... on 'file not found'.
#...       = Creates new file ... in append mode.
.          = Write CR/LF in open file.
-          = Close file.
>xxxx:xxxx = Move file pointer from start to xxxx:xxxx. (hex).
|xxxx:xxxx = Move file pointer to current + xxxx:xxxx. (hex).
<xxxx:xxxx = Move file pointer xxxx:xxxx backwards from curent position (hex).
)          = Move file pointer to the end of the file.
(          = Move file pointer to the begin of the file.
"...       = Write ... into open/created file.
'...       = Write hex code ... into file.
*...       = Write footer ... at the end of the .COM or .EXE file.
=...       = Check byte ... with the byte of file pointer position. (hex).
=...>...   = Check byte ... and show 2nd ... when not equal.
?...       = Get user input and place it in the ... variable.
?~xx:..    = Same as '?', but inputlength restricted with xx chars (dec).
!...       = Check the filesize from the currently open file (dec, in bytes).
!..:..>..  = Check filesize !<file>:<size>>Comment when not succesful. No LFNs.
&RHS:...   = Change attribute of file ... Uppercase is SET, lowercase is RESET.

$key = Wait for a keystroke. $snd = Sound signal. $con = Cursor on. $cof = Cursor off. $cls = Clears the screen. $chr = Charakters 40x25. ($cls=80x25). $chl = Charakters 80x50. $lck = Lock the computer. $y/n = Y/y key will continue, others will abort the program $sbd = Set boot disk $prn = Generate a print-screen. $win = Check if running under Windows. $fdb = Makes full windows DOS-box (Win95/98/NT). $fcs = Set focus on current DOS-box. $cdb = Close current DOS-box. $ufn = Create and open a file with an unique filename. $case = Create a menu case using the { and }. $dsk:x = Change to drive x:. $rep:x = Repeat x times the codelines between { and }. $ccs:xx = Clear colored screen, xx is the colornumber (xx=hex). $ccl:xx = Clear colored line. xx is the colornumber (xx=hex). $cur:x,y = Cursor position. 0,0=org (dec). $ren:x>y = Rename file x into y. $cdr:... = Change to directory ... $rdr:... = Remove directory ... $mdr:... = Make directory ... $del:... = Delete file ... $num:... = Sets numlock on/off ...=on/off. $cap:... = Sets capslock on/off ...=on/off. $slp:... = Sleep ... vertical retraces. $inc:... = Includes source ... into current source. $fnt:... = Load the ... fontfile. $fnd:... = Find .. in the open file (hex). $run:... = Run the ... application or dos/win95 command. $ttl:... = Change the Windows(95/NT) messagebox-title into ... $exit:x = Exit using ERRORLEVEL x. $hex:%1&gt%2 = Convert var %1 into hex and stores it in new var %2. $dec:%1&gt%2 = Convert var %1 into decimal and stores it in new var %2. $far:xx>yy = Find and Replace stream xx into stream yy (xx/yy are hex). $sound:x,y = Play sound x for y periods of time. $nosound = Switch the sound off.
$var:%1&gt.. = Copies .. into the new '%1'-variable. $vbc:%1&gt.. = Copies binary data .. into new '%1'-variable (hex). (You can copy values like: 0Ah, 0Dh, 08h, 09h, 20h etc. into a variable). $vcp:%1&gt%2 = Copies variable %1 into variable %2. $vct:%1&gt%2 = Appends variable %1 to variable %2. $vtr:%1&gtxx = Truncate var %1 to length xx (xx=dec). (If a maximum length of 6 is required use $vrt:%Var1%&gt6. If the length is already 6 or lower, the data is not changed). $vup:%1 = Uppercase variable %1. $vlw:%1 = Lowercase variable %1.
$arg:%1 = Put the arguments into existing variable %1. $arc:... = Say ... when no argument is found and exit with errorlevel 1. $eject = Open the CDROM-tray (ATAPI). $close = Close the CDROM-tray (ATAPI). $on_err = Alternative errorhandling routine. $err:.. = Switch the errorhandler on or off, ..=on/off.
The errorhandling command, $on_err, syntax: ; $on_err { @Something wet wrong! @Press a key. . . $key } ; The handling routine will be active from the moment it is used in the source. You can activate/deactive the routine usingthe $err:.. command.
The case command, $case, uses the following syntax: ; $case { 1. Option one; { @Option 1 choosen. $exit:1 } 2. Option two; { @Option two choosen. $exit:2 } } @Invalid option choosen! ; PCOM will use the first chrakter of the option label as hotkey. So in the above example you can press 1 or 2, other keys will skip the case. You have to add the $exit commands yourself, if not, the code will continue after the case (might be usefull).
The repeat command, $rep:x, uses the following syntax: ; $rep:10 { @Hello World! $snd } ; The loops may be nested.
Sound table (3rd, 4th and 5th octave): C=9121 Cis=8609 D=8126 Dis=7670 E=7239 F=6833 Fis=6449 G=6087 Gis=5746 A=5423 Ais=5119 B=4831 C=4560 Cis=4304 D=4063 Dis=3834 E=3619 F=3416 Fis=3224 G=3043 Gis=2873 A=2711 Ais=2559 B=2415 C=2280 Cis=2152 D=2031 Dis=1917 E=1809 F=1715 Fis=1612 G=1521 Gis=1436 A=1355 Ais=1292 B=1207 ANSI draw routine.
Use ANSI if there is color data in the image.
Format: charakter value - textcolor - backgroundcolor, notated in
binary way, so a YELLOW 'e' with a BLUE background is notated as: 651e.

Use the /a option for the ASCII chart, use /o for the colors.

ansi
x:xx = X origin of the image.
y:yy = Y origin of the image.
w:ww = W is the image width.
h:hh = H is the image height.
raw OR inc
raw  = Inline code. Data follows on next line(s).
inc  = Extern code. Filename of the binary file follows on next line.
Image data will be included in the .COM or .EXE file!

Example:

; Ansi include
ANSI
x:01
y:01
w:20
h:10
inc
TEST.BIN
; Done

; Ansi raw
ANSI
x:20
y:6
w:2
h:10
raw
481E691E
; Done
; Note: w:2 because it are just 2 charakters.

Image data will be included in the .COM or .EXE file!

Use @~xx:... for a colored output string. Example: the
'@~4E:Hello World!' command will show 'Hello World!' with yellow
charakters and a red background.

Other comments:

Command ?Var1 will create the variable %Var1%. The variable
will be available in commands like this: @%Var1%, +%Var1% ...

Hexadecimal convertion command $hex:%1>%2
Use: $hex:%Name%>HexName. This will create a variable %HexName%
with the hexadecimal converted contents of %Name%.

Decimal convertion command $dec:%1>%2
Use: $dec:%Name%>DecName. This will create a variable %DecName%
with the decimal converted contents of %Name%.

Copy variable contents command $var:%1>..
Use: $var:%Var%>Stream. The data 'Stream' will be copied into
the new variable %Var%.

Copy variable to variable: $vcp:%1>%2 copies the contents of
variable %1 into variable %2.

$vct:%1>%2 concatenates variable %1 behind variable %2. 

$vbc:.. enables the use of 07,08,0A,0D,20 etc in variables.


 
Back home. . .