[comp.os.msdos.misc] Frequently Asked Questions: READ THIS BEFORE YOU POST

t-rayc@microsoft.UUCP (Raymond CHEN) (07/03/90)

[
Now that comp.sys.ibm.pc has split, this file should also be split
into pieces.  Any volunteers?

Differences between this version and last month's version are
described in a companion article.  There have been some significant
changes. --rjc
]

[@(#)faq.csip   4.8  Last revised on 7/2/90]

TABLE OF CONTENTS

CHAPTER 0:  INTRODUCTION

0.1)  What is this file?
0.2)  I have a question that's not in this file.  How should I ask it
      to increase the chances that I'll get a response?
0.3)  Somebody just said that a { Mac, Amiga } beats the socks of a PC.
      I have my flame thrower ready.  Any last words?
0.4)  Somebody just asked a really simple question.  What should I do?

CHAPTER 1:  OBTAINING PROGRAMS FROM THE ARCHIVES

1.1)  What is anonymous ftp?  How do I use it?
1.2)  How do I use the programs that are posted to comp.binaries.ibm.pc?
1.3)  I've uudecoded it, and the file is on my PC.  Now what?
1.4)  The unpacking program said that the archive was corrupted.
1.5)  What public archives exist, and what are their IP numbers?
1.6)  I do not have ftp access.  Can somebody email me the files?

CHAPTER 2:  PROGRAMMING

2.1)  How do I program the mouse/joystick?  What does interrupt X do?
      How do I program my EGA/VGA/whatever graphics card?
2.2)  How do I do direct video access from C?  Read/write an arbitrary byte?
2.3)  How do I reboot my computer via software?
2.4)  What is the difference between extended/expanded memory, and
      how can I access it from my C/Pascal program?
2.5)  I get the message "floating point formats not linked" when I
      try to run my C program.  Why?

CHAPTER 3:  SOFTWARE AND VENDORS

3.1)  Has anyone had any experience with {company X, product Y}?
3.2)  I'm having trouble with product X.  Can anyone help me?
3.3)  What is the file format that application X uses?
3.4)  Rumor has it that company X is working on a new version of product Y.
      Does anybody have any information about it?
3.5)  I don't like my keyboard's layout.  How can I swap the X and Y keys?

CHAPTER 4:  HARDWARE

4.1)  What are the differences between chip X and chip Y?
4.2)  Can I move floppies around freely between 1.2M and 360K drives?
      How about formatting a 360K floppy as 1.2M?  720K as 1.44M?
4.3)  How do I do a low-level reformat of my hard drive?
4.4)  What does interleave mean?  What interleave should I use?
4.5)  What do ESDI, SCSI, RLL, MFM mean?
4.6)  Can I use an RLL controller on my MFM drive?
4.7)  Should I leave my PC turned on all the time?  What about
      mounting it sideways?

CHAPTER 5:  MISCELLANEOUS

5.1)  How do I undelete a file?  Recover from an accidental reformat?
5.2)  Where can I get curses? vi? emacs?  How do I remove a TSR from memory?
      How do I write my own TSR?  Is there a program that does X?
5.3)  What about GIF images?  How do I view a GIF image?
5.4)  How do I turn the ECHO off from a batch file?
5.5)  How can I set a long path?  How can I enlarge my environment?
      How do I get/set an environment variable from a C/pascal program?
5.6)  How do I install a new version of DOS on my hard drive?

APPENDIX A: ANSWERS TO MORE QUESTIONS and AVAILABILITY OF THIS FILE

--------------------------------------------------------------------------
CHAPTER 0:  INTRODUCTION

0.1)  What is this file?

    This is a list of questions that seem to pop up repeatedly in this 
    newsgroup.  The purpose of this article is to answer them once and
    for all so as to improve the signal-to-noise ratio.  There are also
    bits and pieces of etiquette hidden in the answers, so even if you
    aren't particularly fascinated by the topic, skim through the answer.
    You might learn something.

    The mentioning of a particular company is not meant to be interpreted
    as an endorsement, merely a presentation of information which is
    requested often.  If you feel I am showing favoritism, disagree with
    these answers, find any errors, or otherwise want to say something
    regarding them, send email to raymond@math.berkeley.edu.

    Special thanks go to Prof. Timo Salmi and Keith Petersen for providing
    much of the raw material from which Chapter 1 was built.  Thanks also
    to all the people (too numerous to list) who contributed to this file.

0.2)  I have a question that's not in this file.  How should I ask it
      to increase the chances that I'll get a response?

    When asking a question, choose an appropriate subject.  The volume of
    this newsgroup is so high that articles with subjects like "Help" or
    "A question" or "IMPORTANT READ THIS NOW" are likely to be ignored.
    Moreover, spend some time proofreading your article.  Use your
    system's spellchecker to check words whose spellings you are unsure
    of.  Pretend your article is going to be published around the world.
    After all, it is.

    You should probably also check that your question hasn't been asked
    to death before.  Many of the files on my email server address
    commonly-asked questions whose answers are too long to list here.
    I also keep an index of previously-asked questions on my email server.
    Instructions on using the email server are posted separately.

0.3)  Somebody just said that a { Mac, Amiga } beats the socks of a PC.
      I have my flame thrower ready.  Any last words?

    Oh, for crying out loud.  About twice a year some immature bozo
    posts a note like this and the flames don't die out for weeks.  If
    you consider yourself a mature human being, bite your lip and keep
    quiet.  Let the nincompoop think he's won.  If you absolutely
    positively can't keep quiet, flame the sucker by email.  But
    please, don't make the rest of us have to suffer through it.

    While I have your attention, here are a few more subjects that
    we're sick of seeing:

    FCC to impose surtax on modem usage:  This is simply not true.
        Consult the file "fcc" on my mail server for a letter from
        the FCC debunking this rumor.

    Make Money Fast:  They're all pyramid schemes, and they're illegal,
        especially the one from Dave Rhodes.

    Dying Boy's Last Wish:  He broke the record in 1988, so stop it already.
        Besides, the poor child's address keeps changing, ranging from London
        to Atlanta.

0.4)  Somebody just asked a really simple question.  What should I do?

    Send him the answer by email.  Don't post the answer, since
    (trust me) about a dozen people will do it anyway.  If you
    want, drop me a line so I can add the question to the FAQ archives.


CHAPTER 1:  OBTAINING PROGRAMS FROM THE ARCHIVES

1.1)  What is anonymous ftp?  How do I use it?

    Ftp stands for File Transfer Protocol, a standard for transferring
    files among various computers.  "Anonymous ftp" is a way of making
    files publicly available for transfer via ftp.  Usually, this is done
    by logging in as userid "anonymous" and giving your electronic mail
    address as the password.  (Although rumor has it that nobody actually
    saves the passwords typed to the ftp program.)  It's only polite to
    minimize your connect time, since each machine can service only a
    small number of ftp users at a time.

    Beyond this rather sketchy description, the details vary from machine
    to machine.  On many UNIX machines, you can get information by typing
    "man ftp".  In any case, check with your sysadmin for information
    peculiar to your site.

    Here is what a typical ftp session might look like.

        ftp 26.2.0.74               The IP address for the SIMTEL20 archives
        anonymous                   The special userid for anonymous ftp
        raymond@math.berkeley.edu   My email address is the password
        cd pd1:<msdos.gif>          Switch to the proper directory
        tenex                       Magic word, see below
        get gif_lib.zip             Get the Turbo C GIF library (include source)
        quit                        Clean up and leave

    I could have gotten away with typing "ftp wsmr-simtel20.army.mil"
    instead of using the IP address.

1.2)  How do I use the programs that are posted to comp.binaries.ibm.pc?

    Follow the instructions in order to cut and paste the files
    in the proper order.  The resulting file must then be

            (1) "uudecode"d to a binary file,
            (2) transferred to your PC.

    The order in which the above steps are taken is not important,
    although the usual order is as shown above.  If your host machine
    does not have the uudecode program (e.g., if it is not a UNIX
    machine), you will probably have to do the uudecoding on your PC.

    Here's a script to perform step 1 on UNIX machines:

        #! /bin/sh
        sed '/^END/,/^BEGIN/d' $* | uudecode

    If you saved the pieces as "part01" "part02" and so on, then you
    just type "combine part*" and everything gets decodeded automatically.

1.3)  I've uudecoded it, and the file is on my PC.  Now what?

    Most files have to be unpacked before you can run them.  The
    appropriate unpacking program to use can be determined by inspecting
    the file extension.  Some of the more common ones appear in the
    table below.

        Exten-  Program  Full name of program package   Archive sites that 
        sion    to use     and directory on SIMTEL20    use this format

        ARC     PKUNPAK  PD1:<MSDOS.ARC-LBR>PK361.EXE   SIMTEL20
        ZIP     PKUNZIP  PD1:<MSDOS.ZIP>PKZ102.EXE      grape
        ZOO     ZOO      PD1:<MSDOS.ZOO>ZOO201.EXE      comp.binaries.ibm.pc
        PAK     PAK210   PD1:<MSDOS.ARC-LBR>PAK210.EXE  chyde.uwasa.fi
                ^^^ note: this is *different* from PKPAK.
        LZH     LHARC    PD1:<MSDOS.ARC-LBR>LH113c.EXE  chyde.uwasa.fi
        Z       COMPRESS PD1:<MSDOS.SQ-USQ>COMPRS16.ARC unix archive sites

    The proper unpacking program should be available on the system
    from which you obtained the packed file.  Consult the "read me"
    file for that particular archive site for information.

1.4)  The unpacking program said that the archive was corrupted.

    The two most common reasons for this are

    (1) failing to use the magic word "tenex" (when connected to
        SIMTEL20 and other TOPS20 systems) or "binary" (when
        connected to UNIX systems) when transferring the file
        from an ftp site to your host machine.  The reasons for 
        this are technical and boring.  A synonym for "tenex" is 
        "type L 8", in case your ftp doesn't know what "tenex" means.

    (2) failing to use an eight-bit binary transfer protocol when 
        transferring the file from the host to your PC.  Make sure 
        to set the transfer type to "binary" on both your host 
        machine and your PC.

        Here is a way to check if you are doing binary transfers correctly.
        Compile the following one-line C program: main(){puts("\250\n\250");}
        Run it by typing "a.out >binary.fil".  Transfer the file
        "binary.fil" to your IBM PC, and TYPE it to the screen from the
        DOS prompt.  If you are doing things correctly, you should see
        the following:
                ?
                 ?
        except that the question marks will be upside-down.


1.5)  What public archives exist, and what are their IP numbers?

    The most famous such is WSMR-SIMTEL20 [26.2.0.74], the White
    Sands Missile Range in New Mexico USA.
    This is a very busy site, so try connecting at really obscure
    times of day.  (SIMTEL20 is in the Mountain time zone, -7 hours
    relative to GMT.)

    In the PD1:<MSDOS.FILEDOCS> directory, the file AAAREAD.ME
    has details on file directories and descriptions, and SIMIBM.ARC
    is an index of the MSDOS archives.

    Other popular archives include

        Site                    Intro File      Direct questions to
        ===================     ==========      ===================
        wuarchive.wustl.edu     README          archives@wugate.wustl.edu
        128.252.135.4 (Washington University, St. Louis, MO USA)
                A duplicate of the SIMTEL20 archives is kept in
                /mirrors/msdos.

        grape.ecs.clarkson.edu  00readme        root@grape.ecs.clarkson.edu
        128.153.13.196 (Clarkson University, Potsdam, NY USA)

        chyde.uwasa.fi          00readme        Timo Salmi (ts@chyde.uwasa.fi)
        128.214.12.3 (University of Vaasa, Finland)

    My email server has the index files for SIMTEL20, grape, and chyde.

    A much larger list of ftp sites is posted to comp.archives
    sporadically.  You can also send the message "send help" to
    comp-archives-server@twwells.com (or to comparc@twwells.com
    if your mailer doesn't like long userids) to obtain information
    on how to obtain information about archive sites.  (You might
    also look at the file "ftp.list" on my mail server.)

1.6)  I do not have ftp access.  Can somebody email me the files?

    To obtain a file from SIMTEL20 via email, send mail to an email
    server (e.g., listserv@vm1.nodak.edu or listserv@vm.ecs.rpi.edu) with
    no subject and containing the single line

        /PDGET MAIL PD1:<MSDOS.GRAPHICS>VGAIMG12.ARC UUENCODE

    for example.  Do not include a signature because it confuses
    the server.  No more than 100k or 3 files per day will be sent.
    For general instructions, send the message "GET PDGET HELP".

    BITNET users can also use send LISTSERV commands to LISTSERV@NDSUVM1
    or LISTSERV@RPIECS to accomplish the same thing.

    European users can use EARN TRICKLE servers.  Send commands to
    TRICKLE@site, where "site" is one of the following: 
        AWIWUW11 (Austria)      DB0FUB11 (Germany)      EB0UB011 (Spain) 
        BANUFS11 (Belgium)      DTUZDV1  (Germany)      TAUNIVM  (Israel)
        DKTC11   (Denmark)      IMIPOLI  (Italy)        TREARN   (Turkey)
        
    BITNET users can send email to BITFTP@PUCC to perform ftp.
    To receive instructions, send email consisting of the single
    word HELP to BITFTP@PUCC.  Using this service to ftp to SIMTEL20
    is discouraged, however.

    If you don't even have email, most MSDOS SIMTEL20 files are available
    for downloading on the Detroit Download Central network at 313-885-3956.
    It is not a free system but the hourly cost is only 17 cents.
    It's also accessible on Telenet via PC Pursuit and on Tymnet via
    StarLink outdial.  



CHAPTER 2:  PROGRAMMING

2.1)  How do I program the mouse/joystick?  What does interrupt X do?
      How do I program my EGA/VGA/whatever graphics card?

    A comprehensive listing of functions available via interrupt
    calls may be FTP'd from CS.CMU.EDU [128.2.222.173] as file
    interrup.zip in directory /afs/cs/user/ralf/pub or from
    SIMTEL20 as PD1:<MSDOS.INFO>INTER290.ZIP (as of 1 MAy 1990).
    This listing is updated four or five times per year.

    A list of books on programming the IBM PC can be found in the file
    "books" on my mail server.

2.2)  How do I do direct video access from C?  Read/write an arbitrary byte?

    The hard-core (hard-code) method is to say

        #define screen ((char far*)0xB8000000)      /* B800:0000 */

    and treat "screen" as if it were an array.  A more flexible
    approach is to say

        char far *screen = (char far*)0xB8000000;

    so your program can assign a value to "screen" depending on
    whether the program is being run with a color or monochrome card.
    (Use 0xB0000000 for monochrome cards.)  See also the file
    "flickerfree" on my mail server for tips on doing flicker-free
    video access.

    To read and write arbitrary bytes, you can use essentially
    the same method, substituting whatever address you want in
    place of 0xB8000000.  For those fainter of heart, you can use
    the peek() and poke() macros in <dos.h>.  A similar trick can
    be used for accessing/setting the segment or offset portion
    of a far pointer.

2.3)  How do I reboot my computer via software?

    Although some people will suggest using interrupt 19h, that method has
    its problems since it doesn't reset lots of things (e.g., the
    interrupt vectors).  A more effective method is to store the magic
    number 0x1234 into 0x40:0x0072 and then perform a long jump to
    0xffff:0x0000.  The magic number suppresses the memory test.

2.4)  What is the difference between extended/expanded memory, and
      how can I access it from my C/Pascal program?

    Expanded memory is a way of allowing a large quantity of memory all to
    share the same memory address.  The only way to access it is via
    EMS function calls.  (See the interrupt list.)

    Extended memory is memory that lives above the 1Meg boundary.
    You can access it via XMS function calls (see the interrupt list),
    or you can switch into protected mode by yourself and access it
    directly (risky, since you have to make sure you don't conflict
    with any other program that uses extended memory).  Much safer
    is to use a DOS "extender" program that does this dirty work
    for you.

    A useful mnemonic is that exPanded memory uses Paging.

    Allegedly, Zortech C has compiler support for expanded memory, and the
    shareware CXL library (In PD1:<MSDOS.C> on SIMTEL20) provide EMS
    handling for MSC and other compilers.

    More details can be found in the file "memory" on my email server.
    Books which describe the use of expanded and extended memory are listed
    in the file "books" on my email server.

2.5)  I get the message "floating point formats not linked" when I
      try to run my C program.  Why?

    This is a painfully well-known bug in Turbo C.  Just #include <math.h>
    and stick the line "(void)exp(1.0);" at the start of your main() and
    that should convince the linker to include the floating point formats.
    A patch exists to remedy this bug.

    Patches for Turbo C can be obtained from SIMTEL20, or from LIB 5 of
    the Borland Forum on CompuServe.  There is also a Turbo-C mailing list
    on LISTSERV@UCF1VM.BITNET.


CHAPTER 3:  SOFTWARE AND VENDORS

3.1)  Has anyone had any experience with {company X, product Y}?

    Here's a checklist:

        [ ] Consult the files "products" and "old.questions" on my mail 
            server to see if somebody else has asked the same question and 
            to see who responded.  Send them email asking them for their 
            opinions.

        [ ] Write a letter to the Better Business Bureau.

        [ ] If you're still not satisfied, then post a request.  But it
            is now your duty to collect the replies and edit them into a 
            GOOD summary.  Concatenating all your responses does not 
            qualify as a good summary.  Depending on the level of 
            interest you receive, you may wish to post your summary.  
            In any case, it is now your duty to keep the summary and 
            offer it (via email) to anyone who asks the same question later.

    If someone else posts a request for comments and you are also
    interested, do *NOT* post an article saying "Me, too!"  For one thing,
    people will probably ignore you.  Instead, send email to the original
    poster requesting that he send you a copy of his summary.

3.2)  I'm having trouble with product X.  Can anyone help me?

    Contact the customer support department of the company who
    produced the product.  Many companies will have a toll-free
    number for that purpose.  Use it.  After all, you paid for it.

3.3)  What is the file format that application X uses?  What are the GIF,
      TIFF, BGI, OBJ, EXE file formats?  How can I write my own BGI driver?
      Does anybody have a BGI driver for X?

    There are at least two books that cover this information:

        File Formats for Popular PC Software      - ISBN 0 471-83671-0   $25
        More File Formats for Popular PC Software - ISBN 0 471-85077-2   $25

    both by Jeff Walden from Wiley Books.  Between the two, they cover
    Lotus 1-2-3, MultiMate, Symphony, dBASE II & III, IBM Plans+,
    Supercalc 3, Multiplan, DIF, ABILITY, Volkswriter, Supercalc 4,
    Microsoft Rich Text Format, Framework, Reflex, WordPerfect, and
    Superproject.

    If you still can't find what you want, you can always contact the
    company that produced the application.  

    GIF, TIFF and BGI file formats are available on SIMTEL20, and the 
    formats for .OBJ and .EXE files can be found in the MS-DOS Encyclopedia.
    On SIMTEL20 is also the Borland BGI toolkit, which can also be obtained
    directly from Borland.  Send the message

        old /BGI/

    to my email server for information about obtaining BGI files.

3.4)  Rumor has it that company X is working on a new version of product Y.
      Does anybody have any information about it?

    If it hasn't been announced, then the people who could possibly answer
    your question are not allowed to tell you.

3.5)  I don't like my keyboard's layout.  How can I swap the X and Y keys?

    Look in SIMTEL20's PD1:<MSDOS.KEYBOARD> directory.  You'll find
    a whole slew of programs that let you swap keys around.


CHAPTER 4:  HARDWARE

4.1)  What are the differences between chip X and chip Y?

    These are thumbnail sketches.  In general, as the chip number
    goes up, the speed goes up, so such comments will be omitted.
    This list is far from comprehensive.

    8086:       The original.  16-bit bus, addresses 1Meg.
    8088:       An 8086 with only an 8-bit bus.
    80186:      An 8086 with a few more instructions.
    80286:      An 80186 with protected mode.  Can access 16Meg of memory
                in protected mode.  Segments still limited to 64K.
                In real mode, it looks like an 80186.
    80386:      A slightly buggy version of the...
    80386DX:    An honest 32-bit CPU.  An 80286 with better protected
                mode and a "Virtual 8086" mode.  Can access 4Gig of memory.
                No 64K segment limitation.  In real mode, it looks 
                pretty much like an 80186.
    80386SX:    Identical to the 80386, except it has only a 16-bit bus.
    80486:      An 80386 with a built-in floating point unit.
                Officially called the i486.

    The 80x87 family are floating point units (FPUs) for the 80x86 family.

    8087:       FPU for 8086 8088 80186
    80287:      FPU for 80286.  Early 80386s can use it, too.
    80387:      FPU for 80386.  Faster than the 80287.  Better trig.
    80387SX:    FPU for 80386SX.  Otherwise the same as an 80387.

    The NEC Vxx series are CMOS replacements for parts of the 80x86 family.

    V30:        8086 replacement, has performance and instructions of
                80186, plus a few more instructions, and an 8080
                emulation mode.  Expect speedups of roughly 15%--30%.
    V20:        An 8-bit version of the V30.  5%--10% faster than the 8088.

    Also, note that many benchmarks exaggerate the relative performance
    of the chips since they tend to emphasize intructions which have
    been significantly sped up in the newer chips.

4.2)  Can I move floppies around freely between 1.2M and 360K drives?
      How about formatting a 360K floppy as 1.2M?  720K as 1.44M?

    After formatting a 360K disk in a 360K drive, that disk should be
    written to ONLY by another 360K drive, although both 360K and 1.2M
    drives can read it.

    Before formatting a 360K disk in a 1.2M drive, first BULK ERASE the
    diskette, then format it and write to it using ONLY a 1.2M drive.
    This floppy can be read reliably on a 360K drive.  This disk should
    be considered READ-ONLY in a 360K drive.

    As for formatting floppy disks at densities they weren't designed
    for:  You might be able to get away with it.  But it's not
    guaranteed to work.  Proceed at your own risk.

4.3)  How do I do a low-level reformat of my hard drive?  

    Depends.  Some diagnostics disks have this ability.  Compaq Advanced
    Diags does, Dell Systems Support disk does.  Many controllers can do
    it using DEBUG.  Wester Digital controllers use G=C800:5, or sometimes
    G=CA00:5 or G=CC00:5.  PS/2 hard drives can be formatted by booting
    the Reference disk and typing Ctrl-A to call up a hidden menu.

4.4)  What does interleave mean?  What interleave should I use?

    If a disk has n:1 interleaving, that means that if you have just read
    a sector, then the next higher-numbered sector is n sectors away.  For
    example, if a track has 11 sectors, then 2:1 interleaving would put
    the sectors on a track in the following order 1 7 2 8 3 9 4 10 5 11 6.

    The following numbers are rough guides; your actual mileage may vary.
    XTs may need 5:1 or higher; ATs typically 3:1; fast ATs and 386s 2:1.
    Double buffered controllers allow 1:1 for any processor.

    Smaller interleaves are faster, but if you pick an interleave smaller
    than your computer can handle, your disk will run pathetically slow.
    So if you're going to be wrong, err on the high side.  There are
    programs on SIMTEL20 that claim to test your interleave factor.  The
    commercial program SPINRITE claims to calculate the proper interleave
    factor and reformat your drive in place (= doesn't destroy the data).

4.5)  What do ESDI, SCSI, RLL, MFM mean?

    ESDI = Enhanced Small Device Interface.
    SCSI = Small Computer Systems Interface.

    These are two interface standards which describe how the drive
    and the controller communicate.

    RLL = Run Length Limited.
    MFM = Modified Frequency Modulation.

    These are two recording methods which describe how the information
    is physically stored on the disk.

4.6)  Can I use an RLL controller on my MFM drive?

    As is often the case, the answer is "maybe".  The likelihood that it
    will work is good, but there are some older Seagate ST251s that just
    won't.  Proceed at your own risk.

4.7)  Should I leave my PC turned on all the time?  What about
      mounting it sideways?

    A record of these debates the last time they went around can be 
    obtained from my email server.  Request the file "24hrs".

CHAPTER 5:  MISCELLANEOUS

5.1)  How do I undelete a file?  Recover from an accidental reformat?

    The more famous utilities for undeleting files are Paul Mace's
    Utilities, Peter Norton's Utilities, and PC-Tools.  They also provide
    some way of recovering from reformatting your hard disk, although you
    have to have run some special program beforehand.  (That is, you have
    to know in advance that you might accidentally reformat your hard disk
    in the future.)

5.2)  Where can I get curses? vi? emacs?  How do I remove a TSR from memory?
      How do I write my own TSR?  Is there a program that does X?

    These programs and others are available from SIMTEL20:

PD1:<MSDOS.SCREEN>PCCURS14.ARC    Unix-compatible version of Curses screen mgmt
PD1:<MSDOS.EDITOR>STEVIE.ARC      Clone of Unix 'vi' text editor
PD1:<MSDOS.EDITOR>VI-19A.ARC      Unix-like vi screen text editor for IBM PC
PD1:<MSDOS.SYSUTL>TSRCOM29.ARC    TSR memory management utils (MARK/RELEASE)
PD1:<MSDOS.TURBO-C>RESLB201.ARC   Function library for Turbo-C to make TSRs

    Books on TSR programming are listed in the file "books" on my email server.

    A more complete vi comes as part of the MKS Toolkit, available
    from Mortice Kern Systems.  Send email to inquiry@mks.com.
    (This is a commercial product.)

    There are several different emacs implementations for the PC.  You can
    get public versions like MicroEmacs and Freemacs or commercial
    programs like Epsilon or Unipress Emacs.  The similarity to GNU Emacs
    varies.

    In general, if you are looking for a program, look first in the file
    PD1:<MSDOS.FILEDOCS>SIMIBM.ARC.  This is a directory of all the files
    in SIMTEL20's MS-DOS archives.
    You can also send requests to my email server to search through the
    index for a word or phrase.


5.3)  What about GIF images?  How do I view a GIF image?

    GIF images are kept on wuarchive.wustl.edu (/graphics/gif),
    funic.funet.fi (/disk1/pub/misc/gif) and elsewhere.  GIF viewers can
    be found at those sites, as well as on SIMTEL20 (PD1:<MSDOS.GIF>).
    See the file "gif.sites" available from my mail server for a larger list.

5.4)  How do I turn the ECHO off from a batch file?

    In DOS 3.3 and higher, you can put the line "@echo off" at the
    start of your batch file.  For other DOS versions, you'll have
    to apply a patch.  The file PD1:<MSDOS.BATUTL>ECHOOFF.PAT contains
    a list of the patches to apply depending on which version of DOS
    you are using.

5.5)  How can I set a long path?  How can I enlarge my environment?
      How do I get/set an environment variable from a C/pascal program?

    There are a few ways of setting a long path.  One solution is to set
    things up so you don't need a long path in the first place.  For
    example, create a \bat directory with lots of batch files which save
    the current path, set the path to something else, run a program, then
    reset the path to what it originally was.  Or, use the SUBST program
    to make drive-letter aliases for long pathnames.  If you really want a
    big path, fetch the program BIGPATH.ARC or SETPTH13.ARC from SIMTEL20.

    The size of the environment is controlled by the "/E" option to
    COMMAND.COM.  Add the line "SHELL=COMMAND.COM /P /E:xxx" to your
    CONFIG.SYS, where xxx is the desired environment size (in either
    bytes or paragraphs, depending on your DOS version).

    Reading environment variables is easy.  Look for a function called
    getenv().  Setting environment variables is trickier.  If you only
    want the variable to be seen in spawned processes, use putenv().
    Otherwise, you're going to have to dig into the depths of undocumented
    features.  It's definitely not easy.  Look at the program
    PD1:<MSDOS.SYSUTL>SETENVJW.ARC for an example.  (There are other 
    programs on SIMTEL20 that claim to do roughly the same thing as this.)

5.6)  How do I install a new version of DOS on my hard drive?

    In principle, you should be able to boot off a floppy containing the
    new version and type "SYS C:".  Then copy COMMAND.COM and all the
    other DOS programs (like CHKDSK.COM) to your hard disk.
    Unfortunately, this doesn't always work.

    Although you could poke around and try to install the new
    version manually, it's too complicated to go into.  Most people
    recommend a procedure similar to the following:

    [0] Uninstall any copy-protected software that's on your hard drive.
    [1] Back up your hard drive (twice, to be extra sure), making sure to
        use a file-by-file backup and not an image backup.  Verify your
        backup.
    [2] Optionally, perform a low-level reformat of the hard disk.
    [3] Boot off a floppy containing the new version and install DOS just
        like it was a brand new machine.
    [4] Restore all the files from your backup and verify the restoration.
    [5] If you have a nonstandard SHELL= line in your CONFIG.SYS, make sure
        it's set up properly for the new DOS version.  (For example, different
        versions interpret the /E option differently.)


APPENDIX A: ANSWERS TO MORE QUESTIONS and AVAILABILITY OF THIS FILE

    I operate a mail server which not only dispenses files such as this
    one, but also looks up programs in the SIMTEL20 index, the grape
    index, and the chyde index.  (So you have no excuse for not looking
    in these indexes before posting a request.)  If you send email to
    raymond@math.berkeley.edu with no subject and containing
    the single line "help", you will receive instructions; sending the
    message "directory" gives you an index of all the files
    available on the server.

    One file in particular you might be interested in is "faq.more"
    which contains answers to MORE questions, but which weren't included
    here for reasons of space.  Send the message "send faq.more" to
    obtain it.  Its table of contents follows:

1)  I found a bug in program X!
2)  Why do I get disk full errors when I only have a bunch of tiny files
    in my root directory?
3)  I found that program X contains the string "Copyright Microsoft", so
    it must be a pirated copy of a commercial program, right?
4)  Can you summarize the history of the 80x86 family of processors?
5)  How about other chips that didn't make on the main faq list?
6)  Why do people say that the 80286 is "brain-dead"?
7)  How do I determine whether I am running on a monochrome or color
    machine?
8)  I have written a program that uses the mouse, and when I use
    CGA/EGA/VGA it is fine, but the mouse does not appear on
    a Hercules card. Why?
9)  Why does DOS use the \ instead of a / as a directory name separator?
    How can I tell DOS that I want to use slashes instead?
10) What is the SysReq key for?
11) How do I switch my screen into 43 line mode?  How can I detect the 
    number of lines from a program?
12) How do I echo a blank line from a batch file?
13) Why does my PC lose a day if I leave it unattended for more than 24 hours?
14) How can I toggle NumLock/CapsLock/ScrollLock from a batch file or program?
15) I just installed a high density (1.2M) floppy drive, and weird things
    are happening.  How do I fix it?
16) What is 4DOS?  Where can I get it?  How can I disable the annoying beeps
    that it makes when I run it?