Developing IDE for TASM. How to work with batch files using vb6.0?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • chibbie23
    New Member
    • Mar 2010
    • 44

    Developing IDE for TASM. How to work with batch files using vb6.0?

    I am a graduating college student. We have been developing an IDE for the turbo assembler as our thesis. Everything works out just fine in the text editor and other components of the IDE. But we encountered a problem in calling batch files. We decided to use a batch file to display the output. the batch file contains the following:

    tasm sample
    tlink sample
    sample

    first problem we encountered is that we can call the batch file but it does not display the command prompt window.

    Second problem that i think of is that the batch file automatically terminates right after the last code is done. Is there a way to prolong the command prompt window, for example, ask the user when to close the window or the statement "press enter to continue"

    it would be a big help if you can show me how to work with batch files, it would even be a bigger help if you can teach me other ways to display the output window for our IDE.
  • Guido Geurs
    Recognized Expert Contributor
    • Oct 2009
    • 767

    #2
    open the bat file with:

    Code:
    Private Sub Command1_Click()
       Shell App.Path & "\" & "test.bat", vbMaximizedFocus
    End Sub
    You can halt the run of the batfile with the command "pause" like:

    Code:
    REM list the files
    dir
    REM halt to see the results
    pause

    Comment

    • chibbie23
      New Member
      • Mar 2010
      • 44

      #3
      Thanks. . .that's what I've been looking for, pause. . .hehe. . .

      Comment

      • chibbie23
        New Member
        • Mar 2010
        • 44

        #4
        Now, is there a way that the only thing i can show are the results. my .bat file now contains this codes:

        tasm sample
        tlink sample
        cls
        sample
        pause

        and has a cmd output like this:

        *************** *************** ***********

        E:\NAPSTE~1\The sis\TASMED~1\TA SM>input
        Hello World
        E:\NAPSTE~1\The sis\TASMED~1\TA SM>pause
        Press any key to continue . . .

        *************** *************** ***********

        Now, is there a way where the result would be like this:
        *************** *************** ****
        input
        Hello World
        pause
        press any key to continue. . .
        *************** *************** ****
        or much better if the output would be
        *************** ***************
        Hello World

        Press any key to continue...
        *************** ***************

        I'd like to kinda disregard in the output the path and the command. . .thanks again. . .
        Last edited by chibbie23; Jan 8 '11, 01:21 PM. Reason: Typographical error

        Comment

        • Guido Geurs
          Recognized Expert Contributor
          • Oct 2009
          • 767

          #5
          The @ suppresses the showing of the command in the line of code.
          The "echo off" suppresses it for the hole batfile.
          It can be set on again by "echo on".
          So if we want to see only the results, even not the first
          "echo off" ,it must start with "@echo off" .
          Just place in the beginning of the bat file the command:

          Code:
          @echo off
          like:

          Code:
          @echo off
          REM list the files
          dir
          REM halt to see the results
          pause
          And You will only see the results= the folders and files in the directory.

          Comment

          • chibbie23
            New Member
            • Mar 2010
            • 44

            #6
            Everything you said worked, thanks. . .now i'm thinking of a way how to edit my .bat file using richtextbox, . .hehe

            Comment

            Working...