From: hguijt@nijmegen.inter.nl.net (H.Guijt) Subject: Re: Is there an electronic MSX BASIC manual? Date: 21 Aug 1996 22:22:30 GMT The manual consists of three parts, linked by hyperlinks. This is a text-only version. People interested in the original, which looks a lot better, should download fMSX Amiga. Because this manual was originally written for the Amiga public it contains several Amiga-isms and assumes a couple of things: 1. The reader knows approximately how the Amiga works. 2. The reader vaguely knows how MS-DOS works. 3. The reader is not interested in *every* detail of MSXDOS or BASIC, just enough to load and run programs. I tweaked it just a little bit to make it a bit more general. Feel free to tweak some more. Hans ******************************* PART 1 ******************************* Using MSX diskdrives ==================== The MSX disk system is an extension of the original MS-DOS disk system. Many things you know about MS-DOS apply to MSX as well. This section gives a short overview of features. MSX filenames, like MS-DOS filenames, are very limited: they have a maximum length of eight characters, followed by a three-character extension. In addition, no lower-case characters or spaces are allowed. The number of files on a disk is limited to 112. To make matters worse, subdirectories are not supported by MSX. There are two wildcards: * and ?. These correspond to the Amiga wildcards #? and ?. Examples: *.* Everything *.BAS All files with extension .BAS GAME*.* All files starting with GAME *.B?? All files that have a B as the first part of the extension. The MSX supports up to two diskdrives. These are called A: and B:. There are two ways of dealing with disks on the MSX: by using MSX-DOS and from BASIC. ******************************* PART 2 ******************************* About MSX-DOS ============= MSX-DOS is a control program for the MSX based on the very first version of MS-DOS. It is required if you want to use some MSX programs, and it can be useful if you want to perform certain floppy operations. It is close enough to CP/M that some CP/M programs run on it; many others only require minor modifications to run. MSX programs that require MSX-DOS can easily be recognized by their filename. Programs that end in .BAT are MSX-DOS script files; programs that end in .COM are MSX-DOS executables. Both types can be started by typing the filename (without the extension) after the prompt. Getting started =============== To run MSX-DOS you need three things: an MSX-formatted floppy, and the programs MSXDOS.SYS and COMMAND.COM. Obtaining an MSX-formatted floppy is easy: any 720KB PC floppy will do. Step 1: Find, buy, or format a PC floppy. Assuming you have CrossDos installed this can easily be done from your workbench. Step 2: Open the Preferences window by clicking on the Preferences button, and check that the Drives button is set to 1 or 2. If it isn't, change the setting and reset fMSX by clicking the Reset button in the control window. Step 3: Convert the disk to MSX format by selecting the menu option Write bootblock (for the appropriate device). Step 4: Copy MSXDOS.SYS and COMMAND.COM to this floppy. Step 5: Reset fMSX by clicking the Reset button. Step 6: Wait until MSX-DOS has booted. One of the first things you'll see is the prompt, which looks like this: A> When MSX-DOS boots it looks for a file called AUTOEXEC.BAT. This is a script file that is executed automatically if found. Complete overview of commands ============================= Each command is followed by one or more examples. The lines between square brackets represent BASIC equivalents for the MSX-DOS examples. BASIC ----- Quits MSX-DOS and returns you to the BASIC interpreter. From there you can type CALL SYSTEM or _SYSTEM to go back to MSX-DOS. Note: this doesn't work if you didn't originally boot from an MSX-DOS disk. Examples: A>BASIC (starts BASIC) [CALL SYSTEM] or [_SYSTEM] A>BASIC start.bas (starts BASIC and runs the BASIC program start.bas) [no equivalent] COPY ---- Copies one or more files. Examples: A>COPY A:*.* B: (copies all files from drive A: to drive B:) [COPY "A:*.*" TO "B:"] A>COPY MSX.TXT PRN (copies the file msg.txt to the printer) [COPY "MSX.TXT" TO "PRN"] DATE ---- Shows the date. Optionally you can also change it. Examples: A>DATE (shows the current date) [GETDATE A$ : PRINT A$] (requires MSX2 BASIC) DEL --- Removes a file from disk. Examples: A>DEL *.* (removes all files) [KILL "*.*"] DIR --- Shows the contents of a disk. Examples: A>DIR *.BAS (shows all files with extension .BAS) [FILES "*.BAS"] A>DIR /P (shows all files, pausing after every page of output) [no equivalent] A>DIR /W (shows all files in shortened format) [FILES] ERASE ----- Same as DEL. FORMAT ------ Allows you to format a disk. Not supported by fMSX Amiga, you'll have to format a disk from the workbench instead. Don't forget to write an MSX bootblock to it. MODE ---- Change the width of the screen. Examples: A>MODE 40 (turns on 40-column mode) [WIDTH 40] PAUSE ----- Puts the text Strike any key when ready... on the screen and waits until any key has been struck. It can also print an extra message. Examples: A>PAUSE (waits until a key has been struck) [no equivalent] A>PAUSE Message (prints Message on screen and waits) [no equivalent] REM --- Does nothing at all. If any text follows the REM statement it is printed on screen. Examples: A>REM Message (prints Message) [no equivalent] REN --- Renames one or more files. Examples: A>REN *.LDR *.BAS (changes all .LDR extensions to .BAS extensions) [NAME "*.LDR" AS "*.BAS"] RENAME ------ Same as REN. TIME ---- Shows the time. Optionally you can also change it. Examples: A>TIME (shows the current time) [GETTIME A$ : PRINT A$] (requires MSX2 BASIC) TYPE ---- Prints the contents of a file on the screen. Examples: A>TYPE MSG.TXT (shows the contents of MSG.TXT) [COPY "MSG.TXT" TO "CON"] VERIFY ------ Turns on verification mode. This command is actually ignored by MSX. Examples: A>VERIFY ON (turns verification on) [no equivalent] A>VERIFY OFF (turns verification off) [no equivalent] ******************************* PART 3 ******************************* Using the drives from BASIC =========================== Unlike MSX-DOS, BASIC enforces no filenaming conventions for executables or other kinds of files. However, some guidelines exist: Files ending in .BAS are BASIC files. There are several ways to load them: LOAD "FILENAME.BAS" (loads the file) LOAD "FILENAME.BAS",R (loads the file and executes it) RUN "FILENAME.BAS" (loads the file and executes it) If you want to save a BASIC file you can use this: SAVE "FILENAME.BAS" Files ending in .BIN are executable files. There is only one way to load them: BLOAD "FILENAME.BIN",R (loads the file and executes it) Files ending in .BAT or .COM are files that can only be used from MSX-DOS. If the file you want to load has another kind of extension, try experimenting with it. The MSX will tell you if you did something wrong. There is one file that has special significance to MSX-BASIC. This file is called AUTOEXEC.BAS and is executed automatically during the boot sequence. The section about MSX-DOS contains BASIC equivalents for some MSX-DOS statements.