News:

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

Main Menu

SASM Problem

Started by peaslee, September 16, 2023, 07:45:34 AM

Previous topic - Next topic

peaslee

I like SASM, but I cannot get it to compile my MASM32 code.

I get the following errors:

MASM : fatal error A1000: cannot open file : SOURCE
LINK : fatal error LNK1181: cannot open input file "C:/Users/bruce/AppData/Local/Temp/SASM/program.o"

I have fiddled with the settings to no avail.

zedd151

Offhand, I would say it is a configuration issue. Is this your first time using SASM? Or have you been using it, and suddenly have this issue?

Do the examples in your masm32 directory assemble and link okay, with the included "makeit.bat" batch files?

I don't use SASM, in fact it is the first time I have heard of it, I Googled it, so I know that it is an IDE.
What version of SASM are you using. If that version is still available, I might be able to download and install it, to help you further.

zedd151

#2
I have downloaded SASM version 3.14.0 to test with.

These are the settings that I used:
These are the default settings that were already present, except that I changed "SUBSYSTEM:CONSOLE" to  "SUBSYSTEM:WINDOWS" and checked the "Build in current directory" checkbox.
Of course, if your program is a console program, use "CONSOLE", instead.

(Click on image to view full size.)
Apparently SASM does its work in the user TEMP folder by default, I have not looked into changing that, nor had I explored or modified any other options, or settings.

You can save the executable anywhere by using "Save .exe" from the "File" menu.

This is the result of opening the masm32 example "minimum" from "\masm32\examples\minimum\minimum.asm", in SASM. (By double clicking on the 'minimum.asm' file)
It displays a simple Message Box.

From the Build menu, I selected "Build and run"
This is my result:

(Click on image to view full size.)
Success! And my first time using it.

You may need to change the path to "ml.exe" and "link.exe", if you have the MASM32 SDK on another drive or partition.

I hope that this information helps you.  :thumbsup:

Edited for better clarity. :smiley:

zedd151

If you still cannot get your program to assemble and link okay, try this...

Run a quick test for me. Go to C:\examples\exampl01\generic\ and run "makeit.bat" by double clicking on it. If you have Masm32 on another drive, replace "C" with the drive letter for your drive. Masm32 should be installed in the root of that drive.

Does it assemble and link okay? If not, are you running antivirus software? Have you been able to assemble and link any other program by any other means?

Another thing that I have noticed, is that SASM seems to not have provisions for using resource files. Does your program use a resource file (*.rc)? We can deal with that, once you are able to assemble and link a simple program that does not use resources.  :smiley:

I will do further testing with SASM as time permits...
Another quick question, do you know how to write a batch file (*.bat) to assemble and link your source code?
If not, we can help with that.





jj2007

SASM has indeed problems :thumbsup:

Dragging works, and the example assembles just fine, but then you discover...
- that it has no MRU (meaning you have to go looking for your sources in your whole machine...)
- if you find the source in Explorer, it may complain that the source doesn't exist, see screenshot
- that comments don't work properly
- that the debugger expects GDB commands
- that overall the interface and functionality are very, very poor
- that SASM needs a whopping 69MB for this poverty

QEditor beats it hands down.

Zedd, you have written much better editors ;-)

*** Warning: when hitting F9 to build the project, it saves to disk whatever you changed, without any warning, not even on exiting SASM - dangerous behaviour ***

zedd151

Seems to work alright here... even when the source file is on another partition. Using the same settings as in the first example above. (Not that all of those ml and link options are necessary, except if using the integrated debugger functions)

(Click image for full size view)
But as metioned, it does not take into account a resource file. I am trying to help peaslee here. Not trying to point out any flaws in SASM, which it may have.  :smiley:

peaslee

Hi. I can now compile and run. Thanks for that. However, the resource file is a problem: the image and menu for the main window do not show up.

"Zedd, you have written much better editors ;-)" Maybe it would be simpler to point me in that direction. I like code coloring and one-click compilation.

zedd151

Quote from: peaslee on September 17, 2023, 01:25:07 AMHi. I can now compile and run. Thanks for that. However, the resource file is a problem: the image and menu for the main window do not show up.

"Zedd, you have written much better editors ;-)" Maybe it would be simpler to point me in that direction. I like code coloring and one-click compilation.
I am sorry peaslee, I only write simple file editors, not IDE's. No functionality that one would normally find in an IDE. Have you tried RadAsm? Notepad++? There are others, but I forget their names. Perhaps another member can offer suggestions for a different IDE.

Glad that you were able to get your program going, albeit without resources.

One thing that I do like about SASM, is the ability to debug the source and single step the code from within the IDE. I will play with it over the coming days, and try to figure out an easy way to use resources in it, without much hassle.

jj2007

Quote from: peaslee on September 17, 2023, 01:25:07 AMI like code coloring and one-click compilation.

I love colours! One-click assembly is possible but usually I just hit F6 to build my stuff. The IDE knows automagically whether you have resources, and whether it's a GUI or a console application.


NoCforMe

Quote from: peaslee on September 17, 2023, 01:25:07 AMI like code coloring and one-click compilation.

Then you might want to try out JJ's MasmBasic. I'm not a fan of it myself, but it's a pretty amazing "programming environment". It slices, it dices, it's a dessert topping and a floor wax.

Seriously, it's very kewl stuff. And best of all, the author is right here in case you run into any snags.
Assembly language programming should be fun. That's why I do it.

zedd151

Quote from: peaslee on September 17, 2023, 01:25:07 AMHowever, the resource file is a problem: the image and menu for the main window do not show up.
Adding "rsrc.res" to the link.exe options works, but that is not an ideal situation if you have to precompile the resources seperately (voids the notion of 'one click' operation).

Also, I can confirm what jj2007 said about SASM saving changes to the disk file without warning, or 'confirmation to continue', (even if you have not explicitly used "Save", or "Save as"). Definitely not what you would expect from an IDE.

I would not use this for any serious work, and if you do, it might be prudent to always make a backup copy of your source before processing it with SASM.

The 'help' available is very sparse, and does not cover many things that it should (how to add resources, in particular, is very annoying).

All of that being said, I would not recommend the use of this program.
Some of its features may be nice and desirable, but it has too many undesired "features" (bugs) to be of any real use.
This ends my journey in testing this program.

peaslee

Quote from: zedd151 on September 17, 2023, 04:46:59 AM
Quote from: peaslee on September 17, 2023, 01:25:07 AMHowever, the resource file is a problem: the image and menu for the main window do not show up.
Adding "rsrc.res" to the link.exe options works, but that is not an ideal situation if you have to precompile the resources seperately (voids the notion of 'one click' operation).

Also, I can confirm what jj2007 said about SASM saving changes to the disk file without warning, or 'confirmation to continue', (even if you have not explicitly used "Save", or "Save as"). Definitely not what you would expect from an IDE.

I would not use this for any serious work, and if you do, it might be prudent to always make a backup copy of your source before processing it with SASM.

The 'help' available is very sparse, and does not cover many things that it should (how to add resources, in particular, is very annoying).

All of that being said, I would not recommend the use of this program.
Some of its features may be nice and desirable, but it has too many undesired "features" (bugs) to be of any real use.
This ends my journey in testing this program.

I really appreciate the work. Thanks a lot. I will take your advice and look elsewhere.

zedd151

Quote from: peaslee on September 17, 2023, 05:30:14 AMI really appreciate the work. Thanks a lot. I will take your advice and look elsewhere.
It wasn't too much trouble, but you're welcome.  :thumbsup:
I'm sorry that it didn't live up to your expectations. The description for it sounded really good, I thought it might just be a very useful tool to add to my collection. But it does indeed have too many flaws. Perhaps they will offer an updated version at some point, with all of the bugs (mentioned and unmentioned) fixed. If that happens, I would try it again.  :smiley: