Previous: Chainer and MarkJump
Up: Adaptations to pre-existing p-System units
Next: PCVideo and graphics support
Previous Page: MarkJump
Next Page: PCVideo and graphics support

Use of DlgGlbls

DlgGlbls 3.3 is an extremely simple unit whose only purpose it to supply a global environment of the bare essentials that must be shared between the menu program, Ports, and successive calls to the dialogue activities. (If the operating system supplied such long-term storage in memory, it's doubtful this unit would ever be needed).

The menu program needs to use DlgGlbls components as follows:

  1. Initialise dgTargetMark[1] with MarkFilesOpen and SetJmp from MarkJump. ChainTo in Ports expects to be able to jump to dgTargetMark[1].
  2. Use ProgNamed on dgNextModName to see if a module has already been specified for running. It is important to do this rather than first presenting the menu because if a module has already supplied the name of the next module to execute, the menu should not be shown at all between them.

Ports and the menu program alone should manipulate dgNextModName; the modules should never know about it, and rely only on ChainTo in Ports. This is even more true of dgTargetMark[1].

Educational Technology Center
Dept. of Info. and Comp.Sci.
Univ. of California, Irvine
92717, CA, USA