INSTALLATION INSTRUCTIONS FOR THE PC 80386 VERSION OF CAML LIGHT REQUIREMENTS. A PC equipped with a 80386 or 80486 processor, running MS-DOS version 3.3 or later. 2M of RAM. About 1M of free space on the disk. The graphics primitives require a VGA or SuperVGA video card. INSTALLATION. In the following, we assume that the directory where you have unzipped the Caml Light 386 PC distribution is C:\CAML386. If this is not the case, replace C:\CAML386 by the appropriate absolute path name in the following. The directory C:\CAML386 should contain the following files: directory BIN directory LIB directory EXAMPLE directory DEV directory INFO file README.TXT file INSTALL.TXT file COPYRIGHT.TXT If it contains much more files, you have probably forgotten the "-d" option to "pkunzip". Please erase all files in the directory C:\CAML386 and unzip again the distribution file, with the -d option to "pkunzip", as follows: cd C:\CAML386 pkunzip -d A:CL5PC386 Once the contents of the directory C:\CAML386 are correct, select or create a directory where Caml Light will put its temporary files. Many machines already have a C:\TMP directory for that purpose. If it does not exist, create it. For the remainder of the configuration process, you will have to determine two things: 1- Does your machine contain floating-point hardware? That is, either a 387 coprocessor, or a 486DX processor, or a 487SX (co-)processor. If you don't know, assume that the machine does not contain floating-point hardware. 2- What kind of SuperVGA card do you have? Caml Light has graphics primitives that work on any VGA card in 320x200 pixels, 256 colors, but it can take advantage of the extra possibilities of various SuperVGA cards to work at higher resolution. To do so, you must determine which chipset is used in your SuperVGA card. Re-read the documentation for the card, then look at the files with extension .GRD (the graphics drivers) in directory C:\CAML386\DEV, and find one whose name seems to match the name of the chipset. If you can't determine which graphics driver to use, don't worry: you'll stick with the default VGA graphics, that's all. Once you have answers to questions 1- and 2-, edit the C:AUTOEXEC.BAT file to: 1- Add C:\CAML386\BIN to the PATH variable; that is, transform the line that reads SET PATH=C:\DOS;... into SET PATH=C:\DOS;...;C:\CAML386\BIN 2- Insert the following lines SET CAMLLIB=C:\caml386\lib SET GO32TMP=C:\tmp 3a- If your machine has floating-point hardware, insert the following line: SET GO32=driver C:\CAML386\DEV\GRAPH.GRD gw 640 gh 480 where GRAPH.GRD stands for the name of the graphics driver for your SuperVGA card, as determined in question 2- above. The "640" and "480" specify the default graphics resolution to use; you can put "800" and "600", or "1024" and "768" instead, depending on your taste and the capabilities of your card. If you were unable to determine the correct graphics driver, do not insert anything, leaving the GO32 variable undefined. 3b- If your machine has no floating-point hardware, insert the following line: SET GO32=emu C:\CAML386\DEV\EMU387 driver C:\CAML386\DEV\GRAPH.GRD gw 640 gh 480 (This is one long line, not two lines.) Here, GRAPH.GRD stands for the name of the graphics driver for your SuperVGA card, as determined above. As explained in 3a-, you can choose another default graphics resolution instead of "640" and "480". If you were unable to determine the correct graphics driver, insert the following line instead: SET GO32=emu C:\CAML386\DEV\EMU387 Then, save the AUTOEXEC.BAT file and restart the machine. To test the installation, execute: camlc -v The "camlc" command should print something like: The Caml Light system, version 0.5 (standard library from C:\CAML386\LIB) The Caml Light runtime system, version 0.5 The Caml Light compiler, version 0.5 The Caml Light linker, version 0.5 Then, execute: caml The "caml" command should print something like: > Caml Light version 0.5 # In response to the "#" prompt, type: quit();; This should get you back to the DOS command interpreter. TROUBLESHOOTING Here are some commonly encountered problems. 1- The "caml" or "camlc" commands print "Cannot find the bytecode file" or "camlrun.exe: No such file", then exit. The installation has been performed incorrectly. Double-check the AUTOEXEC.BAT file for errors in setting the PATH and CAMLLIB variables. 1- The "caml" or "camlc" commands print "CPU must be a 386 to run this program", then exit. Self-explanatory. You'll have to content yourself with the 8086 PC version. 3- The "caml" or "camlc" commands print "CPU must be in REAL mode (not V86 mode) to run this program" Ah. That's a tricky one. A number of utility programs switch the 80386 processor in a particular mode, called "Virtual 86" or "V86" mode, that prevents 32-bit protected-mode applications like the 80386 PC version of Caml Light from starting. Such programs include: environments such as Windows 3 device drivers that provide memory management services device drivers that provide enhanced debugging possibilities, such as TDH386.SYS from Turbo Debugger. The 80386 PC version cannot start when any of these programs is active. Don't start Windows, and remove the guilty device drivers from your CONFIG.SYS file. On the other hand, the 80386 PC version knows how to cohabit with VCPI-compliant environments and memory managers. These include the QEMM386 and 386MAX memory managers, and the Desqview environment. Also, EMM386.EXE from the MS-DOS 5.0 distribution works fine, provided you do not give it the NOEMS option. If you run the 80386 PC under a VCPI-compliant memory manager, configure the memory manager so that it allocates at least 1M of EMS, and preferably 2M. 4- Caml Light runs slowly and does a lot of disk accesses. When Caml Light cannot allocate the RAM it requires, it starts paging to a disk file, which considerably slows down execution. To avoid this, make sure that at least 1M or memory is available to Caml Light, and preferably 2M. Caml Light uses XMS memory if you are not running under a VCPI-compliant memory manager, and EMS memory if you are running under a VCPI-compliant memory manager. In the latter case, make sure to configure the memory manager so that it allocates enough EMS. For more details about memory management, see the file README.DJ in the INFO directory.