Hardware Reference
In-Depth Information
Figure 5.5 Screen messages produced during the Console Assemble and Link
process. The executable file is named compare.exe whilst the object code file is
compare.obj.
less:
print chr$("The number you entered is less than 10",13,10)
over:
ret
main endp
end start
; Tell MASM where the program ends
The code is entered using MASM32's editor (part of the IDE). After saving
the source code file as compare.asm, Console, Assemble, and Link are used to
automatically produce and execute program Link (see Figures 5.4 and 5.5).
The executable file (compare.exe) can then be tested by entering the name of
the executable file at the command line (see Figure 5.6). Notice that the current
directory has been changed to C: \ MASM32 in which the executable file has
been saved.
Finally, if necessary, MASM32's disassembler can be used to provide infor-
mation about the executable code. The following is a short extract from the
information generated by MASM32's disassembler:
C:\masm32\compare.exe
(hex)
(dec)
.EXE size (bytes)
490
1168
Minimum load size (bytes)
450
1104
Overlay number
0
0
Initial CS:IP
0000:0000
Initial SS:SP
0000:00B8
184
Minimum allocation (para)
0
0
Maximum allocation (para)
FFFF
65535
Header size (para)
4
4
Relocation table offset
40
64
Relocation entries
0
0
Portable Executable starts at
b0
Signature
00004550 (PE)
Search WWH ::




Custom Search