News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

Suggestion for the Boss

Started by shankle, October 24, 2013, 06:54:22 AM

Previous topic - Next topic

shankle

This suggestion is intended to be constructive and I hope it is taken in that light.
I have several hundred programs to change to 64-bit. I find myself going from "cedt.exe"
to a Dos window and back over and over again. Surely there is a better way.
There used to be a "Programmers Workbench" by Microsoft that did what I think
is needed. Comments please or tell me to shut up. 

wjr

I think what you are looking for goes beyond what the Go Tools, with their typical command line nature, can provide. So you are the Boss in the selection of an Editor or IDE with features that can simplify your convert/build process. This also depends upon the complexity of your projects and the consistency in your source file naming, which may allow you to have a generic batch file that the Editor or IDE can use.

There most likely is a better way. For the one that you mentioned, if you really need a DOS window, are you using F10 to get there? Have you set up the Go Tools or a batch file in the Tool / Conf. User Tools... menu? Note the Capture Output option there, so you wouldn't need a pause at the end of a batch file.

shankle

Thank you for responding WJR.
I have done non of the things you mention.

I use an icon on the desktop to compile the program. When it finds an error
I have to go back to cedt.exe to correct the error. Then back to the icon to
compile the program again etc. etc.
This is the method I have been using.

wjr

There often are quite a few corrections along the way for a 64-bit conversion. One way to set up the assembly part for your editor is on that Tools / Conf. User Tools... dialog, select the first -Empty- slot for hot key Ctrl+1. Then set the following, for example:

Menu Text:   GoAsm x64
Command:   C:\Program Files (x86)\GoTools\GoAsm.exe
Argument:   /x64 $(FileTitle).asm
Initial Dir:   $(FileDir)
Also select Capture Output, then OK.

From there, pressing Ctrl+1 will assemble the current file that you are working on in the editor (the above assumes a file extension of asm) and display the GoAsm output within the editor.

You can do similar for GoRC (build a RES file for linker) and GoLink on the next slots:

Menu Text:   GoRC
Command:   C:\Program Files (x86)\GoTools\GoRC.exe
Argument:   /r $(FileTitle).rc
Initial Dir:   $(FileDir)

Menu Text:   GoLink
Command:   C:\Program Files (x86)\GoTools\GoLink.exe
Argument:   /debug coff $(FileTitle).obj $(FileTitle).res @Build.txt
Initial Dir:   $(FileDir)

With the above method using FileTitle, a build could be as easy as Ctrl+1 Ctrl+2 Ctrl+3 (if you name your RC file with the same Title as the ASM one). Note that Build.txt is a text file in your project directory that contains other GoLink command line options and the list of import DLLs (or you can type these out in the Argument field instead).

Another way, it sounds like you have on your desktop either a batch file, or a short cut to one, that is specific to your current project. You can do similar to the above, by pointing to this batch file in the Command field, and clearing the Argument field (unless batch file does something useful here with arguments).

Something like the above should make it a bit easier without having to switch between windows.

shankle


       The sample you gave does not work for me. I get an error on GoTools.
       I did a search on GoTools and it is not in my computer.
       I will try to explain the GoAsm setup that exists in my computer:
       c: Windows
       D: GoAsm
       J: MASM32

       All items relating to GoAsm are in the D partition under GoAsm.
       In D:GoAsm I have placed all headers and programs in codejps.
       So cedt.exe runs in D:\GoAsm\codejps

       On the desktop I have created a Dos command line icon.
       When I click on that icon I key in the following:
          D:
          D:cd \codejps
          D:blahbtch

          blahbtch consists of the following:
            Set INCLUDE=d:\codejps 
            Set PATH=d:\codejps     
            GoAsm /x64/b/c xxxx64.asm
            GoLink /unused xxxx64.obj

       So where and how to I put GoTools in d:\codejps?
       Thank you.

wjr

For the first method, change a portion of the Command field from the example "C:\Program Files (x86)\GoTools\"  to your "D:\GoAsm\" or "D:\GoAsm\codejps\".

For the second method, change the Command field using the "..." on the right and then in the Select File dialog choose your "blahbtch" file.

To fine tune your batch file, you can put "@echo off" on the first line so each command is not shown in the output. You could also make it more generic and instead of "xxxx64" use "%1" so the batch file would then require an argument which the editor would supply if you fill in the Argument field with "$(FileTitle)" and the Initial Dir as in the above.

shankle


          blahbtch consists of the following:
            @echo off
            Set INCLUDE=D:\codejps 
            Set PATH=D:\codejps     
            GoAsm /x64/b/c %1.asm
            GoLink /unused %1.obj


    This is what    Preferences looks like in cedt.exe\tools
      user tool     GoAsm x64
      Menu Text     D:\GoAsm\codejps
      Argument      /x64 $(FileTitle).asm
      InitiaL Dir   $(FileDir)   
     
      x  Capture Output

   This gives "File Not Found"

   I don't know how to handle "FileTitle" and "FileDir"
   so they are variable each time I use a different program.
   How do I modify the Batch file to do this?

   Thanks for your help WJR

FORTRANS

Hi,

   You could set up a BATch file to run your cedt.exe editor.
Use the $1 and %2 parameters to pass arguments as needed
Then go to the command prompt and alternate between the
editor and the assemble and link using the command history
supplied by the up or down keys.  Presto, almost no typing
outside the editor.  If you end up at the desktop, Alt-Tab back
to the command prompt.

Regards,

Steve

wjr

For the first method, the Command field needs the program name as well, for example:

Command:   D:\GoAsm\codejps\GoAsm.exe

For the second method, you have modified the batch file with %1 so nothing left to do there. The editor needs to pass the %1 argument to the batch file, and this is done by setting:

Argument:   $(FileTitle)
Initial Dir:   $(FileDir)

exactly as you see it here. The editor treats $(FileTitle) and $(FileDir) as a variable depending upon which file you are currently editing and sets things accordingly.

shankle


          blahbtch consists of the following:
            @echo off
            Set INCLUDE=D:\codejps 
            Set PATH=D:\codejps     
            GoAsm /x64/b/c %1.asm
            GoLink /unused %1.obj


    This is what preferences looks like in cedt.exe\tools
      user tool     GoAsm x64
      Menu Text     D:\GoAsm\codejps\GoAsm.exe
      Argument      /x64 $(FileTitle).asm
      InitiaL Dir   $(FileDir)   
     
      x  Capture Output

   This gives "File Not Found"

   Am unable to save the preferences I keyed in cedt.exe. Hitting save, apply
   doesn't work. I'm surely not expected to key them in each time.     
   Thanks

wjr

For the "File Not Found", try the Command field using the "..." on the right and then in the Select File dialog choose where you have installed GoAsm.exe which may be "D:\GoAsm\GoAsm.exe" instead. To be sure, this should be for Command, not Menu Text as you have shown above.

You shouldn't need to key this in each time.

shankle

Got it to work one time.
Seems the batch file is not necessary.

    MenuText     GoAsm x64
    Command     D:\codejps\GoAsm.exe
    Argument     /x64 $(FileTitle).asm
    Initial Dir     $(FileDir)

   Checks are in Close on exit,  Capture Output, Save before execution
   Clicking on "Save Tools" and loading it into my file called "Stools.cmd"
   gives "User Command 3.40"  (not what I keyed in preferences)
   The preferences is not saved for repeated executions.

wjr

Correct, for the first method you do not need the batch file, you are telling the editor where to find the individual GoTool. However, a build is then 2 or 3 steps depending if you have a resource file. Fewer steps with the second method if you can get a slot set up for the batch file which assembles and links.

I didn't need to Save Tools... as it seems to keep adjustments with the current configuration, but if you did get something working and saved it, you should be able to Load Tools... to get that back (or if there is stuff there that doesn't work, select that slot and use Remove).

shankle

#13
The Crimson Editor forum is not functional. Reason Crimson Editor has been taken
over by Emerald Editor. Evidently there are bugs in the Preferences portion of
Crimson Editor and that's probably why I can't get it to work.
Please advise WJR on the use of Emerald Editor instead of Crimson Editor.

Thanks for all your help WJR.

wjr

I would say that would be worth a try. If it works, you have a better ways of building and get to use an editor that I am assuming will be very similar to what you have (including the above Tool set up).

If not, given that it does not appear to be under active development, I would suggest trying to see if another editor would suite your needs even though there would be a bit learning curve to switch (again, worth trying if you have "several hundred programs" to work with). I use EmEditor and am quite pleased with it. For others with possible support here, under Project IDE there are child boards for RadAsm and Easy Code, which have GoAsm versions or add-ons.