
 ۱ ==============  ASCI2DBG External Documentation ================  ۱
  ۱ ================ Copyright (c) John Paul Jones =================   ۱
                                                                      
  USE I: Batch Processed Generation of HTML and XML  source  files  
 ---------------------------------------------------------------- 
                                                                  
 ۱ In  Windows XP batch scripting, HTML or XML files can be created  ۱
  ۱ from within a batch file by using the up carot symbol to  direct   ۱
   the  less-than and greater-than symbols with the ECHO command as   
  follows:                                                          
                                                                  
 ECHO ^<html&^> > HTM.TMP                                         
 ۱                                                                   ۱
  ۱ which command would redirect the string <HTML> to file  HTM.TMP,   ۱
   where  the carot symbols tell the VDM command processor that the   
  redirector symbols (i.e., the less-than and greater-than  chara-  
 cters)  which  it directly preceeds are to be interpreted not as 
 redirection directives but rather as characters. Otherwise,  the 
 ۱ less-than  and  greater-than  symbols are interpreted as special  ۱
  ۱ symbols. Note that the last greater-than symbol in  the  command   ۱
   above  is  not preceeded by a carot, so it tells DOS, or rather,   
  the VDM (Virtual DOS Machine) to treat the symbol as  a  special  
 symbol or redirection directive.                                 
                                                                  
 ۱ Trouble  is,  if  you use this technique to redirect redirection  ۱
  ۱ symbols, any batch script using the method won't  be  backwardly   ۱
   compatible,  since older versions of DOS always treat redirector   
  symbols as special symbols when used at the command line or in a  
 batch script with the ECHO command.                              
                                                                  
 ۱ Thus,  in light of this problem, you may want to use a technique  ۱
  ۱ that will work in older and newer versions of the Microsoft  OS,   ۱
   and  hence,  to tackle this challenge, ASCI2DBG was concieved as   
  one way among others to create HTML files from batch scripts  in  
 such  a  way that it will work with Windows XP--the most current 
 Microsoft OS as of this writing--and any older version MS OS.    
 ۱                                                                   ۱
  ۱ This is one use, though there are others, since any ASCII  file,   ۱
   or  any ASCII non-compiled source code, can be packed into batch   
  files using ASCI2DBG.                                             
                                                                  
 What you do, to make HTML on the fly in a batch file,  is  first 
 ۱ convert  the  HTML you need to debug script using ASCI2DBG; this  ۱
  ۱ done, you redirect the DEBUG code from the BAT file,  whereupon,   ۱
   you  run the DEBUG code through DEBUG.EXE to kick out HTML. This   
  method lets you kick out HTML without needing to rely on the  XP  
 only  technique, plus you won't need to rely on help files exte- 
 nAl to your BAT file, except the  DEBUG.EXE  utility.  Once  the 
 ۱ needed  HTM is saved to file, you use the TYPE command to direct  ۱
  ۱ (which is to say, append) the HTML to the HTML file you are  ge-   ۱
   nerating.  Included,  then, is DBGS2BAT, a program that makes it   
  quick and simple to pack DEBUG script into batch script.          
                                                                  
                                                                  
 ۱ USE II: Compilation of Complex Batch Scripts Using  BAT2EXEC.EXE  ۱
  ۱ ----------------------------------------------------------------   ۱
                                                                      
  BAT2EXEC.EXE  is  an excellent batch compiler, probably the best  
 one available. However, it can trip up on complicated scripts or 
 ones  that  use  undocumented DOS features. For example, a batch 
 ۱ script that uses double colon comments will confuse BAT2EXEC.EXE  ۱
  ۱ and cause it to display an error message: "Duplicate label". The   ۱
   program X2COLONS.BAT will solve that problem by scrubing  double   
  colon  comments  from a batch script, but other glitches are not  
 so easily dealt with.                                            
                                                                  
 ۱ In that case, the fastest work-around may be to use ASCI2DBG.BAT  ۱
  ۱ or ASC2BIN.EXE to simply convert the batch file to DEBUG code. A   ۱
   alternative would be to use BAT2QBAS.BAT, then try to compile it   
  with QuickBasic, although this method won't work on long scripts  
 and sometimes trips up on complicated ones. Once the batch  file 
 is converted to a DEBUG script, you can then prefix ECHO to each 
 ۱ line and append a greater than symbol followed by an output file  ۱
  ۱ to each line of DEBUG code. This, in essence, converts each line   ۱
   of batch code to a simple redirection command that  BAT2EXEC.EXE   
  can easily interpret and convert.                                 
                                                                  
 ---------------------------------------------------------------- 
 ۱ Three versions of ASCI2DBG included: ASCI2DBG.BAT,  the  BAT/BAS  ۱
  ۱ hybrid version; ASCI2DBG.BAS, the QuickBAS non-compiled version,   ۱
   plus ASCI2DBG.EXE, which is ASCI2DBG.BAS compiled. The util file   
  DBGS2BAT.BAT is not required to use ASCI2DBG.                     
                                                                  
 ---------------------------------------------------------------- 
 ۱ Free for free people. Any donations to the Nicholas Owen Society  ۱
  ۱ are much appreciated:                                              ۱
                                                                      
  Nicholas  Owen Software 1550 Larimer Street, PMB 527 Denver, CO,  
 80202                                                            
 ================================================================ 

       
