Author Topic: MASM example code needed  (Read 38950 times)

jayanthd

  • Guest
Re: MASM example code needed
« Reply #45 on: March 17, 2013, 04:23:01 AM »
what i neglected to mention, before....

RC.exe compiles the RC file to a RES file, RC -> RES
CVTRES.exe converts the RES file to an OBJ file that may be linked, RES -> OBJ

Pelle's linker has the capability to link RES files, directly, so a step is eliminated


I created the rcdlg.RES file from rcdlg.RC file using rc.exe and Then I created rcdlg.obj file from rcdlg.res using cvtres.exe


What is pelles's linker? Is it polink.exe?


But when I compile rcdlg.asm it also created rcdlg.obj and overwrites the rcdlg.obj created earlier.

Gunther

  • Member
  • *****
  • Posts: 3738
  • Forgive your enemies, but never forget their names
Re: MASM example code needed
« Reply #46 on: March 17, 2013, 04:35:51 AM »
Hi jayanthd,

What is pelles's linker? Is it polink.exe?

yes, it's polink.exe.

But when I compile rcdlg.asm it also created rcdlg.obj and overwrites the rcdlg.obj created earlier.

You could solve that problem with a command line switch. Please check out ml /?. I think it's the switch ml /Fo, which lets you specify another output name for the OBJ file.

Gunther
Get your facts first, and then you can distort them.

dedndave

  • Member
  • *****
  • Posts: 8829
  • Still using Abacus 2.0
    • DednDave
Re: MASM example code needed
« Reply #47 on: March 17, 2013, 04:53:03 AM »
But when I compile rcdlg.asm it also created rcdlg.obj and overwrites the rcdlg.obj created earlier.

if you look at the batch file i created,
you will notice that the OBJ created from the resource file is renamed to "rsrc" to avoid this conflict

Gunther

  • Member
  • *****
  • Posts: 3738
  • Forgive your enemies, but never forget their names
Re: MASM example code needed
« Reply #48 on: March 17, 2013, 06:03:05 AM »
Hi jayanthd,

so, you've the full answer for your question.

Gunther
Get your facts first, and then you can distort them.

dedndave

  • Member
  • *****
  • Posts: 8829
  • Still using Abacus 2.0
    • DednDave
Re: MASM example code needed
« Reply #49 on: March 17, 2013, 06:20:37 AM »
perhaps he doesn't understand how to view/edit batch files
they are text files, but if you double-click on them, they execute   :P

to edit or view a batch file, right-click, then open with - i generally use notepad

Gunther

  • Member
  • *****
  • Posts: 3738
  • Forgive your enemies, but never forget their names
Re: MASM example code needed
« Reply #50 on: March 17, 2013, 06:43:04 AM »
to edit or view a batch file, right-click, then open with - i generally use notepad

Any text editor will do the job.

Gunther
Get your facts first, and then you can distort them.

dedndave

  • Member
  • *****
  • Posts: 8829
  • Still using Abacus 2.0
    • DednDave
Re: MASM example code needed
« Reply #51 on: March 17, 2013, 01:14:41 PM »
i just opened one
i used right click - edit   :P
it opened in notepad

japheth

  • Guest
Re: MASM example code needed
« Reply #52 on: March 17, 2013, 01:39:59 PM »
I created the rcdlg.RES file from rcdlg.RC file using rc.exe and Then I created rcdlg.obj file from rcdlg.res using cvtres.exe

It's not necessary to launch cvtres.exe explicitly - it's called by MS link internally whenever it detects an input file to be a compiled resource. Also, this "strategy" avoids possible naming conflicts - as in your case.

jayanthd

  • Guest
Re: MASM example code needed
« Reply #53 on: March 18, 2013, 04:54:39 AM »
Thanks everybody. dedndave's files are working but I am not able to use his batch file for other versions of RCDlg posted in this thread. I opened the batch file in edit pad and changed the file names according to the other RCDlg versions but when I use the batch file to build the projects it says cannot open file... when I get some time I will post the screenshots.


I know how to edit batch files. I learn't that while using DOS.  ;)




dedndave

  • Member
  • *****
  • Posts: 8829
  • Still using Abacus 2.0
    • DednDave
Re: MASM example code needed
« Reply #54 on: March 18, 2013, 05:45:31 AM »
i wrote that batch file specifically for that project
if it can't find the file, then you have to examine the names used in the batch more closely
you could replace the project name in the batch with %1, then provide the project name on the batch command line
that assumes that all the files have the same base filename


Quote
It's not necessary to launch cvtres.exe explicitly - it's called by MS link internally whenever it detects an
input file to be a compiled resource. Also, this "strategy" avoids possible naming conflicts - as in your case.
thanks for the tip, Andreas - i'll give it a try   :t