NewDeal Technical Support Document 262

FORCING NEWDEAL TO SEE COM OR LPT PORTS


How to use DEBUG (or SID) to force NewDeal software to recognize your serial or parallel ports

If NewDeal is not recognizing your modem or your printer port, here is some information that might help. This information is somewhat technical, so you might want to consult your local computer guru for assistance.

When you launch Preferences and click on the Computer button, all the serial and parallel ports on your computer should be displayed. If you are sure that your computer has a port, but it is grayed out in Preferences, you can use DOS's DEBUG to force your NewDeal software to recognize the port. (DR DOS customers can use SID in place of DEBUG).

If the port is active, but the IRQ setting shows a question mark, just dial the spinner to the correct interrupt number, then click OK. The question mark remains next to the IRQ settings for the serial ports until the software accesses the port in the current session. Unless the software does not recognize a port, the simple thing to do is to ignore the question marks.

Step-by-step Instructions

  1. Start DEBUG and examine your port addresses.

    MS-DOS users: at the DOS prompt, enter
    DEBUG
    d40:0,f
    DR-DOS users: at the DOS prompt, enter
    SID
    d40:0 f
    If DOS reports "Bad Command or Filename," then change to the subdirectory where DEBUG.EXE or SID.EXE is located and try again.

  2. When you press the enter key, DEBUG (or SID) will display the contents of 16 bytes of your computer's memory. Each pair of bytes represents a serial or parallel port location, as in this example:
    0040:0000 f8 03 f8 02 00 00 00 00 78 03 00 00 00 00 00 00
              com1  com2  com3  com4  lpt1  lpt2  lpt3  lpt3
    

    When NewDeal starts up, it first examines the value for the COM1 location. If it finds the value f8 03, then it activates (darkens) COM1 in Preferences. If it finds the value f8 02, then it activates COM2 in Preferences (and leaves COM1 "grayed out"). If it finds 00 00, then it stops looking at serial ports. If NewDeal finds a value other than 00 00 in the location for COM1, then it goes on to the location for COM2 and so on. Note that NewDeal determines which COM port to activate according to the value, not the location.

    Here are the values for the four possible serial ports:

    • COM1 = f8 03
    • COM2 = f8 02
    • COM3 = e8 03
    • COM4 = e8 02

    When NewDeal finds a value of 00 00 in one of the serial port locations (or when it finishes with COM4), it starts examining the parallel port locations. NewDeal first looks at the location for LPT1. If it finds a value of 78 03,it activates LPT1 in Preferences. If it finds 78 02, then it activates LPT2 (and leaves LPT1 "grayed out"), and so on. Then NewDeal examines the next port location. If it finds 00 00, then it quits checking ports.

    Here are the values for the four possible parallel ports:

    • LPT1 = 78 03 (or bc 03)
    • LPT2 = 78 02 (or 78 03)
    • LPT3 = 3c 03 (or bc 03 or 78 02)
    • LPT4 = 3c 02
  3. How to insert new addresses for serial ports

    You can use DEBUG (or SID) to insert values into your computer's memory before starting your NewDeal software. This will usually force NewDeal to recognize and activate the corresponding port(s).

    MS-DOS users: to insert the values for serial ports at the DEBUG prompt, enter

    e40:0
    followed by the values for the serial ports you have.

    EXAMPLE 1: to insert values for COM1, COM2, and COM3, you would enter:

    e40:0 f8 03 f8 02 e8 03 00 00

    EXAMPLE 2: to insert values for COM2 and COM3 (leaving COM1 and COM4 "grayed out"):

    e0:0 f8 02 e8 03 00 00 00 00

    To check your work, enter d40:0 again at the DEBUG prompt. Then enter q to quit DEBUG.

    DR-DOS (SID) users: to insert values for serial ports, enter the command:

    s40:0
    then enter each value one at a time, hitting the Enter key after each one. After the last one, enter a period to exit the "s" command, then q to quit SID.

    EXAMPLE 1: to insert values for COM1, COM2, and COM3, enter

    s40:0
    f8
    03
    f8
    02
    e8
    03
    00
    00
    .
    q

    EXAMPLE 2: to insert values for COM 2 and COM 3 (leaving COM1 and COM4 "grayed out"), enter

    s40:0
    f8
    02
    e8
    03
    00
    00
    00
    .
    q

    How to insert new addresses for parallel ports

    The process for inserting parallel port values is similar to that for serial ports, but the address is different.

    MS-DOS users: at the DEBUG prompt, enter e40:8 followed by the values separated by spaces.

    EXAMPLE 3: if you want LPT1 and LPT2, enter

    e40:8 78 03 78 02 00 00 00 00

    EXAMPLE 4: if you want a third parallel port, you'd enter

    e40:8 78 03 78 02 3c 03 00 00

    Then enter d:40:0 f to check your work and q to exit DEBUG.

    DR-DOS (SID) users:for parallel ports, at the SID prompt, enter s40:8,then enter the values for your parallel ports one by one. Next, enter a period to exit the "s" command. Last, check your work with d40:0,f and enter q to quit SID.

    Now launch your NewDeal software and make sure it is working.

    The ports for which you inserted values should now be active in Preferences in the Computer section. However, the settings will be lost as soon as you turn off or reboot the computer. You probably don't want to have to enter all the information in DEBUG or SID each time you start up your computer, so...

    How to automate the process

    To simplify the process you must create two files. You can use the NewDeal Text File Editor or any text editor to create the files. The first is a simple text file that contains the key presses which you would normally type in DEBUG or SID.

    MS-DOS users:

    EXAMPLE 1: For example number one above, create a file your text editor containing the following text:

    e40:0 f8 03 f8 02 e8 03 00 00
    q

    EXAMPLE 3: For example number three above, create a file in your text editor containing the following text:

    e40:8 78 03 78 02 00 00 00 00
    q
    then save the file with any name you choose. For our examples, let's say you save it in the \NEWDEAL directory on your C drive with the name PORTVALS.TXT.

    The second file you need is a batch file containing the following command:

    DEBUG < C:\NEWDEAL\PORTVALS.TXT

    DR DOS (SID) users:

    Your first file would look like these:

    EXAMPLE 1:

    s40:0
    f 8
    0 3
    f 8
    0 2
    e 8
    0 3
    0 0
    0 0
    .
    q
    EXAMPLE 3:
    s40:8
    7 8
    0 3
    7 8
    0 2
    0 0
    0 0
    0 0
    0 0
    .
    q

    The second file you need is a batch file containing the following command:

    SID < C:\NEWDEAL\PORTVALS.TXT
    ALL users:

    Use your text editor to create and save this batch file with any name you like (the filename must end with the extension .BAT). Let's say you save it in the same directory, C:\NEWDEAL, under the name SPRTVALS.BAT.

    Whenever you want to insert the values, just run the batch file. You can do so by double-clicking on the batch file in NewManager, or by typing the name of the batch file at the DOS prompt.

  4. How to automate it even more

    If you want to run the batch file automatically every time you start up your computer, just add a line to your AUTOEXEC.BAT file which CALLs the batch file. In our example, you would add the following line:

    CALL C:\NEWDEAL\SPRTVALS

    If your computer starts up a program automatically every time you turn it on (like NewDeal software, Windows, or a menu program, etc.), be sure to add the line that calls the batch file before the lines that load that program.

  5. One final, but rare, possibility

    There's a "gate" between the 8250 serial port chip (and perhaps some newer chips) and the I/O bus that must be opened to allow the interrupt request from the 8250 to make it to the CPU. On some rare computers, there's something screwy so that unless the gate is opened before the software starts, the initial interrupt never makes it to the CPU, so the serial driver thinks it can't deal with the port. To accommodate these rare machines, we tried inserting a full half a second wait between opening the gate and provoking the interrupt, but it didn't always solve the problem. If you have one of these unusual computers, you may notice that you can access the port within our software if you first access it from some other software. If this is the case, one work around is to create a batch file to write 8 to port 3fc which should open the gate, and then call that batch file from the batch file you use to launch our software.
Back to Index

Last Modified 17 Feb 1999