home *** CD-ROM | disk | FTP | other *** search
- {$R-} {Range checking off}
- {$B+} {Boolean complete evaluation on}
- {$S+} {Stack checking on}
- {$I+} {I/O checking on}
- {$N-} {No numeric coprocessor}
- {$M 65500,16384,655360} {Turbo 3 default stack and heap}
-
- program logopat;
-
-
- Uses
- Crt, {Unit found in TURBO.TPL}
- Dos; {Unit found in TURBO.TPL}
-
- type string8 = string[8];
-
- { type regs = Registers; }
-
- const hexval : array[0..15] of char = ('0','1','2','3','4','5','6',
- '7','8','9','A','B','C','D','E','F');
-
-
- const pat1 : array[1..4] of byte = ($E9,$00,$00,$90);
-
-
- const pat2 : array[1..12] of byte =
- ($50,$B4,$12,$B3,$10,$CD,$10,$80,$FB,$10,$58,$74);
-
- var i : integer;
- logofile, logoout : file of byte;
- b,alo,ahi,slo,shi : byte;
- size,size1,size2 : integer;
- filnam : string8;
-
- function exists(var filname:string8): boolean;
- var fil : file;
- begin
- assign(fil,filname);
- {$I-}
- reset(fil);
- {$I+}
- if ioresult<>0 then exists:=false else exists:=true;
- end;
-
- procedure getaddress;
- var regvars: registers;
- segaddr, offset,
- i : integer;
- begin
- regvars.ax:=$1130;
- regvars.bx:=$0300;
- Intr($10,regvars);
- segaddr:=regvars.es;
- offset:=regvars.bp;
- shi:=hi(segaddr);
- slo:=lo(segaddr);
- ahi:=hi(offset);
- alo:=lo(offset);
- write('BIOS fonttable at address ');
- writeln(
- hexval[shi div 16],
- hexval[shi mod 16],
- hexval[slo div 16],
- hexval[slo mod 16],':',
- hexval[ahi div 16],
- hexval[ahi mod 16],
- hexval[alo div 16],
- hexval[alo mod 16]);
- end;
-
- begin
- textcolor(7);
- textbackground(0);
- write('LOGOPAT ');
- writeln(' (C) 1990 Erich Neuwirth');
- writeln('changes LOGO.COM (IBM LOGO) und creates LOGOVGA.COM.');
- writeln;
- writeln('Should only be applied to LOGO.COM dated 10/1/1983');
- writeln('with file length 59120 byte.');
- writeln;
- writeln('The new program runs on machines with a 386');
- writeln('and with EGA or VGA.');
- writeln('The changes have to be applied separately ');
- writeln('for different EGA and VGA cards.');
- writeln('The new program will NOT run on machines with CGA.');
- writeln;
- filnam:='LOGO.COM';
- if (not exists(filnam)) then
- begin
- writeln('File LOGO.COM not available,');
- writeln('therefore it cannot be changed.');
- halt;
- end;
-
- getaddress;
- assign(logofile,'LOGO.COM');
- assign(logoout,'LOGOVGA.COM');
- reset(logofile);
- rewrite(logoout);
-
- size:=filesize(logofile);
- size1:=lo(size);
- size2:=hi(size);
- for i:=1 to $e6b do
- begin read(logofile,b); write(logoout,b) end;
- read(logofile,b);
- write(logoout,slo);
- read(logofile,b);
- write(logoout,shi);
- for i:=1 to 3 do begin read(logofile,b); write(logoout,b) end;
- read(logofile,b);
- write(logoout,alo);
- read(logofile,b);
- write(logoout,ahi);
- for i:=1 to ($794b-7-$e6b) do
- begin read(logofile,b); write(logoout,b) end;
- for i:=1 to 4 do
- begin read(logofile,b); write(logoout,pat1[i]) end;
- writeln('Adapted for 386.');
-
- for i:=1 to ($4c67 - $2af) do
- begin read(logofile,b); write(logoout,b) end;
- read(logofile,b);
- write(logoout,slo);
- read(logofile,b);
- write(logoout,shi);
- for i:=1 to 12 do
- begin read(logofile,b); write(logoout,b) end;
- read(logofile,b);
- write(logoout,alo);
- read(logofile,b);
- write(logoout,ahi);
- for i:=1 to ($2af-16) do
- begin read(logofile,b); write(logoout,b) end;
- for i:=1 to 12 do begin
- read(logofile,b); write(logoout,pat2[i]) end;
- writeln('Adapted for VGA.');
- for i:=1 to $212e do
- begin read(logofile,b); write(logoout,b) end;
-
-
- close(logofile);
- close(logoout);
- writeln;
- end.
-