Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MODEL30.EXE

MODEL30.EXE is a small DOS command-line utility for controlling selected planar devices on the IBM PS/2 Model 30 by reading and writing the system control register at I/O port 65h.

It was written in Turbo Pascal and preserves unrelated bits in the register when changing a device setting.

Supported devices

Command name Aliases Register bits Description
LPT LPT1 80h and 02h Enables or disables the onboard parallel port
COM COM1 10h Enables or disables the onboard serial port
HDD 01h Enables or disables the onboard hard-disk interface
FLOPPY FDD 08h Enables or disables the onboard floppy-disk interface
MCGA VIDEO 04h Enables or disables the onboard MCGA video hardware

Syntax

MODEL30
MODEL30 STATUS
MODEL30 device:ON|OFF [device:ON|OFF ...]

Running MODEL30 with no arguments displays the current register value and device status.

MODEL30 STATUS does the same thing explicitly.

One or more device settings can be supplied on the same command line.

Examples

Display the current status:

MODEL30

or:

MODEL30 STATUS

Disable the parallel port:

MODEL30 LPT:OFF

Re-enable the parallel port:

MODEL30 LPT:ON

Disable the onboard hard-disk interface:

MODEL30 HDD:OFF

Disable the parallel port and enable COM1:

MODEL30 LPT:OFF COM1:ON

Disable several onboard devices at once:

MODEL30 LPT:OFF HDD:OFF FLOPPY:OFF

The command names and ON/OFF values are not case-sensitive.

Typical Autoexec.bat setup

When a device is configured to use IRQ 7, disabling the onboard LPT port can free that interrupt:

C:\UTIL\MODEL30.EXE LPT:OFF HDD:OFF COM:ON

These commands may be placed in AUTOEXEC.BAT.

Output

After changing a setting, the utility displays the value of port 65h before and after the write:

Port 65h before: 9E
Port 65h after : 1C

The exact values depend on the current state of the machine.

If the register value read back from the hardware does not match the requested value, the program displays:

Warning: register readback does not match requested value.

Exit codes

Code Meaning
0 Command completed successfully
1 Invalid argument or unknown device name
2 Register readback did not match the requested value

Exit codes can be checked in a batch file with ERRORLEVEL.

Example:

MODEL30 LPT:OFF
IF ERRORLEVEL 2 GOTO READERROR
IF ERRORLEVEL 1 GOTO BADCOMMAND

Error examples

An invalid setting:

MODEL30 LPT:YES

An unknown device:

MODEL30 SOUND:OFF

Both display the usage screen and return exit code 1.

Important notes

  • Changes are made directly to the Model 30 planar control register.
  • Settings normally return to their firmware defaults after a cold boot or power cycle.
  • The utility preserves unrelated bits in port 65h.
  • Disabling the floppy, hard-disk, serial, or video hardware can make those devices unavailable immediately.
  • Do not disable a storage controller while DOS is actively using a drive attached to it.
  • The LPT option changes both the parallel-port select and output-enable bits.
  • This utility is intended for the IBM PS/2 Model 30 hardware whose planar control register is located at port 65h.

Built-in help

Entering an invalid command displays the built-in usage summary:

MODEL30 - IBM PS/2 Model 30 planar control utility

Usage:
  MODEL30 STATUS
  MODEL30 device:ON|OFF [device:ON|OFF ...]

Devices:
  LPT or LPT1
  COM or COM1
  HDD
  FLOPPY or FDD
  MCGA or VIDEO

Example:
  MODEL30 LPT:OFF HDD:OFF COM1:ON

About

DOS utility for viewing and modifying IBM PS/2 Model 30 system control register 65h

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages