Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
actually necessary to run MASM; most of them will have nothing to do with it!
*NOTE: The EULA implies that you should have a licensed version of either "Visual
Studio" or "Visual C++" (something you would definitely need to have if you wanted to
legally sell a "commercial" program using MASM!). However, the letters that Jon Kirwan
exchanged with a Microsoft employee (see link above) seem to imply that Microsoft wants
to encourage academic (personal?) use of MASM so long as you do not go to them with
'support questions' without a valid license. If you feel a need to pursue this any further,
you'll have to go to Microsoft (and/or others) for answers.
3) Create a directory for MASM, such as C:\MASM615.
4) Use your favorite .CAB tool, such as
WinZip (demo available) which can extract
files from .CAB archives, to extract only the following files to the directory you just
created:
ml.exe
385,072 bytes 03/16/2000 04:20p
ml.err
9,687 bytes 03/16/2000 04:20p
[ Although Windows XP/2003 can work with .zip archives, it appears you cannot extract
individual files from .CAB archives using only the OS. Does anyone know of a free .CAB
extraction tool? ]
MasmRef.doc (513,536 bytes; 08/09/2000, 2:28 PM), will also be helpful to you; feel
free to look through "procpack.chm" as well, though its mostly for professional
programmers.
Although they're not really necessary, you might as well grab these next two files:
h2inc.exe 249,344 bytes 09/19/1995 02:04p
h2inc.err
21,880 bytes 09/19/1995 02:04p
'h2inc' allows you to convert C language include files into assembly include files; we've
never used it, but you might find a need for it some day.
5) Download the file, LNK563.EXE, from either here: HTTP site or here: FTP site into
your MASM directory.
6) You can either open this self-extracting file (LNK563.EXE) with a .ZIP tool such as
WinZip, or execute it; if you do the latter, delete the README.TXT file which can be very
confusing as it refers to this file as a "patch," but these are the full versions of:
LINK.EXE 364,544 bytes 01/13/1995 02:10p and
CVPACK.EXE 169,472 bytes 01/13/1995 02:10p (A CodeView debug information
compactor which most of you won't ever have a reason to use, but here it is.)
And that's all there is to it! You're now ready to compile programs from any
.asm source code written for MASM. Open a DOS-box (see "Helpful HINT"
below) at your MASM directory, and ENTER ml /? > ML.TXT at the
prompt. ML.TXT will then contain a simple listing of all the switches you can
use with MASM. ENTER ml all by itself, and you should see:
At this point, I'd recommend going through a very nice tutorial by Jon Kirwan
called:
Learn ASM. It not only covers the basics of using MASM along with
some example source code, but includes valuable information on subjects such
as the PSP (Program Segment Prefix), the difference between a .COM and
.EXE program file, the EXE Header fields at the beginning of all .EXE files
plus historical background you'd rarely find in most tutorials.
Once you've done that, go ahead and download the following .asm source
code which will teach you a bit more about Assembly code under MASM:
DOSWIN.ASM. (Download to your MASM directory and follow the instructions
inside the file.) After compiling and running the program, you should open it
under DEBUG and step through each instruction until you have understood
what each of them do!
In one of the paragraphs above, I mentioned that you can now compile .asm
source code "written for MASM." This refers to the fact that souce code written
for other assemblers, such as Borland's Turbo Assembler (TASM) which we
also consider to be quite good, may use Macro statements which MASM has
no idea how to understand, and vice versa. Note that the command-line
switches used by a particular assembler often have a completely different
function under that of another! A seasoned x86 programmer will most likely
have learned how to translate the source code for one to the other (or be able
to slog through it) out of necessity, needing to implement some code snippets
found only for one in a project using another assembler. Sooner or later, you'll
need to consult the manuals which describe all the special directives you can
use under each assembler. For now though, you should concentrate on
learning the basic Assembly mnemonics used by all of them.