Including an Assembler module in APP does not generate an EXE

I have some procedures in assembler, but I don’t remember since which version of clarion, when I compile an app including those modules, it compiles ok but doesn’t generate the exe.
Does anyone have any idea why?
(it’s not very important because I always found some way to replace it)

Assembler modules can be compiled and produced OBJ files can be linked into Clarion DLLs/EXEs in any version of Clarion. The format of .A files is different from MS’s ASM files but nothing is too extraordinary.

1 Like

Alexey, any tips how to make an obj file? No matter what I do obj file is not created.
I’m trying to use your FastMath.a provided in another thread.

Using C11.1.13815.

  1. Add the FastMath.a file to the test project in the Solution Explorer, build the solution. Output pane says:

Making fastmath.obj : file does not exist
made fastmath.obj
Build Finished Successfully.

Actually no fastmath.obj, no test.exe.
In the Obj\Debug\test.cwproj.FileList.xml there is Created Files section:




but as I said earlier there is no fastman.obj in that folder, nor in entire hard disk.

  1. Create new Win32.DLL solution, renamed FastMath.clw to FastMath.a, replace default clw code with the asm code, complie - same result.

Interesting thing: when FastMath.a file is added to the solution, and the functions from FastMath.a file are declared in MODULE, and those functions are called in clw code, no errors on compilation happen, and produced test.obj contains __SIN and __COS entries.

after adding the .a file, did you set its action = compile ?

(I always forget)

Yes I did, still no obj, no exe.

  1. The Clarion IDE shows the extension for the assembler files in the list of compilers (Tools->Options->Clarion->Clarion For Windows->Versions->Compilers tab). The correct extension is .a
  2. If to use the .asm extension for assembler files, the project system isn’t being known what to do with these files even if action for them is set to “Compile”.
  3. If to use the correct extension .a, the solution manager isn’t being known how to process assembler files. Therefore, it’s need to open the Properties panel for the .a file and set the “Compile” action manually. After that, the assembler file is being compiled during the solution/project build. (1.9 KB)
1 Like

After completely deleting and recreating the solution all is fine now with .a file.

Also should add that following statement works as well:

I was going to say, I’ve been compiling .a files in c5 and c6 for years without any problems like this so I’m glad it working now for you.

I continue having the same problem.
I have a module written in assembler, included in a very big program, and it compile and link ok.
But, when I add some instructions to one function included in the module, the build finish successfully, but it does not generate the object for the module, and of course does not generate the exe.
I try the PRAGMA mentioned without results.
Anybody, any idea ??

Do you have some conditional compilation blocks in the assembler module?
Did you change some segment declarations?

Didn’t change anything.
Only add some new instructions (try with different sequences, all compiling ok)
I have used some years ago assembler modules with cw6 without any problem.
Only have this problem with cw10 and 11.

Isn’t that a change? :slight_smile:
Could you provide the file in the variant when the code is not generating? Or, at least, the same fragment of code in “good” and “bad” variants with ~20 instructions before and after.

Here is a minimal sample of code that shows the problem.
Compiling with “paux1.a” all is ok. It compiles, links and execute.
If you change the assembler module adding a few instructions (like in “paux1b.a”) it fails. It doen’t generate the obj for the “a” module.
As you can see, there are only 3 instructions added.

link to code sample (2935 bytes):

(sorry, but I don’t know how to add the sample to my answer)

using CW 11.1.0 build 13810 EE

There is no such instruction - movb . The Clarion assembler is simple and it is intended for writing relatively small functions implementing things which can’t be done effectively using C++ or Clarion. It knows generally the “classic” set of instructions from early Pentium processors. But the movb instruction is missed even in the newest instruction set:

As far as I can see, you need to use just the

mov r8, m8


mov m8, r8

modifications of the mov instruction:

It appoears that you are right. I complete the assembler function taking care of using only the admitted opcodes and it compile and execute ok. Stupid mistake of my part.
Now I remember that many years ago, having to use “db” for replacing the inexistent codes led me to look for a way to generate the OBJ using some other tool.
thank for your help. regards

I see under debugger that the assembler detects errors in instructions names successfully and passes the error to the Project System but they don’t appear in the output. Probably, the Project System is not processing messages from the assembler correctly.

1 Like