www.delorie.com/archives/browse.cgi   search  
Mail Archives: opendos/2004/06/17/07:47:11.1

X-Authentication-Warning: delorie.com: mail set sender to opendos-bounces using -f
Date: Thu, 17 Jun 2004 10:29:46 +0200
From: Matthias Paul <Matthias DOT Paul AT post DOT rwth-aachen DOT de>
Subject: Re: Random Lockups with DR-DOS 7.03
To: opendos AT delorie DOT com
Message-id: <001701c45445$80312ec0$c03dfea9@atlantis>
Organization: Aachen University of Technology (RWTH), Germany
MIME-version: 1.0
X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2800.1409
X-Mailer: Microsoft Outlook Express 6.00.2800.1409
X-Priority: 3
X-MSMail-priority: Normal
References: <200406100759 DOT i5A7xXRK010329 AT delorie DOT com>
<40CF0305 DOT 10732 DOT 9898147 AT localhost>
Reply-To: opendos AT delorie DOT com

On 2004-06-15, Leonard Erickson wrote:

> It may be the first thing *listed* in config.sys. But that doesn't
> mean it's the first thing *loaded*.

This is in fact the case for MS-DOS/PC DOS.

However, as DR-DOS uses an interpreter in order to execute CONFIG.SYS
rather than a 3-pass compiler (as MS-DOS/PC DOS does), DR-DOS does not
reorder CONFIG.SYS directives.

This approach has other advantages as well: There is no file size limit
for CONFIG.SYS but the underlaying filesystem's file size limit (that
is, 2 Gb for FAT16. ;-) It is possible to construct sub-routines and
loops and conditional branches in an almost BASIC-like fashion. For
example, it is possible to let DR-DOS conditionally react on user
input at any time (for example using the GETKEY= directive) or base
the further execution path through CONFIG.SYS on result codes
returned by loaded device drivers (using the ONERROR= directive).
And it is possible to load TSRs before device drivers (sometimes
an important feature), or mix and load drivers and TSRs in any
order which may be technically convenient.

Under MS-DOS/PC DOS there is a file size limit of about 64 Kb or
below, and it is not possible to react on user input (except for
in boot menus which are displayed before any drivers are loaded)
or on result codes returned by drivers. Also, device drivers will
always be loaded before TSRs no matter where they are listed
in CONFIG.SYS.

> Try doing the "step by step confirmation" at boot (I can't remember
> if it's f5 or f8). You may be surprised at the order statements in
> config.sys get processed.

Since most of these extensions (since DR-DOS 7.02) are badly documented,
I would like to take the opportunity to flesh this out a little. Maybe
some DR-DOS users can take advantage of it:
 
Under DR-DOS, you can use the following hotkeys while the "Starting DR-DOS..."
message occurs:

F5      = Skip configuration files (that is [D]CONFIG.SYS).
          DR-DOS 7.03 - 7.06 will still scan for SWITCHES=
          and SHELL=/HISHELL=/SHELLHIGH=, previous issues
          down to Novell DOS 7 will only scan for SWITCHES=.
          (This has been implemented so DOS gamers can blindly
          follow the instructions in the games' README files
          even on a system where DR-DOS and Windows 9x coexist,
          that is, where the COMMAND.COM in the root is not
          necessarily the DR-DOS COMMAND.COM. However, this
          "feature" is risky as you can lock yourself out
          of the system, if SHELL= does not point to a valid
          DR-DOS COMMAND.COM. See F6 below for a potential
          solution to that problem).
          You can inhibit any of these hotkeys using
          SWITCHES=/N in the *first* line of CONFIG.SYS.
     
F6      = Reserved for a forced variant of F5 mode, which will
          not skip SWITCHES=, but will skip SHELL=/HISHELL=/SHELLHIGH=
          (just like DR-DOS prior to 7.02 did). (However, due
          to reasons of time, this mode is not fully implemented
          in DR-DOS 7.03 - 7.07, unfortunately.)
          This variant is not available under MS-DOS/PC DOS.

F7      = A variant of F8 single stepping mode (below), which
          will more work as a "trace-into" rather than a "step-over"
          mode if you single-step through sub-routines. As long as
          you have a linear CONFIG.SYS file, the differences are
          marginal, but if you use directives like SWITCH= or
          subroutines (with GOSUB and RETURN), its usefulness
          will soon become obvious.
          This variant is not available under MS-DOS/PC DOS,
          it was introduced with DR-DOS 7.02.

F8      = Enter single-stepping mode.
          Some (very few) CONFIG.SYS directives will not be
          queried for even in this mode (for example, there
          is not much point to query the user if REM should
          be executed or not. ;-)
          You can programmatially enter single-stepping mode
          using the

          TRACE=ON|OFF
          
          CONFIG.SYS directive. By default, this will assume
          F7 trace-into single-stepping in order to preserve
          the logical flow in the file, but it will keep track
          of whatever single-stepping mode (F7 or F8) the
          user selected via hotkeys.

SHIFT   = Works like F5, but does not cause any keyboard
          buffer overflows if you press the key for a
          longer while even before the "Starting DR-DOS..."
          message occurs.

CTRL+F5 = Will work identical to the above mentioned F5/F8, but it
CTRL+F8   will cause disk compression software such as Stacker,
          DblSpace or DrvSpace to query the user if it should
          actually load or not. This is a way to bypass drivers
          loaded via the preload-API if they are aware of
          these hotkeys.

CTRL+F6 = Will work identical to CTRL+F5, but DR-DOS will not even
          attempt to load disk compression drivers via the preload-
          API, so it is possible to bypass misbehaving preloadable
          drivers, even if they are not aware of these hotkeys
          themselves. If installed DR-DOS system security will
          still be loaded for obvious reasons.

CTRL+F7 = Will be transparently translated into CTRL+F8 by DR-DOS
          as far as disk compression software is concerned.

Once you have entered single-stepping mode, under DR-DOS 7.02 - 7.06
you can use the following keys in addition to the (variable) [Y,N,R]
keys listed in the user query:

ENTER = Works the same as a logical "Yes".
        This is helpful without keyboard driver loaded, so you
        can easily answer "Yes" even with non-matching alpha
        key caps (a common problem in non-QWERTY environments).
        It is also useful for the visually impaired among us,
        as it is much easier to find the ENTER key than one of
        the alpha keys.

SPACE = Works the same as a logical "No".
        (See above.)

TAB   = Will select the current default answer (that is "Yes" or
        "No" in Y/N-queries).
        If a default answer is defined in a given context,
        DR-DOS will show this in the queries by displaying the
        corresponding key in <brackets>, f.e. "[Y,<N>]?",
        otherwise it will just display "[Y,N]?"
        If no (useful) default answer is defined, TAB works
        identical to ENTER, that is, works as an implicit way
        to answer "Yes".

        The following CONFIG.SYS directive can be used to redefine
        the query and switch default answers at any time:

        TIMEOUT=timeout_seconds,query_default_answer,switch_default_answer

        Arguments are optional, but issues of DR-DOS before 7.02
        had a different default behaviour then.

        The default query answer is 'N' for "No", the default switch
        answer (for SWITCH= sub-menus) is '1'.
        If a timeout value other than 0 (no timeout, the default) is
        set, DR-DOS will assume the answer to be the corresponding
        default answer once the timeout has been elapsed. This does
        not happen, if you press keys not in the set of allowed
        keys - older issues of DR-DOS simply assumed "No" then,
        but unless you specified SWITCHES=/Y (IIRC - I will have to
        look this up again) for backward compatibility DR-DOS 7.02
        and above will insist on valid user input and emit a beep
        (until you gave SWITCHES=/B IIRC), so accidently pressing
        the wrong keys isn't much of a problem any more.
        It is possible to temporarily inhibit the timeout by toggling
        Scroll-Lock into the "On" position - this is called DIAG mode.
        In case DIAG mode is already active before DR-DOS starts
        DR-DOS (and some of its drivers) will give more verbose
         messages for debug or diagnostic purposes.
        You can programmatically enter or leave DIAG mode by using
        the CONFIG.SYS directive:

        SCROLLOCK=ON|OFF

        The following CONFIG.SYS directive can be used to redefine
        the hotkeys for "Yes" (default: 'Y'), "No" (default: 'N'),
        and "Resume" (default: 'R'), which will be reflected in
        the queries as well:

        YESCHAR=Y
        NOCHAR=N
        RESUMECHAR=R

        Only the first letter will be taken (except for in Far-East
        DBCS versions), so you could just as well write YESCHAR=Yes.

        In case one of the default answers matches these hotkeys
        while they get redefined, for maximum user convenience the
        default answers will be implicitly changed to the new
        values as well, so you do not have to redefine them
        as well using TIMEOUT=. However, this only happens if
        they were matching before, as otherwise DR-DOS cannot
        draw any connection between the default answers and
        the Y/N characters.

ESC   = Will either resume normal operation (non-single-stepping)
        (similar to the default 'R') or cause an implicit "No"
        answer, depending on circumstances.

While you are in single-stepping mode (either F7 or F8) you can
at almost any time abandon CONFIG.SYS processing by pressing F5
(or F6), and you can switch between F7 and F8 sub-modes as you
like. DR-DOS will keep track of if trace-into or step-over mode
has been selected and continue processing in this mode until the
next mode change (mostly important only when timeout is used
in conjunction with single-stepping, in sub-routines, or in
conjunction with TRACE=).

Once CONFIG.SYS processing has been finished, DR-DOS will attempt
to load a command processor in order to run AUTOEXEC.BAT (or
whatever equivalent auto-run file has been specified in the
SHELL= line). It will signal the mode of operation (F5/F6/F7/F8)
to the command interpreter in two ways:

If F5/F6 has been used, it will add /D to the command interpreter's
command line, if F7/F8 has been used, it will add /Y instead.
These command line parameters will be recognized by DR-DOS
COMMAND.COM since (about) 7.02 and most 3rd party command
interpreters (except for the latest issues of 4DOS 7.50 for
some odd political??? reasons - previous issues of 4DOS 7.50
worked fine).
In addition to this, DR-DOS will make the actual mode and
sub-mode available to DR-DOS-aware command interpreters
using an internal interface by adding a special appendage
to the pre-environment, so that older issues of DR-DOS
COMMAND.COM, which did not support /D and /Y switches,
will recognize this as well, and newer issues of COMMAND.COM
will even be able to distinguish between the sub-modes
(F5/F6 and F7/F8). (Unfortunately, 4DOS ignores these values,
although it already queries this internal interface for other
reasons - which is particularly odd as 4DOS' built-in debugger
could take major advantage of this.)

>> The common partition gets IMAGEd by the Norton
>> Utilities for Windows running when I have booted into Win98.  From
>> DR-DOS I cannot delete (even after resetting the file attributes)
>> IMAGE.DAT and IMAGE.IDX in the root of the D: partition, so I presume
>> that Win does some kind of funny stuff that is disliked by something
>> on the DR-DOS side of the fence.
>
> If you can't delete them, that means that *something* is using them
> or protecting them. If you can boot without running config.sys &
> autoexec.bat, try deleting them then.

In theory they could be password protected under DR-DOS, but I doubt
this would be the case here. ;-) As you say, it seems much more likely,
that some resident software is protecting them (and since there seems
to be no other visible clue on this, I assume such software is loaded
via the preload API).

I hope I haven't introduced too many mistakes in the description above,
after all it's years ago that I implemented it... ;-) In case something
does not work as described, please correct me and I can look up the
details again.

Greetings,

 Matthias

-- 
<mailto:Matthias DOT Paul AT post DOT rwth-aachen DOT de>; <mailto:mpaul AT drdos DOT org>
http://www.uni-bonn.de/~uzs180/mpdokeng.html; http://mpaul.drdos.org

"Programs are poems for computers."

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019