• Aucun résultat trouvé

The Programl Development Process

Dans le document FORTRAN-a6 USER'S GUIDE (Page 23-27)

1. 1 The Compiler' and Run-Tinle System

1.4 The Programl Development Process

The Fortran-86 compiler and run-time libraries are part of the integrated set of tools that make up the total 8086 development solution for your microcomputer system.

Figure 1-1 shows how you use these tools to develop programs using Fortran-86. The shaded boxes represent Intel products.

The steps in the software: development proc(~ss are as follows:

1. Define the problem completely.

2. Outline the proposed solution in terms of hardware and software.

3. Design the software for your system. This important step may consist of several sub-steps, including breaking the task into modules, choosing the programming language, and selecting the appropriate algorithms. You may decide to code some modules in languages other than Fortran, such as 8086/8087/8088 Macro Assembly Language, PL/M-86, or Paseal-86.

4. Code your programs and enter them on the system by using a CRT-based text editor, such as CREDIT or AEDIT.

5. Use the Fortran-86 compiler to translate your Fortran program code.

6. Use the text editor to correct any compile-time errors reported by error messages, and retranslate the program.

7. Using LINK86 (and LOC86 if needed), link the resulting relocatable object module to the necessary run-time libraries supplied with Fortran-86 and the operating system. The use of LINK86 and LOC86 depends on your application;

for detailed instructions, see the iAPX 86, 88 Family Utilities User's Guide, order number 121616.

Overview

1-3

Overview

LEGEND

1;;;,j,;;IINTEL PRODUCTS

O

USER·CODED SOFTWARE

1-4

FORTRAN 86 SOURCE

OTHER RELOCAT·

ABLE OBJECT MODULES

RELOCAT·

ABLE OBJECT MODULE

LIBRARIES

Fortran-86

r---..,

I I

I I

LTL CODE

ABSOLUTE

I

OBJECT I--....:...t~

CODE

I L ____________ J I

CUSTOM·

DESIGNED USER SYSTEM

Figure 1-1. Fortran-86 Program Development Process 121570-1

Fortran-86

8. You now can run and debug your programs with the aid of Fortran's run-time error messages. Your execution vehicle for debugging can be any of the follow-ing: a Series-III system with its resident monitor and an ICE-86 or ICE-88 In-Circuit Emulator (optional) or PSCOPE, an iRMX-based system, RAM on an SDK-86 System Design Kit, or RAM on an iAPX 86,88 Single Board Computer with a resident monitor.

9. Translate and debug your other system modules, including those coded in other languages. Once you have performed the desired amount of testing on each module, you can link the modules and optionally locate them by using LINK86 and LOC86 ..

10. Test and debug your software in the selt:~cted debug environment.

11. Produce a final debugged object module and transfer it to the run-time environ-ment. This step is dependent on the environment and on the tools you are using.

When the environment is a development system, use the execution command to load and run your program.

• When the environment is RAM on an SDK-86 kit or an iAPX 86,88 Single Board Computer system, use OH86 to obtain a hexadecimal object code file.

Then, if you are developing your programs on a Series-III, use an appropri-ate tool for downloading them into the execution board (the ICE-86 In-Circuit Emulator, the SDK-C86 Software and Cable Interface, or the iSBC 957B Interface and Execution Package).

• When the environment is ROM on an SDK-86, iAPX 86,88 Single Board Computer system, or your own custom-designed hardware, use the Universal PROM Programmer (iUP) with its Universal PROM Mapper (UPM) software to burn your program into PROM.

Note that you can perform hardware and software development in parallel, and that you can take intermediate hardware/software integration steps by using the ICE-86 In-Circuit Emulator.

For instructiom on the use of other Intel products discussed in this section, refer to the manuals list~!d in the preface to this book.

Overview

1-5

·

'"

CHAPTER 2

program unit determines whether the compiler will treat the unit as a main program or a subprogram. Although it is optional, a main program usually has a PROGRAM statement as its first statement. A main program may contain any statements except BLOCK DATA, FUNCTION, or SUBROUTINE statements because these are used only to define subprograms. A main program cannot be referenced by a subprogram or by itself. A Fortran program can have only one main program, but it may contain any number of subprograms.

There are three kinds of subprograms: BLOCK DATA, FUNCTION, and SUBROUTINE. A BLOCK DATA subprogram begins with a BLOCK DATA statement, and provides initial values for variables and array elements in named COMMON blocks. A detailed description is in Chapter 6, "Subprograms."

Any executable program is called a procedure. FUNCTION and SUBROUTINE subprograms are external procedures. Either the main program or programs written in other iAPX 86,88 languages can call these procedures. A FUNCTION subpro-gram begins with a FUNCTION statement and returns a value when referenced. A SUBROUTINE subprogram begins with a SUBROUTINE statement. See Chapter 6 for a complete explanation of FUNCTION and SUBROUTINE subprograms.

2.2 Fortran Statements

In Fortran there are two kinds of statements: executable and nonexecutable. Execut-able statements do calculations, read or write data from external media, and control program execution. Nonexecutable statements define the characteristics or values of data and define program units. The following list classifies Fortran statements as executable or nonexecutable. You can find complete definitions in the chapters indicated below.

EXECUTABLE STATEMENTS:

• Arithmetic, logical, and character assignment statements (Chapter 8)

• ASSIGN statement (Chapter 8)

• Unconditional, assigned, and computed OOTO statements (Chapter 8)

• Arithmetic and logical IF statements (Chapter 8)

• Block IF, ELSE IF, ELSE, and END IF statements (Chapter 8)

• CONTINUE statement (Chapter 8)

• STOP and PAUSE statements (Chapter 8)

• DO statement (Chapter 8)

• READ, WRITE, and PRINT statements (Chapter 9)

• REWIND, BACKSPACE, ENDFILE, OPEN, and CLOSE statements (Chapter 9)

• CALL and RETURN statements (Chapter 8)

• END statement (Chapter 4) NONEXECUTABLE STATEMENTS:

• PROGRANl, BLOCK DATA, FUNCTION, and SUBROUTINE statements (Chapter 4)

Dans le document FORTRAN-a6 USER'S GUIDE (Page 23-27)