Mouse under MS DOS
moumin
-
clyde555 -
clyde555 -
Pour utiliser la souris dans un logiciel sous MS-DOS, vous devez généralement ajouter une ligne dans le fichier `AUTOEXEC.BAT` pour charger le pilote de la souris. Voici les étapes à suivre :
1. **Installez un pilote de souris** : Assurez-vous d'avoir le pilote de souris approprié pour votre matériel. Les pilotes de souris populaires pour MS-DOS incluent des fichiers comme `MOUSE.COM` ou `MOUSE.SYS`.
2. **Modifiez le fichier `AUTOEXEC.BAT`** : Ouvrez le fichier `AUTOEXEC.BAT` avec un éditeur de texte et ajoutez une ligne pour charger le pilote. Par exemple :
```
C:\DOS\MOUSE.COM
```
Assurez-vous que le chemin correspond à l'emplacement du fichier sur votre disque.
3. **Redémarrez MS-DOS** : Sauvegardez les modifications et redémarrez votre système. La souris devrait maintenant fonctionner dans vos applications MS-DOS.
Il n'est généralement pas nécessaire de modifier le fichier `CONFIG.SYS` pour utiliser la souris, à moins que vous ayez besoin de configurations spécifiques pour votre matériel.
1. **Installez un pilote de souris** : Assurez-vous d'avoir le pilote de souris approprié pour votre matériel. Les pilotes de souris populaires pour MS-DOS incluent des fichiers comme `MOUSE.COM` ou `MOUSE.SYS`.
2. **Modifiez le fichier `AUTOEXEC.BAT`** : Ouvrez le fichier `AUTOEXEC.BAT` avec un éditeur de texte et ajoutez une ligne pour charger le pilote. Par exemple :
```
C:\DOS\MOUSE.COM
```
Assurez-vous que le chemin correspond à l'emplacement du fichier sur votre disque.
3. **Redémarrez MS-DOS** : Sauvegardez les modifications et redémarrez votre système. La souris devrait maintenant fonctionner dans vos applications MS-DOS.
Il n'est généralement pas nécessaire de modifier le fichier `CONFIG.SYS` pour utiliser la souris, à moins que vous ayez besoin de configurations spécifiques pour votre matériel.
7 answers
Good evening Moumin, good evening everyone,
... in autoexec.bat !
You need to launch the program (often mouse.com) that loads the TSR but the software that will use it must have been programmed for it!
@12C4
Ipl
... in autoexec.bat !
You need to launch the program (often mouse.com) that loads the TSR but the software that will use it must have been programmed for it!
@12C4
Ipl
The internal commands reside in COMMAND.COM, which is loaded into memory at computer startup; they do not reside on the disk.
External commands are files located on the disk with .com, .exe, or .bat extensions. Both types of commands are executed from the MS-DOS prompt. They are located in the default DOS directory (e.g., C:\DOS).
Command Descriptions
ATTRIB Displays or modifies the attribute of files/directories: Read-only/archive/system or mask (hide)
Parameter:
• +r/-r: adds/removes the read-only attribute
• +a/-a: adds/removes the archive attribute
• +s/-s: adds/removes the system attribute
• +h/-h: adds/removes the hidden attribute
• /s: processes subdirectories
• /d: processes directories
Syntax:
attrib [+r|-r] [+a|-a] [+s|-s] [+h|-h] [drive:][path] filename [/s/d]
Type: External
DELTREE Deletes a directory along with all its subdirectories.
Parameter:
• /p: prompts for confirmation before deletion
Syntax:
deltree [drive:][path] /p
Type: External
FDISK Manages (creates and deletes) partitions on a hard disk.
Parameter
• /status: displays all disk information without launching fdisk.
Syntax:
fdisk /status
Type: External
MORE Reads the content of long files on the screen (page by page)
Parameter
• more < [file]: displays the first page of the file
• [command] [file] | more: same as previous
Syntax:
more < [drive:][path] filename
command | more
Type: External
UNFORMAT Restores a disk (or a partition table) erased by a FORMAT command.
Parameter
• /L: lists the files and subdirectories found by the command
• /test: indicates how unformat reconstructs data (without undoing the formatting)
• /p: sends messages to the printer connected to port LPT1
Syntax:
unformat [drive:]
Type: External
Specification: Cannot be used if the "/u" parameter was used during formatting.
UNDELETE Restores deleted files
Parameter
• /list: displays the list of deleted files that can be restored (but does not restore them). The displayed data depends on the parameter ([drive:][path]file) and the selected switches (/dt, /ds, or /dos).
• /all: Restores deleted files without prompting for confirmation, using the sentinel method /s if available, or the tracker method /t otherwise. If neither method is available, UNDELETE restores these files from the DOS directory, replacing the first missing character of the filename with a hash sign (#). If another file with the same name exists, this parameter attempts to find a unique name using, in order, the following characters: #%&0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ.
• /purge[drive]: Empties the contents of the directory /s. If no drive is specified, the command will search for this directory on the current drive.
• /dos: Recovers only files deleted by DOS, prompting for confirmation for each one. If a deletion tracking file exists, UNDELETE ignores it when this switch is specified.
• /dt: Recovers only files listed as deleted files, prompting for confirmation for each one.
• /ds: Recovers only files listed in the sentinel directory, prompting for confirmation for each one.
• /status: Indicates the current protection against deletion on the disks (Sentinel, Tracker)
• /load: Loads the undelete program into memory using the information defined in the UNDELETE.INI file. If this file does not exist, UNDELETE uses default values. Use this parameter (or the [/S[drive]] parameter) in the [AUTOEXEC.BAT] file to ensure it launches every time the PC starts
• /unload: Removes the undelete program from memory; it then becomes impossible to restore deleted files
• /s: Activates the sentinel method and loads it into memory in the UNDELETE program, which records data allowing recovery of deleted files from the specified drive, by default the current drive. When you specify the /S parameter, UNDELETE is loaded into memory using the information defined in the UNDELETE.INI file. Use this parameter (or the /LOAD parameter) in the [AUTOEXEC.BAT] file to ensure it launches every time the PC starts
• /t[drive][-entries]: Activates the tracker method and loads the UNDELETE program into memory, which records data allowing recovery of deleted files. The drive parameter, which is mandatory, designates the disk drive for which you want to keep track of deletions. The entries parameter, which is optional, specifies the maximum number of entries the deletion tracking file (PCTRACKR.DEL) can contain. Accepted values for this parameter are between 1 and 999, with the default value depending on the type of disk concerned. Below are, for disks of all sizes, the default number of entries and the size of the corresponding file:
Entry File size
360kb 25
720kb 50
1.2mb 7,514
1.44mb 7,514
20mb 10,118
32mb 20,236
>32mb 30,355
Syntax:
• undelete [[drive:][path]file] /DT|/DS|/DOS
• undelete [/LIST|/ALL|/PURGE[drive]|/STATUS|/LOAD|/UNLOAD |/S[drive]|/Tdrive[-entries]]
Type: External
WARNING: Recovering deleted files is not always possible with UNDELETE, especially if you have created or modified other files on the disk since their deletion. In case of unintentional file deletion, stop all operations and immediately run the UNDELETE command to recover it.
CD (CHDIR) Changes directory / calls the specified directory.
Parameter
• ..: goes back one directory (-1 in the directory tree)
• \ (backslash): To go directly to the root directory of the current drive from any subdirectory
Syntax:
CHDIR [drive:][path] or
CD [drive:][path]
Type: Internal
ERASE (DEL) Erase to delete. Deletes specified files in parameters. The DEL command can also be used
Parameter
• /p: Requests confirmation
Syntax:
ERASE [drive:][path]file /P or
DEL [drive:][path]file /P
Type: External
FORMAT Formats the disk of the specified drive so it can be used with an operating system for PC. The FORMAT command creates a new root directory and a file allocation table. It can also check for any bad sectors (corrupt) on the disk and delete all data it contains. For an operating system to use a new disk, it must be formatted using the FORMAT command.
Parameter
• /v:name: Specifies the volume label. This name, which identifies the disk, can be up to 11 characters long. If you forget to specify the /V parameter or the volume name, DOS prompts you to type it once formatting is complete. If you format multiple disks using FORMAT, they are all listed under the same volume name. The /v parameter is not compatible with the /8 switch.
• /q: Specifies a quick format of the disk. With this parameter, FORMAT removes the file allocation table and the root directory of an already formatted disk but does not check for any bad sectors (corrupt). This parameter should only be used for formatting disks that are already formatted and in good condition
• /u: Specifies unconditional formatting of a disk. This procedure deletes all data on the disk and prevents later undoing the formatting (using the [UNFORMAT] command). Use this parameter if read or write errors have occurred during the use of a disk.
• /f:size:
160, 160K 5.25-inch floppy disk, single-sided, double density, 160 KB
180, 180K 5.25-inch floppy disk, single-sided, double density, 180 KB
320, 320K 5.25-inch floppy disk, double-sided, double density, 320 KB
360, 360K 5.25-inch floppy disk, double-sided, double density, 360 KB
720, 720K 3.5-inch floppy disk, double-sided, double density, 720 KB
1200, 1.2 1200K, 1.2M 5.25-inch floppy disk, double-sided, quadruple density, 1.2 MB
1400, 1.44
1440K, 1.44M 3.5-inch floppy disk, double-sided, quadruple density, 1.44 MB (standard drives today)
2800, 2.88
2880K, 2.88m 3.5-inch floppy disk, double-sided, very high density, 2.88 MB
• /b: Releases space for system files (caches) IO.SYS and MSDOS.SYS on a newly formatted disk.
• /s: Copies the system files IO.SYS, MSDOS.SYS, and [COMMAND.COM] from the boot drive (as the [SYS] command would) to a newly formatted disk that can be used as a system disk. If FORMAT does not find the system files, it prompts for a system disk to be inserted.
• /t:tracks: Specifies the number of tracks on the disk. It's better to use the /F parameter than the /T parameter, which must be combined with the /N parameter. Both allow specifying the capacity of the disk to format. The /F and /T parameters cannot be used simultaneously
• /n:sectors: Specifies the number of sectors per track. It's better to use the /F parameter than the /N parameter, which must be combined with /T. Both allow specifying the capacity of the disk to format. You cannot use the /F and /N parameters simultaneously.
• /c: checks for bad clusters
• /1: Formats only one side of the floppy disk.
• /4: Formats a 5.25-inch floppy disk, double-sided, double density, 360 KB in a 1.2 MB drive. Combined with the /1 parameter, the /4 parameter allows formatting 5.25-inch, single-sided, 180 KB disks.
• /8: Formats a 5.25-inch floppy disk by assigning 8 sectors per track, which ensures compatibility with DOS versions earlier than DOS 2.0.
Syntax:
FORMAT drive: [/V[:name]] /Q /U /F:size/B|/S /C
FORMAT drive: [/V[:name]] /Q /U /N:sectors /B|/S /C
FORMAT drive: [/V[:name]] /Q /U /1 /4 /B|/S /C
FORMAT drive: /Q /U /1 /4 /8 /B|/S /C
Type: External
MOVE Transfers and moves one or more files to the specified location. The MOVE command also allows renaming directories.
Parameter
• y/-y: Indicates that the MOVE command should replace existing files without prompting for confirmation. By default, if you specify an existing file as the destination file, the MOVE command asks whether you want to replace the existing file. If the MOVE command.
External commands are files located on the disk with .com, .exe, or .bat extensions. Both types of commands are executed from the MS-DOS prompt. They are located in the default DOS directory (e.g., C:\DOS).
Command Descriptions
ATTRIB Displays or modifies the attribute of files/directories: Read-only/archive/system or mask (hide)
Parameter:
• +r/-r: adds/removes the read-only attribute
• +a/-a: adds/removes the archive attribute
• +s/-s: adds/removes the system attribute
• +h/-h: adds/removes the hidden attribute
• /s: processes subdirectories
• /d: processes directories
Syntax:
attrib [+r|-r] [+a|-a] [+s|-s] [+h|-h] [drive:][path] filename [/s/d]
Type: External
DELTREE Deletes a directory along with all its subdirectories.
Parameter:
• /p: prompts for confirmation before deletion
Syntax:
deltree [drive:][path] /p
Type: External
FDISK Manages (creates and deletes) partitions on a hard disk.
Parameter
• /status: displays all disk information without launching fdisk.
Syntax:
fdisk /status
Type: External
MORE Reads the content of long files on the screen (page by page)
Parameter
• more < [file]: displays the first page of the file
• [command] [file] | more: same as previous
Syntax:
more < [drive:][path] filename
command | more
Type: External
UNFORMAT Restores a disk (or a partition table) erased by a FORMAT command.
Parameter
• /L: lists the files and subdirectories found by the command
• /test: indicates how unformat reconstructs data (without undoing the formatting)
• /p: sends messages to the printer connected to port LPT1
Syntax:
unformat [drive:]
Type: External
Specification: Cannot be used if the "/u" parameter was used during formatting.
UNDELETE Restores deleted files
Parameter
• /list: displays the list of deleted files that can be restored (but does not restore them). The displayed data depends on the parameter ([drive:][path]file) and the selected switches (/dt, /ds, or /dos).
• /all: Restores deleted files without prompting for confirmation, using the sentinel method /s if available, or the tracker method /t otherwise. If neither method is available, UNDELETE restores these files from the DOS directory, replacing the first missing character of the filename with a hash sign (#). If another file with the same name exists, this parameter attempts to find a unique name using, in order, the following characters: #%&0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ.
• /purge[drive]: Empties the contents of the directory /s. If no drive is specified, the command will search for this directory on the current drive.
• /dos: Recovers only files deleted by DOS, prompting for confirmation for each one. If a deletion tracking file exists, UNDELETE ignores it when this switch is specified.
• /dt: Recovers only files listed as deleted files, prompting for confirmation for each one.
• /ds: Recovers only files listed in the sentinel directory, prompting for confirmation for each one.
• /status: Indicates the current protection against deletion on the disks (Sentinel, Tracker)
• /load: Loads the undelete program into memory using the information defined in the UNDELETE.INI file. If this file does not exist, UNDELETE uses default values. Use this parameter (or the [/S[drive]] parameter) in the [AUTOEXEC.BAT] file to ensure it launches every time the PC starts
• /unload: Removes the undelete program from memory; it then becomes impossible to restore deleted files
• /s: Activates the sentinel method and loads it into memory in the UNDELETE program, which records data allowing recovery of deleted files from the specified drive, by default the current drive. When you specify the /S parameter, UNDELETE is loaded into memory using the information defined in the UNDELETE.INI file. Use this parameter (or the /LOAD parameter) in the [AUTOEXEC.BAT] file to ensure it launches every time the PC starts
• /t[drive][-entries]: Activates the tracker method and loads the UNDELETE program into memory, which records data allowing recovery of deleted files. The drive parameter, which is mandatory, designates the disk drive for which you want to keep track of deletions. The entries parameter, which is optional, specifies the maximum number of entries the deletion tracking file (PCTRACKR.DEL) can contain. Accepted values for this parameter are between 1 and 999, with the default value depending on the type of disk concerned. Below are, for disks of all sizes, the default number of entries and the size of the corresponding file:
Entry File size
360kb 25
720kb 50
1.2mb 7,514
1.44mb 7,514
20mb 10,118
32mb 20,236
>32mb 30,355
Syntax:
• undelete [[drive:][path]file] /DT|/DS|/DOS
• undelete [/LIST|/ALL|/PURGE[drive]|/STATUS|/LOAD|/UNLOAD |/S[drive]|/Tdrive[-entries]]
Type: External
WARNING: Recovering deleted files is not always possible with UNDELETE, especially if you have created or modified other files on the disk since their deletion. In case of unintentional file deletion, stop all operations and immediately run the UNDELETE command to recover it.
CD (CHDIR) Changes directory / calls the specified directory.
Parameter
• ..: goes back one directory (-1 in the directory tree)
• \ (backslash): To go directly to the root directory of the current drive from any subdirectory
Syntax:
CHDIR [drive:][path] or
CD [drive:][path]
Type: Internal
ERASE (DEL) Erase to delete. Deletes specified files in parameters. The DEL command can also be used
Parameter
• /p: Requests confirmation
Syntax:
ERASE [drive:][path]file /P or
DEL [drive:][path]file /P
Type: External
FORMAT Formats the disk of the specified drive so it can be used with an operating system for PC. The FORMAT command creates a new root directory and a file allocation table. It can also check for any bad sectors (corrupt) on the disk and delete all data it contains. For an operating system to use a new disk, it must be formatted using the FORMAT command.
Parameter
• /v:name: Specifies the volume label. This name, which identifies the disk, can be up to 11 characters long. If you forget to specify the /V parameter or the volume name, DOS prompts you to type it once formatting is complete. If you format multiple disks using FORMAT, they are all listed under the same volume name. The /v parameter is not compatible with the /8 switch.
• /q: Specifies a quick format of the disk. With this parameter, FORMAT removes the file allocation table and the root directory of an already formatted disk but does not check for any bad sectors (corrupt). This parameter should only be used for formatting disks that are already formatted and in good condition
• /u: Specifies unconditional formatting of a disk. This procedure deletes all data on the disk and prevents later undoing the formatting (using the [UNFORMAT] command). Use this parameter if read or write errors have occurred during the use of a disk.
• /f:size:
160, 160K 5.25-inch floppy disk, single-sided, double density, 160 KB
180, 180K 5.25-inch floppy disk, single-sided, double density, 180 KB
320, 320K 5.25-inch floppy disk, double-sided, double density, 320 KB
360, 360K 5.25-inch floppy disk, double-sided, double density, 360 KB
720, 720K 3.5-inch floppy disk, double-sided, double density, 720 KB
1200, 1.2 1200K, 1.2M 5.25-inch floppy disk, double-sided, quadruple density, 1.2 MB
1400, 1.44
1440K, 1.44M 3.5-inch floppy disk, double-sided, quadruple density, 1.44 MB (standard drives today)
2800, 2.88
2880K, 2.88m 3.5-inch floppy disk, double-sided, very high density, 2.88 MB
• /b: Releases space for system files (caches) IO.SYS and MSDOS.SYS on a newly formatted disk.
• /s: Copies the system files IO.SYS, MSDOS.SYS, and [COMMAND.COM] from the boot drive (as the [SYS] command would) to a newly formatted disk that can be used as a system disk. If FORMAT does not find the system files, it prompts for a system disk to be inserted.
• /t:tracks: Specifies the number of tracks on the disk. It's better to use the /F parameter than the /T parameter, which must be combined with the /N parameter. Both allow specifying the capacity of the disk to format. The /F and /T parameters cannot be used simultaneously
• /n:sectors: Specifies the number of sectors per track. It's better to use the /F parameter than the /N parameter, which must be combined with /T. Both allow specifying the capacity of the disk to format. You cannot use the /F and /N parameters simultaneously.
• /c: checks for bad clusters
• /1: Formats only one side of the floppy disk.
• /4: Formats a 5.25-inch floppy disk, double-sided, double density, 360 KB in a 1.2 MB drive. Combined with the /1 parameter, the /4 parameter allows formatting 5.25-inch, single-sided, 180 KB disks.
• /8: Formats a 5.25-inch floppy disk by assigning 8 sectors per track, which ensures compatibility with DOS versions earlier than DOS 2.0.
Syntax:
FORMAT drive: [/V[:name]] /Q /U /F:size/B|/S /C
FORMAT drive: [/V[:name]] /Q /U /N:sectors /B|/S /C
FORMAT drive: [/V[:name]] /Q /U /1 /4 /B|/S /C
FORMAT drive: /Q /U /1 /4 /8 /B|/S /C
Type: External
MOVE Transfers and moves one or more files to the specified location. The MOVE command also allows renaming directories.
Parameter
• y/-y: Indicates that the MOVE command should replace existing files without prompting for confirmation. By default, if you specify an existing file as the destination file, the MOVE command asks whether you want to replace the existing file. If the MOVE command.
For DOS, there is an excellent little mouse driver that takes up very little memory: ctmouse.
http://cutemouse.sourceforge.net/
http://cutemouse.sourceforge.net/
Simple: edit the autoexec.bat and add at the end, the line in DOS
"path where the file is (e.g. C:\dos\)name of the .exe or .com ( > nul to avoid display during loading) which is here:
c:\dos\mouse > nul
and all DOS programs that support the mouse (2 buttons) will use it.
By the way, Gérard/Ipl, I have a little funny problem with our diskette and my little mouse.com in the special DOS 8 short autoexec: this tiny .com still wants to write a "mouse.ini" on the diskette and since I want it to be write-protected (through the window because of viruses) it's driving me crazy...
I'll try the one indicated by Sebsauvage, thanks to you.
Olivier Fournier
"path where the file is (e.g. C:\dos\)name of the .exe or .com ( > nul to avoid display during loading) which is here:
c:\dos\mouse > nul
and all DOS programs that support the mouse (2 buttons) will use it.
By the way, Gérard/Ipl, I have a little funny problem with our diskette and my little mouse.com in the special DOS 8 short autoexec: this tiny .com still wants to write a "mouse.ini" on the diskette and since I want it to be write-protected (through the window because of viruses) it's driving me crazy...
I'll try the one indicated by Sebsauvage, thanks to you.
Olivier Fournier
Good evening Olivier, SebSauvage, good evening everyone,
Olivier... does mouse.com want to write even though it already has the .ini on the diskette?
Thank you Sébastien!
@12C4
Ipl
Olivier... does mouse.com want to write even though it already has the .ini on the diskette?
Thank you Sébastien!
@12C4
Ipl
How to install CT mouse
1) Download: http://cutemouse.sourceforge.net/program/ctmous19.zip
2) Unzip the file
3) Copy CTMOUSE.EXE to where your autoexec.bat is located
4) Add the following line to your autoexec.bat
LH CTMOUSE.EXE
CTMouse is (to my knowledge) the mouse driver that consumes the least memory, and it is open source!
Under MSDOS, there are also some tips to gain a little conventional memory. Don’t hesitate to ask if you're interested.
1) Download: http://cutemouse.sourceforge.net/program/ctmous19.zip
2) Unzip the file
3) Copy CTMOUSE.EXE to where your autoexec.bat is located
4) Add the following line to your autoexec.bat
LH CTMOUSE.EXE
CTMouse is (to my knowledge) the mouse driver that consumes the least memory, and it is open source!
Under MSDOS, there are also some tips to gain a little conventional memory. Don’t hesitate to ask if you're interested.
Hello everyone,
Ipl, no when it finds a mouse already identified the previous time, but yes when the mouse port is a PS/2 after being used on a COM port or vice versa. Hence my term: emm...! All the more so as I write the batch code on my 486 (mouse on COM) and test it on my 2001 PC (IR 5-button PS/2 mouse, which works perfectly with this mouse.com from 1993).
RAAAHHH, it took me eight days (5 minutes a day) to find this (false) bug!
Olivier Fournier
Ipl, no when it finds a mouse already identified the previous time, but yes when the mouse port is a PS/2 after being used on a COM port or vice versa. Hence my term: emm...! All the more so as I write the batch code on my 486 (mouse on COM) and test it on my 2001 PC (IR 5-button PS/2 mouse, which works perfectly with this mouse.com from 1993).
RAAAHHH, it took me eight days (5 minutes a day) to find this (false) bug!
Olivier Fournier