MSX2 TECHNICAL HANDBOOK ----------------------- Edited by: ASCII Systems Division Published by: ASCII Coprporation - JAPAN First edition: March 1987 Text files typed by: Nestor Soriano (Konami Man) - SPAIN March 1997 Changes from the original: - Remarks (1) and (2) about the FCB format in version 2 of MSX-DOS have been added. - Description of function call 06H is modified. The name of this function in the original text is "String output", and the setup description is "E register <-- starting address of string to send to the console. When 0FF is specified, the character will be sent to the console as character code." - In description of function calls 13H (Deleting files) and 23H (File size acquisition), the original text has "DE register <-- starting address of opened FCB" in setup field. Instead of this, the correct setup explanation is set. - In description of function 26H (Random writing to the disk 2), the correct term "FCB" is set instead of "DMA" in DE register setup explanation. - In description of function 27H (Random readout 2), the phrase "When this number is almost one, the data which has been read is set in the area indicated by DMA" has been added. -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- CHAPTER 3 - MSX-DOS Large capacity storage devices with high-speed access are necessary for business applications. That is why a disk operating system was added to the MSX machine. The DOS (disk operating system) is also required to handle the large amount of data on the disk effectively. MSX-DOS is derived from MS-DOS which is used widely on 16-bit machines. Thus, it represents the most powerful DOS environment for Z-80 based machines. Chapter 3 describes the basic operations of MSX-DOS and the use of the system calls. 1. OVERVIEW What kind of software is MSX-DOS? What does it offer to users? The following sections describe and introduce the features, functions, and software configurations of MSX-DOS. 1.1 Features of MSX-DOS * Consolidation of disk operating environment MSX-DOS is the disk operating system for MSX computers. It works with any version of MSX and can be operated on both the MSX1 and MSX2 without any problem. Disk operation on MSX is always done via MSX-DOS. This is also true concerning MSX DISK-BASIC, which uses BDOS calls for disk input/output. MSX-DOS and DISK-BASIC use the same disk format so that file conversion between BASIC and DOS is not necessary. This greatly increases operating efficiency and allows more effective use of file resources when MSX-DOS is used as the software development environment. * Compatibility with MS-DOS MSX-DOS, created on the basis of MSX-DOS (ver 1.25) which is a disk operating system for 16-bit personal computers, uses the same file format as MS-DOS. It is compatible with MS-DOS at the file level so that MSX-DOS can read and write files written on MS-DOS disks. In turn MS-DOS can read and write files created by MSX-DOS. Both disk operating systems use similar commands, so users who are familiar with MSX-DOS can easily use MS-DOS when upgrading to 16-bit machines. * Using CP/M applications MSX-DOS has system call compatibility with CP/M and can execute most programs created on CP/M without any modification. Most CP/M applications can thus be easily used with MSX-DOS. This opens up a large library of existing software which can be run on the MSX machines. 1.2 MSX-DOS Environment * System requirements To use MSX-DOS, a minimum configuration of 64K bytes RAM, a CRT, one disk drive, and a disk interface ROM is required. If less than 64K bytes RAM is installed, MSX-DOS cannot be used. MSX computers can only use MSX-DOS if they have 64K bytes RAM or more. Since MSX2 computers always have 64K bytes or more of RAM, they can always run MSX-DOS. A limited disk basic is used on those machines with less than 64K bytes RAM. Disk interface ROM is always supplied with the disk drive, and, on MSX machines with an internal disk drive, it resides inside the machine. For those machines using disk cartridges, it is in the cartridge. * System supported MSX-DOS supports up to eight disk drives. On a one-drive system, it has a 2-drive simulation feature (it uses one drive as two drives by replacing diskettes temporarily). It supports keyboard input, screen output, and printer output. * Media supported MSX-DOS, which has a flexible file manager that does not depend on the physical structure of the disk, supports various media and uses 3.5 inch double density disks as standard. Either a one-sided disk called 1DD or two-sided disk called 2DD is used. Each of them uses either an 8-sector track format so four kinds of media can be used. The Microsoft formats for these four types are shown below. Table 3.1 Media supported by MSX-DOS ---------------------------------------------------------------------- | | 1DD, 9 | 2DD, 9 | 1DD, 8 | 2DD, 8 | | | sectors | sectors | sectors | sectors | |----------------------------+---------+---------+---------+---------| | media ID | 0F8H | 0F9H | 0FAH | 0FBH | | number of sides | 1 | 2 | 1 | 2 | | tracks per side | 80 | 80 | 80 | 80 | | sectors per track | 9 | 9 | 8 | 8 | | bytes per sector | 512 | 512 | 512 | 512 | | cluster size (in sectors) | 2 | 2 | 2 | 2 | | FAT size (in sectors) | 2 | 3 | 1 | 2 | | number of FATs | 2 | 2 | 2 | 2 | | number of recordable files | 112 | 112 | 112 | 112 | ---------------------------------------------------------------------- Note: See chapter 3 for the meanings of the above words. 1.3 MSX-DOS System Resources * Memory map MSX-DOS consists of the following modules: COMMAND.COM, MSXDOS.SYS, and a disk interface ROM. It resides in memory as shown in Figure 3.1 when MSX-DOS is active. COMMAND.COM and MSXDOS.SYS are disk files until MSX-DOS is booted and then read into RAM after that. Disk interface ROM includes a disk driver, DOS kernel, and DISK-BASIC interpreter. Figure 3.1 MSX-DOS memory map 0000H ----------------------- | system scratch area | 0100H |---------------------| --- 4000H --------------------- | | ^ | disk driver | | | | | DOS kernel | | | | | DISK BASIC | | | | | interpreter | | | TPA 7FFFH --------------------- | | | | | | disk interface ROM |---------------------| | | COMMAND.COM | V (0006H) |---------------------| --- | MSXDOS.SYS | |---------------------| | work area | FFFFH ----------------------- The area 00H to FFH of RAM is called the system scratch area, which is used by MSX-DOS for exchanging data with other programs. This area is important when using system calls, which are described later. The area which begins at 0100H and ends where the contents of 0006H of RAM indicates is calles the TPA (Transient Program Area). This area is accessible by the user. MSXDOS.SYS always resides at a higher address than TPA (when destroyed, the result is unpredictable), and COMMAND.COM is placed in TPA. * COMMAND.COM The main operation of MSX-DOS is to accept typing commands from the keyboard and execute them. In this case the program COMMAND.COM is responsible for the process from getting a string to interpreting and executing it, or accepting commands from the user interface. Programs executed by COMMAND.COM consists of internal commands, batch commands, and external commands. Internal commands are inside COMMAND.COM and on RAM. Typing an internal acommand causes COMMAND.COM to call and execute it immediately. For the external command, COMMAND.COM loads the routine from disk to TPA and executes it (the execution of external commands always begins at 100H). In this case COMMAND.COM frees its own area for the external command. That is, COMMAND.COM might erase itself and writes the external command onto it, when the external command is small enough and does not use the high-end of TPA, COMMAND.COM would not be destroyed. When the external command ends with "RET", MSXDOS.SYS examines whether COMMAND.COM has been destroyed (by using checksum) and, if so, re-loads COMMAND.COM onto RAM and passes the control to COMMAND.COM. Batch commands are carried out by getting command line input from a batch file instead of from the keyboard. Each step of the batch file can execute any internal command or external command. It is possible that the batch command executes another batch command, but the control will not return to the caller after the called batch command is done. * MSXDOS.SYS MSXDOS.SYS, core of MSX-DOS, controls disk access and communications with peripherals. These MSXDOS.SYS functions are opened as "BDOS (Basic Disk Operating System)" so that the user can use them. Each routine opened is called a "system call", which is useful in developping software for managing the disk (see chapter 4). Each execution is, however, not done by MSXDOS.SYS itself but DOS kernel. MSXDOS.SYS is an intermediation which arranges input/output requests from COMMAND.COM or external commands and passes them to the DOS kernel. MSXDOS.SYS includes a portion called BIOS other than BDOS, as shown in Figure 3.2. BIOS, which has been prepared to be compatible with CP/M, is not normally used. Figure 3.2 MSXDOS.SYS -------------- --+ | BDOS | | |------------| | MSXDOS.SYS | BIOS | | -------------- --+ * DOS kernel The DOS kernel is the fundamental input/output routine which resides in the disk interface ROM and executes BDOS functions of MSXDOS.SYS. Actually, any system call function can be executed using the DOS kernel. DISK-BASIC executes system calls by calling the DOS kernel directly. * Procedure for invoking MSX-DOS MSX-DOS is invoked by the following procedure: 1. Resetting MSX causes all the slots to be examined first, and when two bytes, 41H and 42H, are written in the top of the examined slot, the slot is interpreted as connected to a certain ROM. When connected with ROM, the INIT (initialize) routine whose address is set to the header portion of ROM is carried out. In the case of the INIT routine of the disk interface ROM, the work area for the drive connected to the interface is allocated first. 2. When all slots have been examined, FEDAH (H.STKE) is then referred to. Unless the contents of this address is C9H (unless a certain routine is set to the hook of H.STKE during INIT routine), the environment for DISK-BASIC is prepared and execution jumps to H.STKE. 3. When the contents of H.STKE is C9H in the examination above, the cartridge with TEXT entry is searched in each slot and, if found, the environment for DISK-BASIC is prepared, and then the BASIC program at the cartridge is carried out. 4. Then, the contents of the boot sector (logical sector #0) is transferred to C000H to C0FFH. At this time, when "DRIVE NOT READY" or "READ ERROR" occurs, or when the top of the transferred sector is neither EBH nor E9H, DISK-BASIC is invoked. 5. The routine at C01EH is called with CY flag reset. Normally, since code "RET NC" is written to this address, nothing is carried and the execution returns. Any boot program written here in assembly language is invoked automatically. 6. RAM capacity is examined (contents of RAM will not be destroyed). Less than 64K bytes causes DISK-BASIC to be invoked. 7. The environment for MSX-DOS is prepared and C01EH is called with a CY flag set. MSXDOS.SYS is loaded from 100H, and the execution jumps to 100H. After this, MSX-DOS transfers itself to a high order address. If MSXDOS.SYS does not exist, DISK-BASIC is invoked. 8. MSXDOS.SYS loads COMMAND.COM from 100H and jumps to its start address. COMMAND.COM also transfers itself to a high order address and then begins to execute. If COMMAND.COM does not exist, the message "INSERT A DISKETTE" appears and the execution waits for the correct diskette to be inserted in the drive. 9. At the first boot for MSX-DOS, when a file named "AUTOEXEC.BAT" exists, it is carried out as a batch file. When MSX-DOS is not invoked and DISK-BASIC starts, if a BASIC program named "AUTOEXEC.BAS" exists, it will be carried out. 2. OPERATION This section describes how to type command line input from the keyboard. This is the basis of MSX-DOS operations. Several examples of actual use and their explanations will be given for the commands used in MSX-DOS. 2.1 Basic Operations * Message at startup When MSX-DOS is invoked, the following message appears on the screen: Figure 3.3 Screen at atartup ----------------------------------- | | | MSX-DOS version 1.03 | | Copyright 1984 by Microsoft | | | | COMMAND version 1.11 | | | ----------------------------------- The upper two lines show the version of MSXDOS.SYS and its copyright. The last line shows the version of COMMAND.COM. * Prompt Then, a prompt (input request symbol) appears under the version description. The prompt for MSX-DOS consists of two characters: the default drive name plus ">". * Default drive The term "default drive" as the first character of the prompt is the drive to be accessed automatically when the drive name is omitted. When the default drive is A, for example, referring to a file "BEE" on drive "B" needs to be typed as "B:BEE". A file "ACE" on drive A, however, can be typed simply as "ACE" omitting the drive name. ex.1) A>DIR B:BEE (<-- referring to "BEE" on drive B) ex.2) A>DIR ACE (<-- referring to "ACE" on drive A) * Changing default drive When using systems with more than one drive, typing "B" causes the default drive to be changed to B. When changing the default drive to C to H, "C" or the appropiate letter is needed. Specfification of a drive which does not exist causes an error. ex.1) A>B: B> (<-- Default drive has been changed to B) ex.2) A>K: Invalid Drive Specification A> (<-- Drive K does not exist. Default drive is not changed.) * Command input When a prompt is displayed it indicates that MSX-DOS requests a command to be input. By typing in a command, MSX-DOS can get an instruction. Three forms of commands exist as shown in Table 3.2. The COMMAND.COM program interprets and executes these commands. MSX-DOS operations are repeats of the actions "give a command - make COMMAND.COM execute it". Table 3.2 Three forms of commands ------------------------------------------------------------------------- | (1) Internal | Command inside COMMAND.COM. Assembly routine on RAM. | | command | Thirten commands are prepared as described later. | |--------------+--------------------------------------------------------| | (2) External | Assembly routine on disk. It is loaded from disk at | | command | execution. Its file name has an extension "COM". | |--------------+--------------------------------------------------------| | (3) Batch | Text file containing one or more commands. Commands | | command | are executed orderly (batch operation). File names | | | have the extension "BAT". | ------------------------------------------------------------------------- * File name convention Files handled by MSX-DOS are expressed by a "file spec" which is described below: (1) File spec is expressed in the form ":". (2) is a character from A to H. When specifying the default drive, it can be omitted as well as the colon ":" following it. (3) is expressed in the form of ".". (4) is a string containing one or more (up to 8) characters. When more than 8 characters are sepcified, the ninth and subsequent characters are ignored. (5) is a string containing up to 3 (including zero) characters. When more than 3 characters are specified, 4th and subsequent chartacters are ignored. (6) can be omitted as well a preceding period ".". (7) Characters which are available in and are shown in Table 3.3. (8) Cases are not sensitive. Capital letters and small letters have the same meaning. Table 3.3 Available characters for file name --------------------------------------------------------------------------- | Available | A to Z 0 to 9 $ & # % ( ) - @ ^ { } ' ` ! | | characters | characters corresponding to character codes 80H to FEH | |-------------+-----------------------------------------------------------| | Unavailable | ~ * + , . / : ; = ? [ ] | | characters | characters corresponding to character codes 00H to 20H | | | and 7FH, FFH | --------------------------------------------------------------------------- * Wildcards Using a special character called a "wildcard" in the description of and of the file specification causes files with common characters to be specified. Wildcards are "?" and "*". (1) "?" is a substitution for one character. ex) "TEXT", "TEST", "TENT" <-- "TE?T" "F1-2.COM", "F2-6.COM" <-- "F?-?.COM" (2) "*" is a substitution for a string with any length. ex) "A", "AB", "ABC" <-- "A*" "files with an extension .COM" <-- "*.COM" "all files" <-- "*.*" When comparing existing file names and file names with wildcards, the portion less than 8 characters of and the portion less than 3 characters of are considered to be padded with spaces (" "). Thus, a specification "A???.??" is not expanded to "ABCDE.123" but to "AZ.9", as shown in Figure 3.4. Figure 3.4 Wildcard expansion --------------------------------- ------------- ABCDE.123 --> | A | B | C | D | E | | | | | 1 | 2 | 3 | --------------------------------- ------------- ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ | | | | | | | | | | | O O O O X O O O O O X | | | | | | | | | | | V V V V V V V V V V V --------------------------------- ------------- A???.?? --> | A | ? | ? | ? | | | | | | ? | ? | | --------------------------------- ------------- ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ | | | | | | | | | | | O O O O O O O O O O O | | | | | | | | | | | V V V V V V V V V V V --------------------------------- ------------- AZ.9 --> | A | Z | | | | | | | | 9 | | | --------------------------------- ------------- An asterisk (*) is interpreted as either 8 question marks or 3 question marks (?) depending on if it is in the file name position or file extension position. For example, a file name "A*B" is not interpreted as "any strings which begin with A and end with B". It is interpreted as "any strings which begin with A", as shown below. A*B ("*" is expanded to 8 "?"s) | V A????????B (Characters after 8th are deleted) | V A??????? * Device name MSX-DOS does not need special commands for data input/output with peripherals. This means that it considers each objective device as a certain file (device file) and input/output actions are done by reading or writing to or from this file. This enables MSX-DOS users to treat input/output devices in the same way as files on a disk. Five devices are supported as standard by MSX-DOS as shown in Table 3.4 and are specified with proper names. For this reason, these names can not be used to specify disk files. These device names with drive specifications or extensions are also treated as simple device names. Table 3.4 Device names -------------------------------------------------------------------------- | Device name | Input/output device to be specified | |-------------+----------------------------------------------------------| | | Reserved name for input/output expansion | | AUX | which normally has the same effect as NUL | | | | |-------------+----------------------------------------------------------| | | | | CON | Console (keyboard for input, screen for OUTPUT) | | | | |-------------+----------------------------------------------------------| | | | | LST | Printer (ouput only; cannot be used for input) | | | | |-------------+----------------------------------------------------------| | | | | PRN | Printer (same as LST) | | | | |-------------+----------------------------------------------------------| | | Special device used as a dummy when the result is not | | NUL | desired to be displayed on the screen or put in a file. | | | When used for input, always EOF. | -------------------------------------------------------------------------- * Input functions using a template A "template" is a character buffer area and can be used for command input. The template contains the previous command line most recently entered. It is possible to use the template for easier command entry. By taking advantage of this template feature, it is easy to execute previous commands again or to execute the command partially modified. The keys listed in Table 3.6 are used for the template operation. * Other special keys In addition to the template operation keys, the following control keys are also available. These special key functions also support some other system calls described later. Table 3.5 Special key functions --------------------------------------------------------------- | | Function | |-------+-----------------------------------------------------| | ^C | stops command currently executed | | ^S | pauses screen output until any key is pressed | | ^P | send characters to the printer at the same time | | | they appear on the secreen | | ^N | resets ^P and send characters only to the secreen | | ^J | feeds a line on the screen and continue input | --------------------------------------------------------------- Table 3.6 Template functions ------------------------------------------------------------------------- | Name | Keys used | Functions | |----------+--------------+---------------------------------------------| | COPY1 | RIGHT, ^\ | Gets one character from the template and | | | | displays it in the command line | |----------+--------------+---------------------------------------------| | | | Gets characters before the character to be | | COPYUP | SELECT, ^X | typed next (by keyboard) from the template | | | | and displays them on the command line | |----------+--------------+---------------------------------------------| | | | Gets all characters from the location which | | COPYALL | DOWN, ^_ | the template is currently referring to the | | | | end of the line and displays them on the | | | | command line | |----------+--------------+---------------------------------------------| | SKIP1 | DEL | Skips one character of the template | |----------+--------------+---------------------------------------------| | SKIPUP | CLS, ^L | Skips template characters before the | | | | character to be typed next (by keyboard) | |----------+--------------+---------------------------------------------| | VOID | UP, ESC, ^^, | Discards current line input not changing | | | ^U, ^[ | the template | |----------+--------------+---------------------------------------------| | | | Discards one character input and returns | | BS | LEFT, BS, | the location referred by the template | | | ^H, ^] | by one character | |----------+--------------+---------------------------------------------| | | | Switches insert mode/normal input mode, | | INSERT | INS, ^R | in insert mode, displays keyboard input | | | | on the command line with fixing the | | | | location referred by the template | |----------+--------------+---------------------------------------------| | NEWLINE | HOME, ^K | Transfers the contents of current command | | | | line to the template | |-------------------------+---------------------------------------------| | | Feeds a line on screen but continues | | Return | getting input. Transfers the contents of | | key | current command line to the template | | | and executes it | |-------------------------+---------------------------------------------| | Keys other | Displays a character corresponding to the | | than above | key on the command line and skips one | | | character of the template | ------------------------------------------------------------------------- Table 3.7 Template operation examples --------------------------------------------------------------------------- | | | Contents of template ("-" | | Keyboard input | Command line display | indicates location currently | | | | referred to) | |-------------------+----------------------+------------------------------| | DIR ABCDE | A>DIR ABCDE | --------- | | | | | | RETURN | A> | DIR ABCDE | | | | - | | DOWN | A>DIR ABCDE | DIR ABCDE | | | | - | | LEFT LEFT LEFT | A>DIR AB | DIR ABCDE | | | | - | | INS XYZ | A>DIR ABXYZ | DIR ABCDE | | | | - | | RIGHT RIGHT RIGHT | A>DIR ABXYZCDE | DIR ABCDE | | | | - | | UP | A> | DIR ABCDE | | | | - | | DOWN | A>DIR ABCDE | DIR ABCDE | | | | - | | UP | A> | DIR ABCDE | | | | - | | XXX | A>XXX | DIR ABCDE | | | | - | | DOWN | A>XXX ABCDE | DIR ABCDE | | | | - | | HOME | A>XXX ABCDE | XXX ABCDE | | | | - | --------------------------------------------------------------------------- * Disk errors When an error occurs during disk access, MSX-DOS retries sometimes. Still more errors cause MSX-DOS to display the following message and inquire what to do with them. Press one of the keys A, R, or I. Figure 3.5 Error display ----------------------------------------------------------------------- | | | error drive | | ------------ -------- ------------ | | | | | | | ----------------- ----------- ---------- | | | Write protect | | Reading | | A to H | | | | Not ready | | Writing | ---------- | | | Disk | ----------- | | ----------------- | | | | Abort, Retry, Ignore? | | | |---------------------------------------------------------------------| | | | Abort: stops the disk access and ends the command execution | | Retry: tries again | | Ignore: stops the disk access and continues the command execution | | | ----------------------------------------------------------------------- The following error might occur other than listed above. It indicates that the pointer in FAT is pointing to a cluster which does not exist. When this error occurs, the diskette will be unusable. Bad FAT 2.2 Internal commands Internal commands are assembly language programs grouped together in COMMAND.COM. It is not necessary to read them from the disk so they are executed fast. Following are 13 internal commands. This section describes their use. BASIC ........... jumps to MSX DISK-BASIC COPY ............ copies a file DATE ............ displays or modifies date DEL ............. deletes a files DIR ............. displays a list of files FORMAT .......... formats a disk MODE ............ modifies number of characters to be displayed in one line PAUSE ........... pauses a batch command operation REM ............. puts a comment line in a batch command REN ............. renames a file name TIME ............ displays or modifies time TYPE ............ prints the contents of a file VERIFY .......... turns on/off the verify mode * BASIC form: BASIC [] Starts DISK-BASIC. This is not done by loading BASIC onto RAM but by selecting BASIC-ROM in 0000H to 7FFFH by switching the slot, so it starts immediately. When is specified, the corresponding BASIC program is automatically read and executed. To return to the MSX-DOS environment from BASIC, execute "CALL SYSTEM". * COPY This command copies the contents of one file to another. Specifying parameters enables various options. (1) File duplication form COPY Duplicates the file specified by into a file specified by . Files having the same names cannot be created on the same disk. On different disks, specifying the same names is possible. examples: A>COPY ABC XYZ <-- copies file "ABC" and makes a file "XYZ". A>COPY B:ABC XYZ <-- copies a file "ABC" on drive B and makes a file "XYZ". A>COPY B:ABC C:XYZ <-- copies a file "ABC" on drive B and makes a file "XYZ" on drive C. When copying files, either ASCII or binary mode may be selected. The "/A" swith specifies ASCII mode and the "/B" switch specifies binary mode. If no mode is specified, binary mode is selected by default (except when combining files, described in (4) below, when ASCII is the default mode). Table 3.8 shows the differences between the ASCII and the binary modes. Table 3.8 ASCII mode and binary mode ----------------------------------------------------------------------------- | | Read from source file | Write to destination file | |-----------+-----------------------------------+---------------------------| |ASCII mode | ignore after 1AH (file end mark) | add one byte 1AH to end | |Binary mode| read as long as physical file size| write without modification| ----------------------------------------------------------------------------- examples: A>COPY/A ABC XYZ <-- ABC to XYZ (both files are in ASCII mode) A>COPY ABC/A XYZ/B <-- reads ABC in ASCII mode and writes it to XYZ in binary mode (2) File duplication to another disk drive form COPY [:] Copies a file specified by to under the same file name. When is omitted, it is copied to the default drive. The drive name included in the must not be the same as the . More than one file can be copied by using wildcards in the . In this case, the file name is displayed on the screen each time the file is copied. examples: A>COPY *.COM B: <-- copies any files with extension "COM" on default drive to drive B A>COPY B:ABC <-- copies a file ABC to default drive (3) Simultaneous duplication of many files form COPY ------------- ------------- | | wildcard description wildcard description When , the destination, is described using wildcards, the portions corresponding to wildcards are replaced with corresponding characters in . For example, when COPY AB-07.021 FL?X*.V?? is executed, it is interpreted as shown in figure 3.6 and a file "FL-X7.V21" is created. Figure 3.6 Wildcard specification of destination file --------------------------------- ------------- | F | L | ? | X | ? | ? | ? | ? | | V | ? | ? | --------------------------------- ------------- | | | | V V V V --------------------------------- ------------- Only wildcard portion | F | L | - | X | 7 | | | | | V | 2 | 1 | is replaced with --------------------------------- ------------- ^ ^ ^ ^ ^ ^ ^ | | | | | | | --------------------------------- ------------- | A | B | - | 0 | 7 | | | | | 0 | 2 | 1 | --------------------------------- ------------- Using wildcards in the specification of enables the duplication of many files at the same time. examples: A>COPY *.ASM *.MAC <-- makes files with extension "MAC" from any files with extension "ASM" A>COPY A*.* B:Z*.* <-- Any files beginning with the character A are copied to files beginning with the character Z on drive B (4) File concatenation form COPY -------------------- | wildcard specification, or multiple file spec connected by "+" When one destination file receives more than one source file, the contents of all source files are concatenated and stored to the specified destination file. When specifying more than one source file, wildcards are available, and file specs can also be copied by using the plus sign. When files are concatenated, ASCII mode is selected by default and 1AH is considered the file end mark. Thus, concatenating binary files including data 1AH by the COPY command causes data after 1AH to be discarded. To prevent this, specify /B switch and use COPY command in binary mode. If more than one wildcard appears in the specification of source files, the second wildcard and after are expanded referring to original file names, as in paragraph (3) above. This permits concatenation of similar files at the same time. examples: A>COPY X+Y+Z XYZ <-- concatenates X, Y, AND Z and stores in a file XYZ A>COPY *.LST ALL <-- concatenates any files with extension "LST" and stores in a file ALL A>COPY /B *.DAT ALL <-- concatenates any ".DAT" files in binary mode A>COPY ASC/A+BIN/B AB/B <-- concatenates an ASCII file ASC and a binary file BIN and stores in a file AB A>COPY *.LST+*.REF *.PRN <-- concatenates files named same with extension "LST" and extension "REF" and makes a file with extension "PRN" * DATE form DATE [--] - - | | ------- | "/" and "." are also allowed. Sets the date in the internal CLOCK-IC. For MSX machines without a CLOCK-IC, it is written to the specific work area. Creations or modifications of files on MSX-DOS cause this date information to be recorded for each file. When the DATE command is executed without specifying //, the date currently set is displayed with a request for a new date as shown below. Pressing only the RETURN key here leaves the date unchanged. Current date is -- Enter new date: The format of the date to be set by the DATE command has three fields: , , and . Each field is separated by "-", "/", or ".". Each field can have the following numerical values: : 1980 to 2079 0 to 79 (considered as 2000 to 2079) 80 to 99 (considered as 1980 to 1999) : 1 to 12 : 1 to 31 Foreign versions of MSX-DOS have different date formats: -- or --. * DEL form DEL ERASE is also allowed Deletes the specified file. Wildcards can be used to specify more than one files. Since "DEL *.*" causes all files on the diskette to be deleted, in this case, an acknowledgement is required. A>DEL *.* Are you sure (Y/N)? Pressing "Y" or "y" causes all files to be deleted. "ERASE" may be used the same way as the DEL command. * DIR form DIR [] [/W] [/P] The following information about the specified at is listed from the left side in one line.