Professional Documents
Culture Documents
MASM613
MASM613
Using?
Like most function files, the MASM.exe file is
constantly updated. In production, typically some
date is chosen as a production date, but changes
continue.
If you are using only the Purple version of the
Irvine book (3rd Edition), you are probably using
MASM 6.13.
If you have the 4th Edition of the book, you are
using MASM 6.15.
To be certain, type from the command line
C:> dir MASM*
What to type on
the Command Line
to assemble hello.asm
C:> Path = c:\masm613\bin
C:> Masm hello
MASM.exe
In lab, you type:
C:> masm hello,hello,hello
This is (source filename, object filename, listing
filename)
What to type
on the Command Line
to Link Hello.obj
Want to link Hello.obj with any external files used
in the source code (none needed)
Want to create an executable file
C:> Path = c:\masm613\binr
C:> Link hello
Link.exe
16-bit linker supplied with Microsoft Assembler.
Link.exe also has many options.
Use /CO to add Codeview information into the
executable file.
You type:
C:> Link /CO hello,,,,,
This is (objectfile, executable filename, mapfile,
libraries, deffile)
Appendix D and QH
Appendix D in the 4th Edition has the
options for LINK listed.
QH Microsoft Helper
You type:
C:> qh
ML.exe
When you type masm , another program
is invoked.
ML
Assembles and links one or more assembly
language source files. The command line
options are case sensitive.
ML options fn options fn /link linkoptions
You type
C:>link /CO
objectfilename,,,c:\masm615\lib\irvine16,,
Irvine16.INC
This is a text file that can be modified. You
can modify it to meet your needs. Note that
the model size is set. That line could be
changed. Also with the .386 line.
Memory Models
SMALL memory model
One code segment(64K) and one data
segment(64K). All code and data are near, by
default.
MEDIUM memory model
Multiple code segments and a single data
segment
Lab 6 changes
Part A does not have to be changed to use MASM
6.15
Part B
Note that Writeint does not allow outputs for bin, octal,
unsigned, etc (use WriteBin, WriteDec, WriteHex,
WriteInt instead)
Need to add Include Irvine16.inc
Part C
Again need to change Writeint to Writedec
Need to add Include Irvine16.inc