Diagnostic Programs
BASIC Code Listings
GET EQUIPMENT DETAILS

1000 REM ==== GET EQUIPMENT DETAILS ====
1005 DEF SEG = &HF000: E0% = PEEK(&HFFFE)
1007 PRINT "Type of system:",
1010 IF E0% = 248 THEN PRINT "PS/2 Model 80": E0% = 0: AT% = 1
1011 IF E0% = 249 THEN PRINT "PC Convertible": E0% = 0
1012 IF E0% = 250 THEN PRINT "PS/2 Model 30": E0% = 0
1013 IF E0% = 251 THEN PRINT "PC/XT or compatible": E0% = 0
1014 IF E0% = 252 THEN PRINT "PC/AT or compatible": E0% = 0: AT% = 1
1015 IF E0% = 253 THEN PRINT "IBM PCjr": E0% = 0
1016 IF E0% = 254 THEN PRINT "PC/XT or compatible": E0% = 0
1017 IF E0% = 255 THEN PRINT "IBM PC or XT": E0% = 0
1019 IF E0% <> 0 THEN PRINT "Unknown - ID byte = "; HEX$(E0%); "H"
1020 DEF SEG = &H0: E0% = PEEK(&H410): E1% = PEEK(&H411): D0% = PEEK(&H475)
1021 PRINT "Math Coprocessor:",
1022 E2% = INT(E0% / 2) - INT(E0% / 4) * 2
1023 IF E2% = 0 THEN PRINT "None" ELSE PRINT "Installed"
1025 PRINT "Base memory available:", PEEK(&H413) + PEEK(&H414) * 256; "k bytes."
1026 IF AT% = 0 THEN 1030
1027 OUT 112, &H30: M% = INP(113): OUT 112, &H31: M% = M% + INP(113) * 256
1028 PRINT "Extended memory installed:", M%; "k bytes."
1030 PRINT "Number of diskette drives:", INT(E0% / 64) + (E0% - (INT(E0% / 2) * 2))
1032 PRINT "Number of hard disks:", D0%
1034 PRINT "Number of serial ports:", INT(E1% / 2) - INT(E1% / 16) * 8
1036 PRINT "Number of parallel ports:", INT(E1% / 64)
1040 PRINT "Number of game ports:", INT(E1% / 16) - INT(E1% / 32) * 2
1050 E0% = PEEK(&H449): PRINT "Current video mode:",
1051 IF E0% = 0 THEN PRINT "40x25 mono (CGA/EGA/VGA)"
1052 IF E0% = 1 THEN PRINT "40x25 color (CGA/EGA/VGA)"
1053 IF E0% = 2 THEN PRINT "80x25 mono (CGA/EGA/VGA)"
1054 IF E0% = 3 THEN PRINT "80x25 color (CGA/EGA/VGA)"
1055 IF E0% = 7 THEN PRINT "80x25 mono (MDA/Hercules)"
1057 IF E0% > 7 THEN PRINT E0%
1060 E0% = PEEK(&H496): E0% = INT(E0% / 16) - INT(E0% / 32) * 2
1062 PRINT "Type of keyboard:",
1064 IF E0% = 0 THEN PRINT "84 keys" ELSE PRINT "101/102 keys"
1070 REM ==== Get ROM BIOS locations ====
1071 PRINT "BIOS ROM locations:",
1072 FOR I = 49152! TO 64000! STEP 256
1073 DEF SEG = I
1074 IF PEEK(0) = &H55 AND PEEK(1) = &HAA THEN PRINT HEX$(I); ":0",
1075 NEXT I
1078 PRINT
1095 END