10.0
SOFTWA~EIMPLEIVIENTATION
EXAMPLES
10.1 METHODS OF SOFTWARE IMPLEMENTATION
Several different approaches are possible in developing software for the Z·80 (Figure 10.1). First of
all, Assembly Language or PL/Z may be used as the source language. These languages may then be trans·
lated into machine language on a commercial time sharing facility using a cross-assembler or cross-compiler
or, in the case of assembly language, the translation can be accomplished on a Z-80 Development System
using a resident assembler. Finally, the resulting machine code can be debugged either on a time-sharing
facility using a Z-80 simulator or on a Z-80 Development System which uses a Z80-CPU directly.
SOURCE
LANGUAGE
ASSEMBLY
LANGUAGE
PL/Z OR OTHER
HIGH LEVEL
LANGUAGE
TRANSLATION
RESIDENT ASSEMBLER
CROSS ASSEMBLER
CROSS COMPILER
FIGURE 10.1
DEBUGGING
DEVELOPMENT
SYSTEM
SIMULATOR
In selecting a source language, the primary factors to be considered are Clarity and ease of program-
ming vs. code efficiency. A high level language such as PL/Z with its machine independent constructs is
typically better for formulating and maintaining algorithms, but the resulting machine code is usually
somewhat less efficient than what can be written directly in assembly language. These tradeoffs can often
be balanced by combining PL/Z and assembly language routines, identifying those portions of a task which
must be optimized and writing them as assembly language subroutines.
Deciding whether to use a resident or cross assembler is a matter of availability and short-term vs.
long-term expense. While the initial expenditure for a development system is higher than that for a time-
sharing terminal, the cost of an individual assembly using a resident assembler is negligible while the same
operation on a time-sharing system is relatively expensive and in a short time this cost can equal the total
cost of a development system.
Debugging on a development system vs. a simulator is also a matter of availability and expense com-
bined with operational fidelity and flexibility. As with the assembly process, debugging is less expensive on
a development system than on a simulator available through time-sharing. In addition, the fidelity of the
operating environment is preserved through real-time'execution on a Z80-CPU and by connecting the I/O
and memory components which will actually be used in the production system. The only advantage to
the use of a simulator is the range of criteria which may be selected for such debugging procedures as trac-
ing and setting breakpoints. This flexibility exists because a software simulation can achieve any degree of
complexity in its interpretation of machine instructions while development system procedures have hard-
ware limitations such as the capacity of the real-time storage module, the number of breakpoint registers
and the pin configuration of the CPU. Despite such hardware limitations, debugging on a development
system is typically more productive than on a simulator because of the direct interaction that is possible
between the programmer and the authentic execution of his program.
63
Need help?
Do you have a question about the Z80-CPU and is the answer not in the manual?
Questions and answers