home *** CD-ROM | disk | FTP | other *** search
-
-
-
-
-
-
-
- PRODUCT : TURBO PASCAL GRAPHIX TOOLBOX NUMBER : 457
- VERSION : 4.0
- OS : PC-DOS
- DATE : January 3, 1990 PAGE : 1/4
-
- TITLE : LINKING ERROR.MSG AND FONT FILES
-
-
-
-
- This technical information handout describes how to link in the
- ERROR.MSG, 4x6.FON, 8x8.FON and 14x9.FON files into your *.EXE
- file so that your application no longer needs these files to be
- present on disk. Please make these changes to copies of your
- Turbo Pascal Graphix Toolbox 4.0 files, in case something goes
- wrong. The following files will be affected:
-
- GRAF3270.DVR GRAFEGA.DVR ERROR.MSG 14X9.FON
- GRAFATT.DVR GRAFHGC.DVR 4X6.FON GDRIVER.PAS
- GRAFCGA.DVR GKERNEL.PAS 8X8.FON
-
-
- First, you must convert the ERROR.MSG, 4x6.FON, 8x8.FON, and
- 14x9.FON files to the OBJ format.
-
- Use the BINOBJ.EXE utility to convert these files to the OBJ
- format.
-
- For example,
-
- BINOBJ ERROR.MSG ERROR.OBJ FakeErr <Return>
- BINOBJ 4x6.FON 4x6.OBJ Font4x6 <Return>
- BINOBJ 8x8.FON 8x8.OBJ FakeFont <Return>
- BINOBJ 14x9.FON 14x9.OBJ FakeFont <Return>
-
-
- Next, delete the first 13 lines of code from the procedure
- EnterGraphic in each of the *.DVR and GDRIVER.PAS files with the
- exception of GRAFATT.DVR file. In the GRAFATT.DVR file, delete
- the first 15 lines of code instead. Also, in the GRAFCGA.DVR file
- substitute the line below "{$L 14x9 }" with "{$L 8x8 }".
- Replace the deleted lines with the following code:
-
-
-
- {$L 14x9} { ADD }
- procedure FakeFont; external; { ADD }
-
- procedure EnterGraphic;
- { Enter graphics mode }
- ...
- ...
- begin
-
-
-
-
-
-
-
-
-
-
-
-
-
- PRODUCT : TURBO PASCAL GRAPHIX TOOLBOX NUMBER : 457
- VERSION : 4.0
- OS : PC-DOS
- DATE : January 3, 1990 PAGE : 2/4
-
- TITLE : LINKING ERROR.MSG AND FONT FILES
-
-
-
-
- if not FontLoaded then { ADD }
- begin { ADD }
- Move(Mem[Seg(FakeFont):Ofs(FakeFont)], Font, SizeOf(Font));
- {ADD}
- FontLoaded := true; { ADD }
- end; { ADD }
- ....
- .....
- The rest of the EnterGraphic procedure remains the same.
-
-
- The following changes should be made in the GKERNEL.PAS unit:
-
- {$L 4x6 } {NEW}
- procedure Font4x6; external; {NEW}
-
- {$L Error} {NEW}
- procedure FakeErr; external; {NEW}
-
- procedure InitGraphic;
- var
- Fil : file of CharArray;
- Tfile : text;
- Test : ^integer;
- Temp : WrkString;
- I : word;
- GTBCount : integer; {NEW}
- GTBch : char; {NEW}
-
- Function ErrorStr : WrkString; {NEW}
- begin {NEW}
- temp := ''; {NEW}
- repeat {NEW}
- GTBch := chr(mem[Seg(FakeErr):Ofs(FakeErr) + GTBcount]);
- if not ((GTBch = #10) or (GTBch = #13)) then {NEW}
- temp := temp + GTBch; {NEW}
- inc(GTBcount); {NEW}
- until(GTBch = #13); {NEW}
- ErrorStr := temp; {NEW}
- end; { Function ErrorStr } {NEW}
-
- begin
- MessageGlb := true;
-
-
-
-
-
-
-
-
-
-
-
-
-
- PRODUCT : TURBO PASCAL GRAPHIX TOOLBOX NUMBER : 457
- VERSION : 4.0
- OS : PC-DOS
- DATE : January 3, 1990 PAGE : 3/4
-
- TITLE : LINKING ERROR.MSG AND FONT FILES
-
-
-
-
- BrkGlb := false;
- GrafModeGlb := false;
- GotoXY(1, 1);
- if not HardwarePresent then
- begin
- ClrScr;
- GotoXY(1, 2);
- WriteLn('Fatal Error: graphics hardware not found or not
- properly activated');
- Halt;
- end;
- GetMem(ErrorProc[0], 16);
- GetMem(ErrorCode[0], 24);
- ErrorProc[0]^ := 'InitGraphic';
- ErrorCode[0]^ := 'Error.MSG missing';
- GTBcount := 0; {NEW}
- for I := 0 to MaxProcsGlb do {MODIFIED}
- begin
- Temp := ErrorStr; {NEW}
- if I <> 0 then
- GetMem(ErrorProc[I], Length(Temp) + 1);
- ErrorProc[I]^ := Temp;
- end;
- for I := 0 to MaxErrsGlb do {MODIFIED}
- begin
- Temp := ErrorStr; {NEW}
- if I <> 0 then
- GetMem(ErrorCode[I], Length(Temp) + 1);
- ErrorCode[I]^ := Temp;
- end;
- PcGlb := ErrorStr; {MODIFIED}
- for I := 1 to MaxWorldsGlb do
- DefineWorld(I, 0, 0, XScreenMaxGlb, YMaxGlb);
- MaxWorldGlb := 1;
- for I := 1 to MaxWindowsGlb do
- begin
- DefineWindow(I, 0, 0, XMaxGlb, YMaxGlb);
- with Stack[I] do
- begin
- W.Size := 0;
- Contents := nil;
- end;
- end;
-
-
-
-
-
-
-
-
-
-
-
-
-
- PRODUCT : TURBO PASCAL GRAPHIX TOOLBOX NUMBER : 457
- VERSION : 4.0
- OS : PC-DOS
- DATE : January 3, 1990 PAGE : 4/4
-
- TITLE : LINKING ERROR.MSG AND FONT FILES
-
-
-
-
- MaxWindowGlb := 1;
- Move(mem[seg(Font4x6):ofs(Font4x6)],CharSet,Sizeof(CharSet));
- {NEW}
-
- Delete the next 12 lines of code.
-
- The rest of the code remains the same in the GKERNEL.PAS unit.
- BrkGlb := True;
- If RamScreenGlb Then
- ...
- ...
-
- ****************************************************************
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-