Contributor: AVONTURE CHRISTOPHE
{
 =======================================
 CMOS V1.0 (c) AVC Software
 Cardware
 CMOS print yours CMOS values for a
 paper backup.
 With it, don't be afraid to lose all
 your data! Restore there with CMOS.
 =======================================
 The purpose of this program is to print the content of your AMI CMOS
 I've never try it on another Bios than AMERICAN MEGATRENDS INC. so I
 can't certify that this code should work on every machine.
 ノヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘサ
 コ コー
 コ AVONTURE CHRISTOPHE コー
 コ AVC SOFTWARE コー
 コ BOULEVARD EDMOND MACHTENS 157/53 コー
 コ B-1080 BRUXELLES コー
 コ BELGIQUE コー
 コ コー
 ネヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘシー
 ーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーー
}
Uses Printer, Crt;
Const PrnInit = #27+#69+#27+#38+#108+#49+#79+#27+#40+#115+#49+#55+#72+#27+
 #38+#108+#53+#46+#49+#52+#67+#27+#38+#108+#55+#48+#70+#27+
 #38+#108+#55+#69;
 PrnReset = #12+#27+'E';
Const Line1 : String = 'レトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトツトトトトトトトトトトトトトトトトトトトトトトトソ';
 Line2 : String = 'タトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトチトトトトトトトトトトトトトトトトトトトトトトトル';
 Line3 : String = 'テトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトナトトトトトトトトトトトトトトトトトトトトトトトエ';
 Line4 : String = 'レトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトソ';
 Line5 : String = 'タトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトル';
Var St : Array [1..101] of String[80];
 St2 : String;
Procedure Detect;
Var Port11, Port13, Port2D, Port33, Port34, Port35, Port36 : Byte;
 Sectors : Byte;
 Head : Byte;
 Cylindre : Word;
 PzCylindre : Word;
 WCylindre : Word;
 HddType : Byte;
 HddType2 : Byte;
 R : LongInt;
 Temp1, Temp2 : Byte;
 AA, BB, CC : Word;
 TailleHdd : LongInt;
Begin
Asm
 Mov Al, 11h
 Out 70h, Al
 In Al, 71h
 Mov port11, Al
 Mov Al, 13h
 Out 70h, Al
 In Al, 71h
 Mov Port13, Al
 Mov Al, 2dh
 Out 70h, Al
 In Al, 71h
 Mov Port2d, Al
 Mov Al, 34h
 Out 70h, Al
 In Al, 71h
 Mov Port34, Al
 Mov Al, 35h
 Out 70h, Al
 In Al, 71h
 Mov Port35, Al
 Mov Al, 33h
 Out 70h, Al
 In Al, 71h
 Mov Port33, Al
 Mov Al, 36h
 Out 70h, Al
 In Al, 71h
 Mov Port36, Al
 mov al, 1bh
 out 70h, al
 in al, 71h
 mov temp1, al
 mov al, 1ch
 out 70h, al
 in al, 71h
 mov temp2, al
End;
cylindre := (temp2 Shl 8) + temp1;
asm
 mov al, 1dh
 out 70h, al
 in al, 71h
 mov head, al
 mov al, 23h
 out 70h, al
 in al, 71h
 mov sectors, al
 mov al, 19h
 out 70h, al
 in al, 71h
 mov hddtype, al
 mov al, 1ah
 out 70h, al
 in al, 71h
 mov hddtype2, al
 mov al, 1eh
 out 70h, al
 in al, 71h
 mov temp1, al
 mov al, 1fh
 out 70h, al
 in al, 71h
 mov temp2, al
End;
wcylindre := (temp2 Shl 8) + temp1;
asm
 mov al, 21h
 out 70h, al
 in al, 71h
 mov temp1, al
 mov al, 22h
 out 70h, al
 in al, 71h
 mov temp2, al
End;
pzcylindre := (temp2 Shl 8) + temp1;
Aa := Sectors;
Bb := Head;
Cc := Cylindre;
Asm
 Mov Ax, Aa
 Mov Bx, Bb
 Mul Bx
 Mov Bx, Cc
 Mul Bx
 Mov Word Ptr [R + 2], Dx
 Mov Word Ptr [R ], Ax
End;
TailleHdd := (((R Div 1024) * 512) Div 1024);
if (((Port13 and 128) shr 7) = 1) then
 St[1] :='Typematic Rate Programming ウ Enabled'
else St[1] :='Typematic Rate Programming ウ Disabled';
if (((Port13 and 96) shr 5) = 0) then
 St[2] :='Typematic Rate Delay (msec) ウ 250'
else if (((Port13 and 96) shr 5) = 1) then
 St[2] :='Typematic Rate Delay (msec) ウ 500'
else if (((Port13 and 96) shr 5) = 2) then
 St[2] :='Typematic Rate Delay (msec) ウ 750'
else if (((Port13 and 96) shr 5) = 3) then
 St[2] :='Typematic Rate Delay (msec) ウ 1000';
if (((Port13 and 28) shr 2) = 0) then
 St[3] :='Typematic Rate (Chars/Sec) ウ 6'
else if (((Port13 and 28) shr 2) = 1) then
 St[3] :='Typematic Rate (Chars/Sec) ウ 8'
else if (((Port13 and 28) shr 2) = 2) then
 St[3] :='Typematic Rate (Chars/Sec) ウ 10'
else if (((Port13 and 28) shr 2) = 3) then
 St[3] :='Typematic Rate (Chars/Sec) ウ 12'
else if (((Port13 and 28) shr 2) = 4) then
 St[3] :='Typematic Rate (Chars/Sec) ウ 15'
else if (((Port13 and 28) shr 2) = 5) then
 St[3] :='Typematic Rate (Chars/Sec) ウ 20'
else if (((Port13 and 28) shr 2) = 6) then
 St[3] :='Typematic Rate (Chars/Sec) ウ 24'
else if (((Port13 and 28) shr 2) = 7) then
 St[3] :='Typematic Rate (Chars/Sec) ウ 30';
St[4] := Line3;
if (((Port11 and 64) shr 6) = 1) then
 St[5] := 'Above 1 MB Memory Test ウ Enabled'
else St[5] := 'Above 1 MB Memory Test ウ Disabled';
if (((Port11 and 32) shr 5) = 1) then
 St[6] := 'Memory Test Tick Sound ウ Enabled'
else St[6] := 'Memory Test Tick Sound ウ Disabled';
if (((Port11 and 16) shr 4) = 1) then
 St[7] := 'Memory Parity Error Check ウ Enabled'
else St[7] := 'Memory Parity Error Check ウ Disabled';
St[8] := Line3;
if (((Port11 and 8) shr 3) = 1) then
 St[9] := 'Hit  message display ウ Enabled'
else St[9] := 'Hit  message display ウ Disabled';
if (((Port11 and 4) shr 2) = 1) then
 St[10] := 'Hard Disk Type 47 Data Area ウ DOS 1KB'
else St[10] := 'Hard Disk Type 47 Data Area ウ 0:300';
if (((Port11 and 2) shr 1) = 1) then
 St[11] := 'Wait for  if any error ウ Enabled'
else St[11] := 'Wait for  if any error ウ Disabled';
St[12] := Line3;
if ((Port11 and 1) = 1) then
 St[13] := 'System Boot Up Num Lock ウ On'
else St[13] := 'System Boot Up Num Lock ウ Off';
St[14] := Line3;
if ((Port35 and 1) = 1) then
 St[15] :='Numeric Processor Test ウ Enabled'
else St[15] :='Numeric Processor Test ウ Disabled';
if (((Port2d and 128) shr 7) = 1) then
 St[16] := 'Weitek Processor ウ Present'
else St[16] := 'Weitek Processor ウ Absent';
St[17] := Line3;
if (((Port2d and 64) shr 6) = 1) then
 St[18] := 'Floppy Drive Seek at Boot ウ Enabled'
else St[18] := 'Floppy Drive Seek at Boot ウ Disabled';
if (((Port2d and 32) shr 5) = 1) then
 St[19] := 'System Boot Up Sequence ウ A:, C:'
else St[19] := 'System Boot Up Sequence ウ C:, A:';
if (((Port2d and 16) shr 4) = 1) then
 St[20] := 'System Boot Up CPU Speed ウ High'
else St[20] := 'System Boot Up CPU Speed ウ Low';
St[21] := Line3;
if (((Port2d and 8) shr 3) = 1) then
 St[22] := 'External Cache Memory ウ Enabled'
else St[22] := 'External Cache Memory ウ Disabled';
if (((Port2d and 4) shr 2) = 1) then
 St[23] := 'Internal Cache Memory ウ Enabled'
else St[23] := 'Internal Cache Memory ウ Disabled';
St[24] := Line3;
if (((Port2d and 2) shr 1) = 1) then
 St[25] := 'Fast Gate A20 Option ウ Enabled'
else St[25] := 'Fast Gate A20 Option ウ Disabled';
if ((Port2d and 1) = 1) then
 St[26] := 'Turbo Switch Function ウ Enabled'
else St[26] := 'Turbo Switch Function ウ Disabled';
if (((Port34 and 64) shr 6) = 1) then
 St[27] := 'Password Checking Option ウ Always'
else St[27] := 'Password Checking Option ウ Setup';
St[28] := Line3;
if (((Port35 and 4) shr 2) = 1) then
 St[29] :='Video ROM Shadow C000, 32K ウ Enabled'
else St[29] :='Video ROM Shadow C000, 32K ウ Disabled';
if (((Port34 and 32) shr 5) = 1) then
 St[30] := 'Adaptor ROM Shadow C800, 32K ウ Enabled'
else St[30] := 'Adaptor ROM Shadow C800, 32K ウ Disabled';
if (((Port34 and 8) shr 3) = 1) then
 St[31] := 'Adaptor ROM Shadow D000, 32K ウ Enabled'
else St[31] := 'Adaptor ROM Shadow D000, 32K ウ Disabled';
if (((Port34 and 2) shr 1) = 1) then
 St[32] :='Adaptor ROM Shadow D800, 32K ウ Enabled'
else St[32] :='Adaptor ROM Shadow D800, 32K ウ Disabled';
if (((Port35 and 128) shr 7) = 1) then
 St[33] :='Adaptor ROM Shadow E000, 32K ウ Enabled'
else St[33] :='Adaptor ROM Shadow E000, 32K ウ Disabled';
if (((Port35 and 32) shr 5) = 1) then
 St[34] :='Adaptor ROM Shadow E800, 32K ウ Enabled'
else St[34] :='Adaptor ROM Shadow E800, 32K ウ Disabled';
St[35] := Line3;
if (((Port34 and 128) shr 7) = 1) then
 St[36] := 'BootSector Virus Protection ウ Enabled'
else St[36] := 'BootSector Virus Protection ウ Disabled';
if (((Port33 and 16) shr 4) = 1) then
 St[37] :='AUTO Config Function ウ Enabled'
else St[37] :='AUTO Config Function ウ Disabled';
St[38] := Line3;
if (((Port36 and 192) shr 6) = 0) then
 St[39] :='DRAM Speed Option ウ Slowest'
else if (((Port36 and 192) shr 6) = 1) then
 St[39] :='DRAM Speed Option ウ Slower'
else if (((Port36 and 192) shr 6) = 2) then
 St[39] :='DRAM Speed Option ウ Faster'
else if (((Port36 and 192) shr 6) = 3) then
 St[39] :='DRAM Speed Option ウ Fastest';
if (((Port33 and 32) shr 5) = 1) then
 St[40] :='DRAM Write CAS Pulse ウ 1 T'
else St[40] :='DRAM Write CAS Pulse ウ 2 T';
if (((Port35 and 64) shr 6) = 1) then
 St[41] :='DRAM Write Cycle ウ 0 W/S'
else St[41] :='DRAM Write Cycle ウ 1 W/S';
if (((Port34 and 4) shr 2) = 1) then
 St[42] := 'DRAM Hidden Refresh ウ Enabled'
else St[42] :='DRAM Hidden Refresh ウ Disabled';
St[43] := Line3;
if (((Port36 and 8) shr 3) = 1) then
 St[44] :='Cache Write Back Option ウ W/THROUGH'
else St[44] :='Cache Write Back Option ウ W/BACK';
if (((Port36 and 4) shr 2) = 1) then
 St[45] :='Cache Write Cycle Option ウ 2 T'
else St[45] :='Cache Write Cycle Option ウ 3 T';
if (((Port36 and 32) shr 5) = 1) then
 St[46] :='Cache Burst Read Cycle ウ 2 T'
else St[46] :='Cache Burst Read Cycle ウ 1 T';
St[47] := Line3;
if ((Port36 and 7) = 0) then
 St[48] :='Bus Clock Frequency Select ウ 7.15 MHz'
else if ((Port36 and 7) = 1) then
 St[48] :='Bus Clock Frequency Select ウ 1/10 CLK'
else if ((Port36 and 7) = 2) then
 St[48] :='Bus Clock Frequency Select ウ 1/8 CLK'
else if ((Port36 and 7) = 3) then
 St[48] :='Bus Clock Frequency Select ウ 1/6 CLK'
else if ((Port36 and 7) = 4) then
 St[48] :='Bus Clock Frequency Select ウ 1/5 CLK'
else if ((Port36 and 7) = 5) then
 St[48] :='Bus Clock Frequency Select ウ 1/4 CLK'
else if ((Port36 and 7) = 6) then
 St[48] :='Bus Clock Frequency Select ウ 1/3 CLK'
else if ((Port36 and 7) = 7) then
 St[48] :='Bus Clock Frequency Select ウ 1/2 CLK';
if (((Port35 and 8) shr 3) = 1) then
 St[49] :='Video Cacheable Option ウ Enabled'
else St[49] :='Video Cacheable Option ウ Disabled';
if ((Port34 and 1) = 1) then
 St[50] :='BIOS Cacheable Option ウ Enabled'
else St[50] :='BIOS Cacheable Option ウ Disabled';
if (((Port34 and 16) shr 4) = 1) then
 St[51] := 'Latch Local Bus Device ウ ?'
else St[51] := 'Latch Local Bus Device ウ T3';
if (((Port33 and 64) shr 6) = 1) then
 St[52] :='Local Bus Ready ウ ?'
else St[52] :='Local Bus Ready ウ SYNC';
St[53] := Line3;
if (((Port11 and 128) shr 7) = 1) then
 St[54] := 'Mouse support Option ウ Enabled'
else St[54] := 'Mouse support Option ウ Disabled';
if (((Port35 and 2) shr 1) = 1) then
 St[55] :='Auto Cacheable Area ウ Enabled'
else St[55] :='Auto Cacheable Area ウ Disabled';
St[56] := Line1;
Str (HddType:21, St2);
St[57] := 'ウ First hard disk type ウ '+St2+' ウ';
Str (HddType2:21, St2);
St[58] := 'ウ Second hard disk type ウ '+St2+' ウ';
St[59] := Line3;
Str (Cylindre:21, St2);
St[60] := 'ウ Cylinders number ウ '+St2+' ウ';
Str (WCylindre:21, St2);
St[61] := 'ウ Number of Write Precompensation cylinders ウ '+St2+' ウ';
Str (PzCylindre:21, St2);
St[62] := 'ウ Number of Parking Zone cylinders ウ '+St2+' ウ';
Str (Head:21, St2);
St[63] := 'ウ Head number ウ '+St2+' ウ';
Str (Sectors:21, St2);
St[64] := 'ウ Sectors number ウ '+St2+' ウ';
St[65] := Line3;
Str (TailleHdd:21, St2);
St[66] := 'ウ First hard disk size (in MB) ウ '+St2+' ウ';
St[67] := Line2;
St[68] := Line4;
St[69] := 'ウ The first array represent the Advanced CMOS Setup. These values are very ウ';
St[70] := 'ウ important for a correct use of your computer. ウ';
St[71] := 'ウ ウ';
St[72] := 'ウ Keep this page near your PC then, you could restore these values if there ウ';
St[73] := 'ウ are deleted by a defect software (your PC should''nt run normally) ウ';
St[74] := Line5;
St[75] := '';
St[76] := Line4;
St[77] := 'ウ Le premier tableau reprTente l''"Advanced CMOS Setup". Ces valeurs sont ウ';
St[78] := 'ウ essentielles pour un fonctionnement correct de votre ordinateur. ウ';
St[79] := 'ウ ウ';
St[80] := 'ウ Conservez toujours cette page pr郭 de votre ordinateur pour pouvoir, en cas ウ';
St[81] := 'ウ de besoin, restorer ces donnFs (avec des donnFs incorrectes, votre PC ne ウ';
St[82] := 'ウ fonctionnera plus correctement). ウ';
St[83] := Line5;
St[84] := 'ウ Conservez toujours cette page pr郭 de votre ordinateur pour pouvoir, en cas ウ';
St[85] := 'ウ de besoin, restorer ces donnFs (avec des donnFs incorrectes, votre PC ne ウ';
St[86] := 'ウ fonctionnera plus correctement). ウ';
St[87] := Line4;
St[88] := 'ウ This program is a distributed freely as a Cardware. ウ';
St[89] := 'ウ Please send-me a postcard from where you live. Thank You! ウ';
St[90] := 'ウ ウ';
St[91] := 'ウ Ce programme est distribu? gratuitement en tant que Cardware. ウ';
St[92] := 'ウ Veuillez, svp, m''envoyer une carte postale bien de chez vous. Merci! ウ';
St[93] := 'ウ ウ';
St[94] := 'ウ ウ';
St[95] := 'ウ AVC SOFTWARE ウ';
St[96] := 'ウ AVONTURE CHRISTOPHE ウ';
St[97] := 'ウ ウ';
St[98] := 'ウ BOULEVARD EDMOND MACHTENS 157/53 ウ';
St[99] := 'ウ B-1080 BRUXELLES ウ';
St[100] :='ウ BELGIQUE ウ';
St[101] := Line5;
End;
Var I, J, K : Byte;
 F : Text;
 Ch : Char;
Begin
 Detect;
 ClrScr;
 TextAttr := 30;
 WriteLn('');
 WriteLn('レトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトソ');
 WriteLn('ウ CMOS : Create a Backup of your CMOS values (c) AVONTURE Christophe ウ');
 WriteLn('タトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトトル');
 WriteLn('');
 TextAttr := 14;
 WriteLn('');
 WriteLn('');
 WriteLn(' This program use Standard Printer Escape Code...');
 WriteLn('');
 WriteLn(' Check your printer... Put it OnLine... ');
 WriteLn('');
 WriteLn('');
 WriteLn(' Press a Key to start the printing... Or Escape to abort...');
 WriteLn('');
 REPEAT
 UNTIL KeyPressed;
 Ch := ReadKey; IF Ch = #0 THEN Ch := ReadKey;
 IF Ch = #27 THEN
 Halt;
 WriteLn (' Printing in progress ...');
 WriteLn ('');
 Write (Lst,PrnInit);
 Write (Lst,' CMOS '+
 '(c) AVC Software '+#1+' AVONTURE Christophe October 96');
 Write (Lst,#13+#10);
 Write (Lst,#13+#10);
 Write (Lst,#13+#10);
 Write (Lst,Line1+#13+#10);
 For I := 1 To 55 Do Begin
 St2 := St[I];
 If (St2[1]  'テ') then Begin
 K := 76-Length(St[I]);
 St2 := '';
 For J := 1 to K Do St2 := St2 + ' ';
 If I in [3..18] then
 Write (Lst,'ウ '+St[I]+St2+' ウ'+' '+St[(68-3)+I]+#13+#10)
 Else If I in [25..36] then
 Write (Lst,'ウ '+St[I]+St2+' ウ'+' '+St[(56-25)+I]+#13+#10)
 Else If I in [42..55] then
 Write (Lst,'ウ '+St[I]+St2+' ウ'+' '+St[(87-42)+I]+#13+#10)
 Else Write (Lst,'ウ '+St[I]+St2+' ウ'+#13+#10);
 End
 Else If I in [3..18] then
 Write (Lst,St[I]+' '+St[(68-3)+I]+#13+#10)
 Else If I in [25..36] then
 Write (Lst,St[I]+' '+St[(56-25)+I]+#13+#10)
 Else If I in [42..55] then
 Write (Lst,St[I]+' '+St[(87-42)+I]+#13+#10)
 Else Write (Lst,St[I]+#13+#10);
 End;
 Write (Lst,Line2+' '+St[101]+#13+#10);
 Write (Lst,PrnReset);
end.

AltStyle によって変換されたページ (->オリジナル) /