0% found this document useful (0 votes)
14 views1 page

Assembler - Windows Programming Tools

This chapter introduces Assembly language programming tools, focusing on beginners and highlighting the similarities between MS-DOS and Windows programming. It explains the two main programs involved in the translation process: the assembler (ML.EXE) and the linker (LINK.EXE), along with the use of the INCLUDE directive for organizing code. An example program is provided to illustrate these concepts, particularly the IDIV command for division operations.

Uploaded by

Vundek
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views1 page

Assembler - Windows Programming Tools

This chapter introduces Assembly language programming tools, focusing on beginners and highlighting the similarities between MS-DOS and Windows programming. It explains the two main programs involved in the translation process: the assembler (ML.EXE) and the linker (LINK.EXE), along with the use of the INCLUDE directive for organizing code. An example program is provided to illustrate these concepts, particularly the IDIV command for division operations.

Uploaded by

Vundek
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

Assembler.

Windows Programming Tools

In this chapter, I provide a brief introduction to Assembly language programming


tools. This chapter is intended for beginners; therefore, experienced programmers
can
skip it.
First, note that the title of this chapter is deceptive because compiling
technologies
for MS-DOS and for Windows have much in common. However, programming for
MS-DOS is gradually becoming a thing of the past.

The First Assembly Program and Its TranslationTwo main programs correspond to the
two stages of translation in Fig. 1.1: the

ML.EXE assembler[i] and the LINK.EXE linker (or TASM32.EXE and TLINK32.EXE in
Turbo Assembler). Suppose that the source file of your program written in Assembly
language is called PROG.ASM.

Quite often, it is convenient to split the source code into several parts and join
them at
the first stage of translation. This can be achieved using the include directive.
For
example, one file might contain the program code, and the constants and data (such
as
variable definitions) � along with the prototypes of external procedures � might be
placed into separate files. Such files often have the INC filename extension.

The example program in Listing 1.2, like the other programs provided in this
chapter,
is senseless. However, it demonstrates the convenience of using the INCLUDE
directive.
I'd like to remind you not to concentrate your attention on the obvious
microprocessor
commands. I'd only like to draw your attention to the IDIV command.
In this case, the IDIV command carries out the division operation over the operand
residing in the EDX:EAX register pair. By resetting EDX to zero, you specify that
the
entire operand is in EAX.
Program translation is carried out as specified earlier for MASM and TASM.

You might also like