Hardware Reference
In-Depth Information
For POSIX-compliant platforms, there is a
Makefile
in the source directory which
does the job. For Windows, there is a batch file
make.bat
. It may be necessary to
move the executable files after compilation to a program directory, or to change the
PATH variable to make the assembler
as88
and the tracer
t88
visible from the
directories containing the assembly source codes. Alternatively, instead of typing
t88
, the full path name can be used.
On Windows 2000 and XP systems, it is necessary to install the
ansi.sys
termi-
nal driver by adding the line
device=%systemRoot%\System32\ansi.sys
to the configuration file,
config.nt
. The location of this file is as follows:
Windows 2000:
\winnt\system32\config.nt
Windows XP:
\windows\system32\config.nt
On
UNIX
and Linux systems, the driver is usually standard.
In Sec. C.2 through Sec. C.4, we discussed the 8088 processor, its memory,
and its instructions. Then, in Sec. C.5, we studied the
as88
assembly language
used in this tutorial. In Sec. C.6 we studied the tracer. Finally, in Sec. C.7, we
described how to set up the toolkit. In theory, this information is sufficient to write
and debug assembly programs with the tools provided. Nevertheless, it may be
helpful for many readers to see some detailed examples of assembly programs and
how they can be debugged with the tracer. That is the purpose of this section. All
the example programs discussed in this section are available in the
examples
direc-
tory in the toolkit. The reader is encouraged to assemble and trace each one as it is
discussed.
Let us start with the example of Fig. C-12,
HlloWrld.s
. The program is listed
in the left window. Since the assembler's comment symbol is the exclamation
mark (!), it is used in the program window to separate the instructions from the line
numbers that follow. The first three lines contain constant definitions, which con-
nect the conventional names of two system calls and the output file to their corre-
sponding internal representations.
The pseudoinstruction .
SECT
, on line 4, states that the following lines should
be considered to be part of the TEXT section; that is, processor instructions. Simi-
larly, line 17 indicates that what follows is to be considered data. Line 19 initial-
izes a string of data consisting of 12 bytes, including one space and a line feed (\n)
at the end.