Listing: 1 (******************************************************************************) 2 (* SAMPLE06.MOD *) 3 (* *) 4 (* Defining a Custom Display Bitmap *) 5 (* Taken from SAMPLE06.PAS - Metagraphics Software Corporation (c) 1987-1989 *) 6 (* *) 7 (* PSW 11/01/90 08:18pm *) 8 (******************************************************************************) 9 10 MODULE Sample06; 11 (* 12 * Graphix 13 * Release 3.7 14 * (c) Copyright 1986-1992 PMI 15 * Green Bay, Wisconsin 16 * (414) 468-6040 17 * All rights reserved 18 * 19 *) 20 21 IMPORT GrQry; 22 IMPORT GrConst; 23 IMPORT GrPorts; 24 IMPORT Meta; 25 IMPORT IO; 26 27 FROM GrPorts IMPORT bitmap, rowTblPtr, adsBMap; ***** ^ duplicate identifier 28 FROM Storage IMPORT ALLOCATE, DEALLOCATE, Available; 29 30 VAR 31 GrafixCard, 32 CommPort, 33 i: INTEGER; 34 myBitmap: GrPorts.bitmap; ***** ^ not supported yet 35 addrBMap: GrPorts.adsBMap; ***** ^ not supported yet 36 rowTbl: rowTblPtr; 37 GotKey: BOOLEAN; 38 39 BEGIN 40 (* init the system *) 41 42 GrQry.GrInit(GrafixCard, CommPort); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 43 44 i := Meta.InitGrafix(-GrafixCard); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 45 46 IF (i # 0) THEN 47 (* Display reason for no go *) 48 GrQry.GrInitErr(GrafixCard, CommPort, i); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 49 END; 50 51 52 myBitmap.devClass := 24; (* Initialize bitmap data fields *) ***** ^ not supported yet ***** ^ not supported yet 53 myBitmap.devType := 0; ***** ^ not supported yet ***** ^ not supported yet 54 myBitmap.rowBytes := 90; (*= 720/8*) ***** ^ not supported yet ***** ^ not supported yet 55 myBitmap.pixWidth := 720; ***** ^ not supported yet ***** ^ not supported yet 56 myBitmap.pixHeight := 348; ***** ^ not supported yet ***** ^ not supported yet 57 myBitmap.pixResX := 90; ***** ^ not supported yet ***** ^ not supported yet 58 myBitmap.pixResY := 64; ***** ^ not supported yet ***** ^ not supported yet 59 myBitmap.pixBits := 1; ***** ^ not supported yet ***** ^ not supported yet 60 myBitmap.pixPlanes := 1; ***** ^ not supported yet ***** ^ not supported yet 61 62 IF NOT(Available(384*4)) THEN ***** ^ not supported yet ***** ^ not supported yet 63 GrQry.GrQuit('Insufficient memory.', 1) ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 64 END; 65 66 ALLOCATE(ADDRESS(rowTbl), 384*4); ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ not supported yet 67 68 myBitmap.mapTable[0] := rowTbl; ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 69 rowTbl^.rowTable[0] := ADDRESS(0B0000000H); (* Initialize 1st entry *) ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet 70 71 addrBMap := ADR(myBitmap); ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet 72 Meta.InitRowTable(addrBMap, 4, 0000, 2000H); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 73 Meta.PortBitmap(addrBMap); (* Assign bitmap to the current port *) ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 74 Meta.CursorBitmap(addrBMap); (* Track the cursor on this bitmap. *) ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 75 76 REPEAT 77 GotKey := IO.KeyPressed(); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 78 UNTIL GotKey; 79 80 GrQry.GrQuit('', 0); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 81 END Sample06. 68 errors