home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / basic / spl / spl.bat < prev    next >
DOS Batch File  |  1988-03-17  |  2KB  |  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èGOTO EXITS
  58. :EXIT8
  59. ECHO N >>PARMS
  60. ECHO Y >>PARMS
  61. ECHO D >>PARMS
  62. :EXITS
  63. SP <PARMS
  64. SORT <%1.BAS >%1
  65. ERASE %1.BAS
  66. RENAME %1 %1.BAS
  67. BASCOM %1 /E/O ;
  68. LINK %1 ;
  69. ERASE %1.OBJ
  70. ERASE PARMS
  71. GOTO EXIT
  72. :EXIT1
  73. ECHO Error: No file name entered.
  74. GO TO EXIT
  75. :EXIT2
  76. ECHO Error: File name %1.SP does not exist.
  77. :EXIT
  78.