The MASM Forum Archive 2004 to 2012

General Forums => The Campus => Topic started by: xdc on April 30, 2012, 04:15:59 AM

Title: cant run my MASM program
Post by: xdc on April 30, 2012, 04:15:59 AM
I installed a disassembler just to see how it was, etc
One of the disassembler I installed had me install 'visual c++ redistributable x64'.

After which when I created my programs with masm, It would show a error when I went to ran it
http://desmond.imageshack.us/Himg254/scaled.php?server=254&filename=errorse.jpg&res=landing

Should be able to run like before no problem, I uninstalled the vc++ redist x64 packages, and the disassembler - it still does it.

It never did this before. I have windows 7 64-bit
Title: Re: cant run my MASM program
Post by: dedndave on April 30, 2012, 04:32:40 AM
well - the code in the background...
.model small
.stack.....
is for a 16-bit program   :P
Title: Re: cant run my MASM program
Post by: dedndave on April 30, 2012, 04:34:41 AM
try this...
        .586
        .MODEL  Flat,StdCall
        OPTION  CaseMap:None

Title: Re: cant run my MASM program
Post by: xdc on April 30, 2012, 04:36:47 AM
    .386
    .model flat, c
    .code

start:
end start


I ran that, and any other example source for masm and it still does it

edit: I ran this:

        .586
        .MODEL  Flat,StdCall
        OPTION  CaseMap:None
    .code

start:
end start


still gives me the same error
Title: Re: cant run my MASM program
Post by: dedndave on April 30, 2012, 04:40:32 AM
hmmm - you might have installed the redistributable for XP-64 or something

http://www.microsoft.com/en-us/download/details.aspx?id=13523

try uninstalling and re-installing
Title: Re: cant run my MASM program
Post by: xdc on April 30, 2012, 04:44:36 AM
these are the recent installs:
http://i49.tinypic.com/35mgr5v.jpg

i already uninstalled, ill try
Title: Re: cant run my MASM program
Post by: dedndave on April 30, 2012, 04:46:34 AM
the link i posted is for 2010 SP1  :U
Title: Re: cant run my MASM program
Post by: xdc on April 30, 2012, 05:00:54 AM
i went back to restore point before the installs, came up with new error 'is not a valid win32 application',
then i updated ml.exe, and link.exe from VC/bin folder (visual c++ 2010), and the error is back again
Title: Re: cant run my MASM program
Post by: dedndave on April 30, 2012, 05:06:05 AM
http://www.duxcore.com/contact.html

the "not a valid win32 application" error may be caused by not having the proper DLL's in place for the ML/LINK EXE's

for masm version 9
mspdb80.dll

for masm version 10
msvcr100.dll
mspdb100.dll

as i recall, the DLL's have to be path'ed
best if you put them in the same folder as the EXE, too
Title: Re: cant run my MASM program
Post by: xdc on April 30, 2012, 05:41:46 AM
reinstalled masm32, visual c++ 2010 express, etc

tried with updated ml.exe/link.exe with the .dll from VC, etc still getting the two same error messages.

everything worked fine before :(
I hope i dont have to reinstall windows because of this...
Title: Re: cant run my MASM program
Post by: dedndave on April 30, 2012, 01:42:40 PM
i wish i could be more help
but - the guy that wrote that program isn't a forum member   :P

as for the runtime redistributable, that is a standard package
you might google around to see if others using win7-64 have had similar issues
the cure may be something simple - you just have to do a lot of reading to find it
Title: Re: cant run my MASM program
Post by: sinsi on April 30, 2012, 01:49:06 PM
The original problem looks to be because you are running 64-bit windows which won't let you run old DOS exe/com files (main.exe).
Title: Re: cant run my MASM program
Post by: dedndave on April 30, 2012, 01:55:08 PM
searching a round a little, i see that others have had problems uninstalling that disassembler completely and/or correctly
maybe that's the issue
Title: Re: cant run my MASM program
Post by: xdc on May 01, 2012, 07:36:25 AM
will installing windows 7 32-bit allow me to run these programs?

I only have 4 gigs of ram anyway, so to me I'm not losing anything. as long as I can conveniently run these programs

microsoft virtual windows xp gives me the same error,
dos box wont run 32 bit progs, etc
Title: Re: cant run my MASM program
Post by: dedndave on May 01, 2012, 02:23:37 PM
some of the other win7-64 users have found methods to run 16-bit programs (DosBox i think)
if you go to a 32-bit OS, you won't be able to write code for or run 64-bit programs   :P

i guess you have to decide whether your machine is "up to" being a 64-bit machine or not
for example, my machine has a prescott CPU that will supposedly do 64-bit
but i doubt that it really has enough muscle to handle win 7-64
3 GHz prescott, 2 Gb RAM
Title: Re: cant run my MASM program
Post by: xdc on May 01, 2012, 09:59:03 PM
well just to be sure, windows 7 32-bit will allow me to run these 16 bit programs, etc? (sorry)
because i've tried virtual XP and it gives me the same error.

i was thinking dual boot: windows 7 32bit, and Ubuntu 64 bit. All the other computers around here are also 64-bit
(thanks)

also what are the thoughts on inline assembly (vc++)?
Is it a good way to learn assembly? I want to write 100% assembly code, doing it through
vc++ seems to do some of the work for me
Title: Re: cant run my MASM program
Post by: Gunner on May 01, 2012, 10:20:34 PM
DOS is dead and support dropped from newer OS's (VISTA and above)  I use DFend-Reloaded as a front end to DOSBox this way I can run any 16bit code I write though some code doesn't work correctly and in that case, I fire up a XP virtual machine to run it.
Title: Re: cant run my MASM program
Post by: GregL on May 01, 2012, 11:43:25 PM
xdc,

Windows XP Mode on Windows 7 64-bit will run 16-bit programs. I know it will because I have done it.

It sounds like that debugger messed up your system.

As far as inline assembly, I wouldn't recommend it.

You could use ml.exe, link16.exe and OllyDbg.  Honestly, I have no idea which debuggers work with 16- bit code because it has been such a long time since I debugged any 16-bit code.

Do yourself a big favor and start with 32-bit code.
Title: Re: cant run my MASM program
Post by: xdc on May 01, 2012, 11:58:37 PM
Quote from: GregL on May 01, 2012, 11:43:25 PM
xdc,

Windows XP Mode on Windows 7 64-bit will run 16-bit programs. I know it will because I have done it.


ok, please forgive me, im a newbie

source code, no errors (32 bit?) (using vc++ 2010 ml and link.exe )
http://i45.tinypic.com/21l2uy0.jpg

run through virtual xp:
http://i45.tinypic.com/1zyh8gk.jpg
Title: Re: cant run my MASM program
Post by: GregL on May 02, 2012, 12:12:02 AM
xdc,

I edited my post above. I don't know what to say, I was able to run 16-bit programs in Window XP Mode on my Windows 7 64-bit system.
Title: Re: cant run my MASM program
Post by: GregL on May 02, 2012, 12:25:58 AM
xdc,

That's 32-bit code. I'm confused about what the problem is. It really looks like that debugger messed up your system.
Title: Re: cant run my MASM program
Post by: xdc on May 02, 2012, 12:38:52 AM
ok, im sure thats the problem too.

i guess im gonna have to reformat the harddrive.
as i did a fresh install of windows(to see if it would fix), but didn't erase the data
(it was moved to a windows.old)
Title: Re: cant run my MASM program
Post by: dedndave on May 02, 2012, 12:41:39 AM
if you do some research (via google)...
i saw an article someplace that described how to completely remove that debugger
apparently, it is problematic in uninstall
Title: Re: cant run my MASM program
Post by: xdc on May 06, 2012, 12:18:03 AM
sorry, i cant find anything. all i get is the sites asking me to install their software to uninstall etc ill keep looking
Title: Re: cant run my MASM program
Post by: xdc on May 26, 2012, 08:29:22 AM
I have reformated my harddrive(deleted files/partitions) ( through windows 7 cd).
Fresh install of windows 7 64-bit, downloaded all updates, visual c++ 2010 express, masm32, oracle virtualbox, notepad++

tried to run a 32 bit masm program, still didn't work. tried it through virtual xp mode, still got the same errors from before the reformat.
tried running it with both 16 - 32 bit programs on both windows 7/virtual xp, I think i even tried 64 bit but still got the same error, etc
I got some error from before about virtualization tech on cpu not being enabled before installing virtual xp, even though virtualbox installed fine, and
when i went to BIOS virtual etc was already enabled, so i installed a patch for virtual xp to make it work 'without it'.

So either I didn't completely wipe my harddrive,
something is wrong in BIOS settings,
im installing something else that could be messing it up,
or masm32 wasnt meant to work on my computer using windows 7 64 bit with virtual xp, etc

I can't program in assembly without masm, etc every documentation i've been reading is using masm, etc 'art of assembly'...


anyway, im thinking about completely wiping the harddrive, and installing Ubuntu 64, or ubuntu server ( been wanting to try out server OS)
I'm getting problems installing ubuntu after the reformat, it wont load through cd, or installing in windows, etc ubuntu server only seems to load through CD
Is there a program I can use to program using masm syntax etc for Ubuntu?

Do you have any suggestions as to what I can do. I've actually tried this on a laptop of mine that has windows 7 64 bit, installed virtual xp, masm32, etc still got the same errors.
Gonna have to try it on another computer of mine to see if its not just my pc(edit just tried on another computer, windows 7 64bit, virtual xp, same errors)

Gonna have to try installing windows xp professional 32bit as another boot option