News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Hello (and a question)

Started by Tinito16, September 26, 2009, 06:10:24 AM

Previous topic - Next topic

Tinito16

This is my first post here so I'd like to say hi and introduce myself first. My name is Tino and I'm studying computer engineering at the University of Puerto Rico. I'm currently learning data structures (high level) and in another class we're doing assembly with MASM. I'm a total noob at this so I'm a bit confused about the whole thing... but all in all I'm understanding what we've taken so far.

Now, my question: when trying to link a file, I got an error message saying NTVDM.exe had stopped working. I could not link the file and therefore I could not create the .exe to debug or run it. I checked and NTVDM.exe turns out to be a process that makes running 16 bit apps in a 32 bit environment possible (from what I understood). I thought maybe my assembler was screwed up so I searched for it and downloaded it (MASM) but it said I needed Visual C++ 2005 to install it. I already have Visual Studio 2008...

I ran the program in Vista and it worked pretty much as advertised, but this week my computer vista-cided (would not boot up windows no matter what I tried) and I felt compelled to install Windows 7 instead of reinstalling Vista (wasn't a good experience at all). I formatted the hard drive (managed to back up my info thru command prompt) and installed Windows 7, but now that component of windows (NTVDM) seems to be either corrupted or it simply doesn't work with the MASM version I have. Everything else seems to be working fine. So a) what could it be, and b) what can I do about it?


Thanks!

hutch--

Tino,

Are you building 16 bit DOS applications ?
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php

Tinito16

I'm not quite sure but I think it is 16 bits. It's a simple adder. And yes I am running it from DOS.

Tinito16

Here is a screenshot of what I am experiencing. I have to run the command prompt as an admin (freaking post xp windows) and when I try to link to create the executable file, that error comes up.

MichaelW

What version of MASM and LINK are you using, and what is in your source file?

ML appears to be version 6.11.

Also, what are your command lines?
eschew obfuscation

Tinito16

I have no idea, I'll have to ask the professor because he just gave us the link to a .zip with everything we needed and that was it. Source file is "sum2.asm";

title suma de dos bytes
.model small
.data
marca     db '>>>>'
valor1    db 7
valor2    db 7
resultado db ?
.code
main proc
        mov ax,@data
        mov ds,ax
        mov al,valor1
        add al,valor2
        mov resultado,al

        mov ax,4c00h
        int 21h
main endp
end main

Some of it is in spanish but it basically just adds two numbers. It is identical to an example he gave us (Which I assembled and ran when I had Vista) except for the number 7 in "valor1"; it was a 5 originally.

dedndave

16-bit programs won't run under 64-bit vista
they should run under 32-bit vista, though
welcome to the forum Tino

sinsi

Some versions of link.exe were actually dos/os2 hybrids - I wonder if win7 still has the os2 subsystem?
Light travels faster than sound, that's why some people seem bright until you hear them.

Tinito16

Command Lines are:

C:\masm>masm sum2.asm,,,,

C:\masm>link sum2,,,,,

And then the error occurs.

This is what a succesful run (using the trace command in the debugger) is supposed to look like:



When I try to do the same with the file sum2.asm, I try to link it and debug it but the file isn't found:


Looked to see, but there is not sum2.exe file...

Tinito16

Quote from: dedndave on September 26, 2009, 08:32:14 AM
16-bit programs won't run under 64-bit vista
they should run under 32-bit vista, though
welcome to the forum Tino

I've got Windows 7 32 bit (x86). My previous operating system on this laptop was Vista Home Premium.

and btw thanks!  :U

Tinito16

Quote from: sinsi on September 26, 2009, 08:38:20 AM
Some versions of link.exe were actually dos/os2 hybrids - I wonder if win7 still has the os2 subsystem?

I don't know what that is but how can I find out?

MichaelW

Under Windows 2000, using ML 6.11 the source assembles without error, and using the 16-bit linker version 5.60.339 the object module links without error. The linker does issue a warning about there being no stack segment, but this will not prevent the EXE from working. My command lines were:

ML /c filename.asm

LINK16 filename.obj;

The /c option specifies that ML should assemble only, instead of the default assemble and link.

You can get the linker version by simply executing it.

I'm going to move this topic to the 16-bit DOS forum where it belongs.

eschew obfuscation

sinsi

Just wondering about that 'invoking ML' command line -
/Ta<file> Assemble non-.ASM file
/Zm Enable MASM 5.10 compatibility

And what is a .sbr file?

Light travels faster than sound, that's why some people seem bright until you hear them.

evlncrn8

you could try running it in dosbox (google), it might work then...

MichaelW

QuoteAnd what is a .sbr file?

Quote
.SBR -- Source browser file:

This file is created for each source file compiled with either the /FR or /Fr switch. This file contains symbolic information used by the Microsoft Browser Database Maintenance Utility (BSCMAKE) to produce a browser database file (.BSC file).

http://support.microsoft.com/kb/132340

eschew obfuscation