Prospero News

From Atari Wiki
Revision as of 11:52, 13 October 2011 by Admin (talk | contribs)
Jump to navigation Jump to search
Prospero Fortran for GEM version mmg 2.13 for Atari ST - extra remarks
----------------------------------------------------------------------

Errata
------

AES-74

The  menu_create  function  has three parameters rather than two.  The
correct definition is as follows :-

      INTEGER*4 FUNCTION menu_create(titles, items, about)
      INTEGER*4 titles, items
      CHARACTER*(*) about

The titles parameter specifies the total number of titles to be added,
while  the  items  parameter specifies the total number of items to be
added  -  these figures need not include the Desk title and associated
items, which are added automatically.

AES-137

The example of the use of objc_create needs a call of objc_draw before
calling form_do near the end, or the form will not be displayed.

Improvements and changes from version 1.1
-----------------------------------------

The  Prospero Fortran package has been improved in various ways  since 
version 1.1, notably as follows :-

     1.   The package now includes an integrated Workbench development 
          environment,  from  which  the compiler,  linker  and  other 
          programs are run. This is the program F-BENCH.PRG.

     2.   The  package  now includes a  symbolic  debugger,  the  file 
          PROBE.PRG,  to allow the single stepping of programs at  the 
          source language level, with interrogation of variables etc.

     3.   The  package now includes a cross-reference  generator  (the 
          file  XREF.OVL,   which  can  only  be  executed  from   the 
          Workbench).

     4.   The  PRL (Prospero Resident Library) is no longer  required, 
          and  all  programs produced can now be  run  as  stand-alone 
          applications.

     5.   The  compiler  accepts identifiers up to  31  characters  in 
          length (unless the option to accept standard Fortran-77 only 
          is   used),   and   other  lexical  enhancements   such   as 
          underscores in identifiers and !-type comments.

     6.   The  GEM bindings have been rewritten to take  advantage  of 
          the 31 character names, and several extra bindings have been 
          added to make GEM programming easier.  The bindings are  now 
          fully  documented in 500 pages.  It is now possible to write
          Desk Accessories.

     7.   Several  new library procedures have been  added,  including 
          routines  to  access the BIOS,  XBIOS and LINE  A  routines, 
          and to follow pointers


Additional sample programs
--------------------------

This issue includes some source (.FOR) files containing sample Fortran
programs not listed in the manual.


1.  MAZES.FOR

This program will print out a different maze every time it is run (and
guarantees only one path through).   It  illustrates  use  of  several
Fortran  features:   logical  and  character  variables  and   arrays,
statement functions, DATA statements with character  constants,  Block
IFs, computed GOTOs, and the random number generator (RANDOM).  It  is
not a very "typical" example of Fortran coding  style,  but  indicates
that Fortran can be used to solve logical as well as  number-crunching
problems.


2.  PRINTF.FOR

This is a utility program to copy a file of variable-length  formatted
records from disk to the printer, when the  first  character  of  each
record will be interpreted  as  carriage-control  information  in  the
normal  Fortran  manner.   The  coding  includes  examples  of   using
CHARACTER  variables  and  substrings,  PARAMETER   statements,   OPEN
statements, and the GETCOM procedure.


3.  TOSDEMO.FOR

This program demonstrates use of the supplied SYS routine  for  making
calls to the TOS executive (see User Manual, Part III, section 8.7.1).
Two calls are made, one to output a string to standard output, and one
to diskover the operating system version number.  For further details,
refer to the commented source.


4.  GEMDEMO.FOR

This is a simple program to illustrate use of the supplied GEM VDI and
AES interface routines (see User Manual, Volumes 2 and 3). The program
displays an "alert", which can be clicked with the mouse. It then uses
GEM AES calls to set up a window,  and  VDI  calls to display a graph,
clipped to the window.

5.  MENUDEMO.FOR

A demonstration of how the additional GEM bindings can be used to  set 
up and use a menu bar in a Prospero Fortran program,  without the  use 
of a resource editor.

6.  DIALDEMO.FOR

A  simple  demonstration of how dialog boxes can be created  and  used 
without the need for a resource editor

7.  DOODLE.FOR

A  complete  (though very simple) GEM application written  in  Prospero 
Fortran,  demonstrating how to handle menus,  windows and redraws, and 
various other aspects of GEM AES and VDI.  The code can be used as the 
basis for other GEM applications.

8.  CLOCKDA.FOR

A simple desk accessory  which  displays  an analog clock in a window.
After  linking,  the  .PRG  file produced should be renamed .ACC,  and
copied to a startup disk.  When the machine is reset and started using
this startup disk,  the desk accessory will install itself in the Desk
menu ready for use.

Note.  Desk accessories are difficult to debug,  and if they go wrong
may cause the machine to reboot. A desk accessory should therefore not
be installed on a hard disk until it is known to be working, or it may
be difficult to remove! It is usually best to write the accessory as a
stand-alone application while it is still being developed, and convert
it to an accessory once it is debugged.

9.  LINEA.FOR

A very simple demonstration of some of the capabilities of the Line  A 
routines,  which  give  access  to the  Atari's  high  speed  graphics 
routines.

10. XBIOS.FOR

A  simple  example of how to call the Atari's XBIOS  operating  system 
routines.


A problem with zero-length text files
-------------------------------------

End-of-file is not signalled on text files of zero  length.   This  is
due to a problem in GEMDOS.  In particular,  therefore,  the  compiler
and Workbench cannot handle properly a source file of zero length.

Non-text files of zero length are handled properly.



Integrity of issued files
-------------------------

The Prospero Fortran software is normally supplied on  write-protected
disks.  Do not write-permit the master copy  or  execute the Workbench
from it. Copy the files from the supplied disks onto your own disk(s).
You may then verify that the working copy is correct (see below),  and
go  on  to edit, compile, link, and run your own programs as described
in Part I of the User Manual.



Checking validity of files
__________________________

The program FCHECK.PRG is supplied to guard against copying errors  in
the issued software.  It asks for  a  directory  name,  which  may  be
simply a disk drive such as B:, and sumchecks all the  files  in  that
directory whose names it recognises.   These  sumchecks  are  compared
against information recorded within itself (the correct sumchecks) and
either "OK" or an error message is given, for each file.

To run the program, double-click on the FCHECK.PRG icon,  and reply to
the prompt with the desired directory name (e.g. A:).