Question about joining multiple files/projects (RadASM 3.x)

Started by Shooter, December 20, 2010, 04:25:33 AM

Previous topic - Next topic

Shooter

Is it possible to join multiple files and/or projects, particularly the RC files or dialogs, with one master .asm file in RadASM 3.x?
Never use direct references to anything ever. Bury everything in
macros. Bury the macros in include files. Reference those include
files indirectly from other include files. Use macros to reference
those include files.

Gunner

in your asm file you can use the include directive (if that is what it is?)

I split my projects up so in one of them I include the other asm files like so:
include protos.inc
include equates.inc
include structures.inc

include strings.inc
include data.inc
include   subclasses.asm
include keys.asm
include   submit.asm
.code
...
...

for resource files (.rc) you can use the #include word
#include "somefile.rc"
~Rob (Gunner)
- IE Zone Editor
- Gunners File Type Editor
http://www.gunnerinc.com

Shooter

Cool. Thanks. I had tried to combine two .asm files before, but it caused a lot of errors. I'm working them though.

-Shooter
Never use direct references to anything ever. Bury everything in
macros. Bury the macros in include files. Reference those include
files indirectly from other include files. Use macros to reference
those include files.

Shooter

When creating multiple 'subroutines', but keeping them in their own file, is it better to use the .ASM extension, or .INC?

Where should I put the INCLUDE statement? In the original .ASM file, or the original .INC file? Should I put them ahead of all the other INCLUDES, or does it matter?
Never use direct references to anything ever. Bury everything in
macros. Bury the macros in include files. Reference those include
files indirectly from other include files. Use macros to reference
those include files.

donkey

In a multipass assembler like MASM it should make little difference where you include your ASM and INC files. In my MASM projects I tend to put them into the main INC file and include that in the main ASM file as the first line after the assembler directives. As long as you have PROTOs forward references will be resolved so there should not be a problem inlcuding them anywhere before the END statement. For which extension to use I generally use ASM for any file that contains a majority of code and INC for files that predominantly contain equates and macros, though again since MASM does not care what extension is used it is your choice.
"Ahhh, what an awful dream. Ones and zeroes everywhere...[shudder] and I thought I saw a two." -- Bender
"It was just a dream, Bender. There's no such thing as two". -- Fry
-- Futurama

Donkey's Stable

Shooter

QuoteAs long as you have PROTOs forward references will be resolved so there should not be a problem inlcuding them anywhere before the END statement.

What do you mean "forward references"?
Never use direct references to anything ever. Bury everything in
macros. Bury the macros in include files. Reference those include
files indirectly from other include files. Use macros to reference
those include files.

FORTRANS

Hi,

   MASM processes your ASM file sequentially.  A forward
reference is a reference to a symbol, usually a label, it has
not seen up till then.  This means MASM has no idea of its
location or propertiies.


        CALL Forward
...
Forward PROC    src:DWORD, lpdest:DWORD


   And INVOKE needs to know the size of the parameters
to push.  And the like.

Regards,

Steve N.

Shooter

Ohhhhhhh, I get it now.

QuoteAs long as you have PROTOs (comma), forward references will be resolved (comma), so there should not be a problem including them anywhere before the END statement.
:bg
Never use direct references to anything ever. Bury everything in
macros. Bury the macros in include files. Reference those include
files indirectly from other include files. Use macros to reference
those include files.

donkey

Quote from: Shooter on February 27, 2011, 08:25:54 PM
Ohhhhhhh, I get it now.

QuoteAs long as you have PROTOs (comma), forward references will be resolved (comma), so there should not be a problem including them anywhere before the END statement.
  :bg

Perhaps you are not a native English speaker so I can see where you had problems understanding the sentence. However, rest assured that the punctuation is absolutely correct.
"Ahhh, what an awful dream. Ones and zeroes everywhere...[shudder] and I thought I saw a two." -- Bender
"It was just a dream, Bender. There's no such thing as two". -- Fry
-- Futurama

Donkey's Stable

Shooter

Quote from: donkey on February 28, 2011, 12:50:53 AM
Perhaps you are not a native English speaker so I can see where you had problems understanding the sentence. However, rest assured that the punctuation is absolutely correct.

Edgar,
I am a native English speaking person, but without hearing the inflection in someone's voice and the slight pause where I placed (comma)s, the sentence was confusing to me. Me understandy now. :lol

-Shooter
Never use direct references to anything ever. Bury everything in
macros. Bury the macros in include files. Reference those include
files indirectly from other include files. Use macros to reference
those include files.