SUPERSOFT/SSS FORTRAN IV EXTENDED - CP/M VERSION 1.04 - 4/19/83 Copyright (c) 1982,1983 Small Systems Services Inc. Urbana, Il. All Rights Reserved Dear user: All available features in your 1.04 cpm Fortran package are described in the 1.01 users manual provided with the package. Just so that you will be aware of it, information on a Fortran feature is included below, although this feature is also covered in the Fortran users manual. Note that this feature is provided in addition to the standard Fortran language features, and knowledge or use of this feature is not required for standard Fortran programming. This additional feature is briefly described below. SUBSCRIPT CHECKING OPTION - If you desire that array subscripts be checked for validity at runtime, this feature can be enabled by adding the following state- ment to your source program: CALL SUBON% Subscript checking can be later disabled by the follow- ing statement: CALL SUBOF% Using the subscript checking feature will increase the size of your program, (additional object code and error message space is required). Also your program will exe- cute slightly slower with subscript checking enabled. Note that only the first two subscripts are checked by this feature, so that all 1 and 2 dimensional arrays are completely checked, while for three dimensional arrays only the first two subscripts are checked. IMPORTANT NOTES: This section contains information not covered directly in your 1.01 Fortran users manual. Please read and note the information contained in this section. 1. In Fortran DATA statements, REAL*8 (or DOUBLE PRECISION) items that are initialized with floating point constants, should be initialized with DOUBLE PRECISION constants to get the normally expected results. The 1.01 Fortran users manual describes the padding process applied to numeric constants, if necessary, in data statements. As described in the manual, padding takes place on the right of an initialization item, whereas IEEE floating point constants require conversion rather than padding because of the nature of the IEEE floating point repre- sentation, (described in an Appendix of the manual). EXAMPLE 1: REAL*8 ARRAY(100) DATA ARRAY/100*1.0D0/ EXAMPLE 2: REAL*8 ARRAY(100) DATA ARRAY/100*1.0/ Example 1 would produce the normally expected results, each element of the array initialized to a DOUBLE PRECISION 1.0 . Example 2 does not produce the normally expected results, since the single precision initialization constants are padded rather than being converted to DOUBLE PRECISION. We are considering changing the operation of the SSS Fortran system so that Example 2 would also give expected results in a future release. If you fill out and return the regis- tration card provided with the package, you will be informed of any such changes when they occur. 2. Although not noted in the manual the REWIND statement or the IOREW library function do not operate on files opened as random i/o files with IORAND. An error message is produced if the user attempts to rewind a random file. The user may use the standard random i/o facilities to seek to the first record in a file to accomplish a "rewind" of a random file. 3. As noted in the manual, binary numbers can be embedded in character strings using the bracket construct, (see section 1.2.4 of users manual). For example, '[0d][0a]' yields a string containing a carriage return and a line feed. Please note that this feature does not apply to strings contained in FORMAT statements. 4. Please note that FORTRAN unit numbers greater than 20 are reserved for the system, or for users that implement their own device drivers. Normally, unit numbers 5 through 20 are available for disk file type units in your programs. 5. Please note the following additional information concerning the UTILITY ROUTINE LIBRARY described in section 5.3 of the Fortran users manual. a). In the subprograms INPT, INPTW, OUTPT, and OUTPTW the value PORT must be a two byte integer value. If a one byte integer value is specified these functions will not operate correctly. Passing a two byte integer value as PORT to these functions is easly accomplished by using an INTEGER or INTEGER*2 var- iable, a normal integer constant, or a two byte hex constant. Some examples of proper use are given below: INTEGER A INTEGER*2 B C INPUT BYTE FROM PORT A, WORD FROM PORT B I=INPT(A) J=INPTW(B) C OUTPUT BYTE TO PORT 2, WORD TO PORT 2300h CALL OUTPT(2,I) CALL OUTPTW(!2300!,J) b). It is important to note that the subprograms IPEEK, POKE1, and POKE2 do not work with absolute addresses. The value ADDR specified is an offset into the Fortran DATA SEGMENT and not an absolute address. That is; I=IPEEK(0) will return the value at offset 0 in the fortran DATA SEGMENT and not the value at absolute address 0. To allow complete flexibility in accessing memory through peeks and pokes, Three aditional routines, (not described in the users manual), are provided with this version in the standard Fortran library. These additional routines are: INTEGER*2 FUNCTION IPEEKS(ISEG,IOFFS) SUBROUTINE POKES1(ISEG,IOFFS,VALUE) SUBROUTINE POKES2(ISEG,IOFFS,VALUE) These routines operate just like the routines described in the manual, except that two INTEGER*2 items, (ISEG and IOFS), are used to form a twenty bit absolute address that allows peeking and poking anywhere in the one megabyte 8086/88 address space. The absolute address is formed from the two sixteen bit values as: ADDR = 16*ISEG+IOFS Some examples are given below: C PEEK AT ABSOLUTE ADDRESS 0 C ( 16*0+0 -> 0 ABSOLUTE ADDRESS ) I=IPEEKS(0,0) C PEEK AT ABSOLUTE ADDRESS F6002h C ( 16*F600h+2 -> F6002h ABSOLUTE ADDRESS ) I=IPEEKS(!F600!,2) This process of making a twenty bit address from two sixteen bit values is a standard methodology in the 8086/88 processor architecture. Consult any 8086/88 architectural reference if you would like more information. Happy computing. ams. 5. Please note the following additional information concerning the UTILITY ROUTINE LIBRARY described in section 5