home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Devil's Doorknob BBS Capture (1996-2003)
/
devilsdoorknobbbscapture1996-2003.iso
/
Dloads
/
SYSOP
/
MODS1.ZIP
/
GAF008.MOD
< prev
next >
Wrap
Text File
|
1995-04-19
|
4KB
|
160 lines
┌────────────────────────────────────────────────────────────────────────────┐
│ Mod Name: GAF008.MOD Date: January 19, 1994 │
│ Difficulty: █▒▒▒▒▒▒▒▒▒▒ Mod Authors: Gaf Man │
│ WWIV Version: 4.23 1@4513 WWIVnet │
│ Files Affected: LILO.C 1@1 DriftNet │
│ Description: Displays CPU Processor Speed. 1@12 EarthNet │
└────────────────────────────────────────────────────────────────────────────┘
Step 1:
~~~~~~~
Open up LILO.C and block copy the following at the top.
#include "vars.h" /* Already exists */
#include "vars.h" /* Already exists */
#pragma hdrstop /* Already exists */
#define _8088 0 /* Start Here */
#define _NECV20 1
#define _80188 2
#define _80286 3
#define _80386 4
#define _80486 5
char *CPUStrings[] =
{
"8088/8086",
"NEC V20/V30",
"80188/80186",
"80286",
"80386",
"80486"
};
int CPUInfo( void )
{
int present_386,present_486;
asm {
MOV BX, SP
PUSH SP
POP AX
XCHG BX, SP
}
if ( _AX == _BX ) {
asm {
MOV AX, 7000h
PUSH AX
POPF
PUSHF
POP AX
}
if ( ( _AX & 0x7000 )==0x0000 )
return( _80286 );
else {
asm {
mov bx,sp
and sp,not 3
db 66h
pushf
db 66h
pop ax
db 66h
mov cx,ax
db 66h
xor ax,0
dw 4
db 66h
push ax
db 66h
popf
db 66h
pushf
db 66h
pop ax
db 66h
xor ax,cx
mov present_386,1
je check
mov present_386,0
mov present_486,1
}
check:
if (present_386)
return( _80386 );
else
return( _80486 );
}
}
asm {
MOV AL, 0FFh
MOV CL, 21h
SHR AL, CL
}
if ( _AL != 0x00 )
return( _80188 );
enable();
asm {
PUSH SI
MOV CX, 0FFFFh
}
__emit__(0xF3,0x26,0xAC); /* REP LODS BPTR ES:[SI]*/
asm {
POP SI
}
if ( _CX == 0x00 )
return( _NECV20 );
return( _8088 );
} /* Stop Block Copy */
Step 2:
~~~~~~~
Add this line here in void logon(void):
/* this line right here */
npr("9Current Processor0. 2%s\r\n", CPUStrings[ CPUInfo() ]);0
/* right before this code */
if (multitasker) {
outstr(get_string(1169));
switch (multitasker) {
case 1 :
dv=get_dv_version();
npr("DESQView 1%d.%02d\r\n",dv/256,dv%256);0
break;
Step 3:
~~~~~~~
Save LILO.C and recompile the BBS and copy BBS.EXE over the old one. Thats it.
If you use this mod please e-mail me. I like to know how many people use my
mods.