home *** CD-ROM | disk | FTP | other *** search
/ Simtel MSDOS 1992 September / Simtel20_Sept92.cdr / msdos / basic / spllib.arc / SPL.BAT < prev    next >
Encoding:
DOS Batch File  |  1988-03-18  |  2.1 KB  |  78 lines

  1. ECHO OFF
  2. REM This batch file lets you automate the SPL translator.
  3. REM Format of command:
  4. REM           SPL fname /LS/S
  5. REM The above example will translate fname.SP to basic listing
  6. REM the source program to the screen and generating a symbol table.
  7. REM /LD lists to disk, /LP lists to printer. /S generates symbol table
  8. REM to disk. To get a symbol table you must list source to a device.
  9. REM After the program is translated, the resulting BASIC program is
  10. REM sorted by your SORT utility which you supply and then compiled
  11. REM using your BASIC compiler. I assume BASCOM but you can change
  12. REM this batch file to use your own. This batch file uses ECHO
  13. REM which stacks and simulates keyboard entries which accomplishes
  14. REM parameter passing to SPL, which does not accept parameters but
  15. REM gets info from the keyboard after it starts running.
  16. REM You may need to do some editing of this batch file
  17. REM but this batch file will help you automate processing of SPL programs.
  18. REM If you have any questions call Dennis Baer at 516 694 5872.
  19. REM To speed up this batch file remove these REM lines from a copy of this
  20. REM file.
  21. IF %1.SP==.SP GOTO EXIT1
  22. IF NOT EXIST %1.SP GOTO EXIT2
  23. ECHO %1 >PARMS
  24. ECHO   >>PARMS
  25. IF %2z==/LS/Sz GOTO EXIT3
  26. IF %2z==/LP/Sz GOTO EXIT4
  27. IF %2z==/LD/Sz GOTO EXIT5
  28. IF %2z==/LSz GOTO EXIT6
  29. IF %2z==/LPz GOTO EXIT7
  30. IF %2z==/LDz GOTO EXIT8
  31. ECHO N >>PARMS
  32. ECHO N >>PARMS
  33. GOTO EXITS
  34. :EXIT3
  35. ECHO Y >>PARMS
  36. ECHO Y >>PARMS
  37. ECHO S >>PARMS
  38. GOTO EXITS
  39. :EXIT4
  40. ECHO Y >>PARMS
  41. ECHO Y >>PARMS
  42. ECHO P >>PARMS
  43. GOTO EXITS
  44. :EXIT5
  45. ECHO Y >>PARMS
  46. ECHO Y >>PARMS
  47. ECHO D >>PARMS
  48. GOTO EXITS
  49. :EXIT6
  50. ECHO N >>PARMS
  51. ECHO Y >>PARMS
  52. ECHO S >>PARMS
  53. GOTO EXITS
  54. :EXIT7
  55. ECHO N >>PARMS
  56. ECHO Y >>PARMS
  57. ECHO P >>PARMS
  58. èGOTO EXITS
  59. :EXIT8
  60. ECHO N >>PARMS
  61. ECHO Y >>PARMS
  62. ECHO D >>PARMS
  63. :EXITS
  64. SP <PARMS
  65. SORT <%1.BAS >%1
  66. ERASE %1.BAS
  67. RENAME %1 %1.BAS
  68. BASCOM %1 /E/O ;
  69. LINK %1 ;
  70. ERASE %1.OBJ
  71. ERASE PARMS
  72. GOTO EXIT
  73. :EXIT1
  74. ECHO Error: No file name entered.
  75. GO TO EXIT
  76. :EXIT2
  77. ECHO Error: File name %1.SP does not exist.
  78. :EXIT
  79.