(******************************************************************************) (* SAMPLE04.MOD *) (* *) (* metaPort Usage *) (* Taken from SAMPLE04.PAS - Metagraphics Software Corporation (c) 1987-1989 *) (* *) (* PSW 10/31/90 09:07pm *) (******************************************************************************) MODULE Sample04; (* * Graphix * Release 3.7 * (c) Copyright 1986-1992 PMI * Green Bay, Wisconsin * (414) 468-6040 * All rights reserved * *) IMPORT GrQry; IMPORT GrConst; IMPORT GrPorts; IMPORT Meta; IMPORT IO; VAR GrafixCard, CommPort: INTEGER; i, j, k: INTEGER; scrnR: GrConst.rect; scrnPort, alertPort: GrPorts.adsPort; alertPortRcd: GrPorts.metaPort; (* Allocate the port record *) PROCEDURE Alert(); VAR entryPort: GrPorts.adsPort; BEGIN Meta.GetPort(entryPort); Meta.SetPort(alertPort); Meta.SetPort(entryPort) END Alert; BEGIN (* init the system *) GrQry.GrInit(GrafixCard, CommPort); i := Meta.InitGrafix(-GrafixCard); IF (i # 0) THEN (* Display reason for no go *) GrQry.GrInitErr(GrafixCard, CommPort, i); END; Meta.ScreenRect(scrnR); Meta.SetDisplay(GrConst.GrafPg0); Meta.EraseRect(scrnR); Meta.GetPort(scrnPort); alertPort := ADR(alertPortRcd); Meta.InitPort(alertPort); Alert(); Meta.SetPort(scrnPort); GrQry.GrQuit('', 0); END Sample04.