home *** CD-ROM | disk | FTP | other *** search
/ C!T ROM 5 / ctrom5b.zip / ctrom5b / PROGRAM / DIVERSEN / TIPI2A / T.TPI < prev    next >
Text File  |  1994-11-27  |  3KB  |  117 lines

  1. # T.TPI  The TIPI Programmer's Workbench
  2. # Version 2.0a
  3. # by Kent Peterson 10/2/94
  4.  
  5. defstr p$ # The name of the program
  6.  
  7. command$
  8. parse$ drop$
  9. parse$ swap$ drop$
  10. # if there is no p$, ask for one
  11. dup$ "" =$
  12. if
  13.  drop$ "Name of TIPI program: " print$ get$
  14. endif
  15. "." instr drop$
  16. not if ".tpi" +$ endif
  17. ucase$ p$ store
  18.  
  19. define menu
  20. # ( -- choice)
  21. # ( valid$ -- )
  22. # Returns the chosen key or 0 if the user escapes from this menu
  23.  0 cursor
  24.  ucase$
  25.  27 chr$ swap$ +$
  26.  begin
  27.   inkey$ ucase$ # valid$ key$
  28.   len instr *
  29.   dup
  30.   if dup drop$ endif drop$
  31.  until
  32.  1 -
  33.  1 cursor
  34. enddef
  35.  
  36. define cline$ ( -- )
  37.               ( -- command$ )
  38.  "R" "command.lin" 1 open
  39.  1 isinput
  40.  get$ console isinput
  41.  1 close
  42. enddef
  43.  
  44. cls
  45. |
  46. |       TIPI Programmer's Workbench
  47. |
  48. |              Version 2.0a
  49. |
  50. |  [E]dit                       X
  51. |  [C]hange Program            / \
  52. |  [S]et Command Line         /   \
  53. |  [R]un Program             /  +  \
  54. |  [M]ake EXE               /   +   \
  55. |  [L]ookup                 \__( )__/
  56. |  [D]OS Command
  57. |
  58. "  Program Name: " print$
  59. p$ fetch print$ cr
  60. "  Command Line: " print$
  61. cline$ print$
  62. "ECSRMLD" menu
  63. cls
  64. "O" "runfile.bat" 2 open
  65. 2 isoutput
  66. case 0 of # Quit
  67.        endof
  68.      1 of # Edit
  69. # Change the following line to contain the name of your editor of choice
  70.         "e " print$
  71.         p$ fetch print$ cr lf
  72.         "t " print$ p$ fetch print$ cr lf
  73.        endof
  74.      2 of # Change Program
  75.         | t
  76.        endof
  77.      3 of # Set Command Line
  78.        "O" "command.lin" 1 open
  79.         console isoutput
  80.         "Command Line: " print$ get$
  81.         1 isoutput print$ cr lf
  82.         1 close
  83.         2 isoutput
  84.         "t " print$ p$ fetch print$ cr lf
  85.        endof
  86.      4 of # Run Program
  87.        "tipi " print$
  88.        p$ fetch print$ " " print$
  89.        cline$ print$ cr lf
  90.        "t " print$ p$ fetch print$ cr lf
  91.        endof
  92.      5 of # Make EXE
  93.        console isoutput
  94.        "Making EXE..." print$
  95.        2 isoutput
  96.        "copy /b tipicore.bin+register.dat+" print$
  97.        p$ fetch dup$ print$ " " print$
  98.        ucase$ ".TPI" ".EXE" replace$ print$
  99.        " /b /v > nul" print$ cr lf
  100.         "t " print$ p$ fetch print$ cr lf
  101.        endof
  102.      6 of # Lookup
  103.         | call helptipi.bat
  104.         "t " print$ p$ fetch print$ cr lf
  105.        endof
  106.      7 of # DOS Command
  107.         console isoutput
  108.         "DOS Command: " print$ get$
  109.         2 isoutput
  110.         print$ cr lf
  111.         "pause" print$ cr lf
  112.         "t " print$ p$ fetch print$ cr lf
  113.        endof
  114. endcase
  115. console isoutput
  116. 2 close
  117.