News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests

Main Menu

MASM example code needed

Started by jayanthd, March 15, 2013, 08:13:46 PM

Previous topic - Next topic

jayanthd

Quote from: dedndave on March 16, 2013, 09:34:40 PM
most of us don't use the IDE you are using
some use IDE's, some just use batch files

we can modify the assembly behaviour by choosing different batch files
the ones i use look for "%1.rc", then "rsrc.rc" in the same folder as the asm file
if either is found, it is compiled with the resource compiler, then linked with the rest of the program


I am talking about RCDlg.zip


I got it working. It is a MASm32 program. Can you modify it so that result is generated when button is clicked?

dedndave

the way qWord has it written, no "generate" button is really needed
it updates the results any time the value in the input edit control changes

that's a pretty nice example   :t

if you still want it modified, i can do it

jayanthd

Quote from: dedndave on March 16, 2013, 10:37:54 PM
the way qWord has it written, no "generate" button is really needed
it updates the results any time the value in the input edit control changes

that's a pretty nice example   :t

if you still want it modified, i can do it


Yes. Modify it. I want some code for button click procedure.

dedndave

see if this is what you want
i tried not to mess up qWord's nice program   :P

i added the rgbCurrent and rc8 variables and moved a little bit of code

qWord

being not happy with daves hack, I've reworked the example: Coloring and calculation is separated and the code is TCHAR aware  :biggrin:

qWord
MREAL macros - when you need floating point arithmetic while assembling!

jayanthd

Quote from: dedndave on March 16, 2013, 10:57:34 PM
see if this is what you want
i tried not to mess up qWord's nice program   :P

i added the rgbCurrent and rc8 variables and moved a little bit of code


@dedndabe and qword


Both the files are not working. I added the line


include "RCDlg.rc" in the .asm file and tried building but it says cannot open file RCDlg.rc but the RCDlg.exe of qword is working but dedndave's RCDlg.exe is not showing up on screen. Is there any other method to include the .rc file?

dedndave

Quote from: qWord on March 17, 2013, 02:25:43 AM
being not happy with daves hack, I've reworked the example: Coloring and calculation is separated and the code is TCHAR aware  :biggrin:

qWord
::)

Jay
RC files are not ASM INClude files - they actually follow C syntax
you must compile them using rc.exe - or use Pelle's linker
if you use rc.exe, it creates an OBJ file that can be linked with the rest of your program

your IDE has a way to add an RC file to the project
that is what you really want to learn how to do, if you are to stay with that IDE
the IDE compiles the RC file and links the OBJ for you

jayanthd

Quote from: dedndave on March 17, 2013, 03:07:08 AM
Quote from: qWord on March 17, 2013, 02:25:43 AM
being not happy with daves hack, I've reworked the example: Coloring and calculation is separated and the code is TCHAR aware  :biggrin:

qWord
::)

Jay
RC files are not ASM INClude files - they actually follow C syntax
you must compile them using rc.exe - or use Pelle's linker
if you use rc.exe, it creates an OBJ file that can be linked with the rest of your program

your IDE has a way to add an RC file to the project
that is what you really want to learn how to do, if you are to stay with that IDE
the IDE compiles the RC file and links the OBJ for you


I have placed all your files + rsrc.rc in the same folder and using Build All command. I am using MASM32. Where is the menu to build RC files? I tried even opening RCDlg.rc file in MASM32 and used Compile Resource file but it is giving error rsrc.res file not found.


I put rc.exe in the project folder and used the command C:\qwordrcdlgmod\rc rcdlg.rc but the .obj file is not created.

dedndave

ahhh - ok
in the masm32\bin folder, you will find a number of batch files
and, if you use Hutch's QuickEditor (qe.exe), they may be accessed through the menus

with Hutch's original batch files, the resource file should be named rsrc.rc
you can modify the batch files to first look for ProjectName.rc

these batch files will show you what the process is for building ASM projects   :t

jayanthd

Quote from: dedndave on March 17, 2013, 03:21:05 AM
ahhh - ok
in the masm32\bin folder, you will find a number of batch files
and, if you use Hutch's QuickEditor (qe.exe), they may be accessed through the menus

with Hutch's original batch files, the resource file should be named rsrc.rc
you can modify the batch files to first look for ProjectName.rc

these batch files will show you what the process is for building ASM projects   :t


See my last post. It is updated. See attachment in this post. Tell me the method to Compile RCDLg.rc file

qWord

Quote from: dedndave on March 17, 2013, 03:07:08 AM
Quote from: qWord on March 17, 2013, 02:25:43 AM
being not happy with daves hack, I've reworked the example: Coloring and calculation is separated and the code is TCHAR aware  :biggrin:

qWord
::)
for your mod, type a number in and press the button several times to see why I'm not happy with that solution.
MREAL macros - when you need floating point arithmetic while assembling!

qWord

Quote from: jayanthd on March 17, 2013, 03:15:14 AMI put rc.exe in the project folder and used the command C:\qwordrcdlgmod\rc rcdlg.rc but the .obj file is not created.
yes, instead the the file rcdlg.res should be created. This file must be specified beside the object file, which is created by MASM:
link rcdlg.obj rcdlg.res
MREAL macros - when you need floating point arithmetic while assembling!

dedndave

here is qWord's latest version - plus a batch file i made to build it
unzip the attachment and double-click on the batch file

dedndave

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

jayanthd

Quote from: qWord on March 17, 2013, 03:44:12 AM
Quote from: jayanthd on March 17, 2013, 03:15:14 AMI put rc.exe in the project folder and used the command C:\qwordrcdlgmod\rc rcdlg.rc but the .obj file is not created.
yes, instead the the file rcdlg.res should be created. This file must be specified beside the object file, which is created by MASM:
link rcdlg.obj rcdlg.res


Is it link rcdlg.obj rcdlg.res or link rcdlg.res rcdlg.obj ?