Article 1179 of comp.lang.perl: | |
Path: | icdoc!ukc!mcsun!sunic!uupsi!rpi!zaphod.mps.ohio-state.edu!math.lsa.umich.edu!emv |
>From: | emv@math.lsa.umich.edu (Edward Vielmetti) |
Newsgroups: | comp.lang.perl |
Subject: | msdos perl just landed on simtel20 |
Message-ID: | <EMV.90May11020419@duby.math.lsa.umich.edu> |
Date: | 11 May 90 06:04:19 GMT |
Sender: | news@math.lsa.umich.edu |
Organization: | University of Michigan Math Dept., Ann Arbor MI. |
Lines: | 136 |
Content-Length: | 5072 |
check out pd1:<msdos.perl>perl3.zip, or ftp.math.lsa.umich.edu:pub/emv/perl3.zip.
(the latter for a limited time only, it'll probably migrate over to terminator.cc.umich.edu
pretty quickly.
here's the readme.
Notes on the binary release of MS-DOS Perl
Perl program designed and created by
Larry Wall <lwall@devvax.jpl.nasa.gov>
DOS port and binary release by
Diomidis Spinellis <dds@cc.ic.ac.uk>
1. Copying
Perl is copyrighted under the GNU General Public
License a copy of which can be found in the file ``Copy-
ing.'' Please read the license before copying or using
Perl. This binary distribution is based on paragraph 3
clause c) of it. You can find the complete source of Perl
available for anonymous ftp and uucp on uunet.uu.net and
other comp.sources.unix archives.
2. Contents
The following files are included in this distribution
Name Length CRC
============ ======== ====
PERL.EXE 267813 5246 Perl executable
GLOB.EXE 6373 2a1c Wildcard expansion
COPYING 12735 6512 GNU General Public License
PERL.MAN 216516 5007 Manual
README fixed point This file
DRIVES.BAT 1153 ab1d Example program
ABBREV.PL 584 4a6b Various library utilities
CTIME.PL 1314 8f48
DUMPVAR.PL 612 de91
GETOPT.PL 1070 9439
GETOPTS.PL 950 66a9
IMPORTEN.PL 358 2e02
LOOK.PL 1062 0a35
PERLDB.PL 11399 bfce
STAT.PL 635 95f6
3. Installation
In order to install Perl you need to copy the Perl exe-
cutable (perl.exe) and the filename wildcard expansion com-
mand (glob.exe) in a directory included in your path. In
order to use the Perl debugger and the other library utili-
ties you need to copy all the .pl files in the directory:
/usr/local/lib/perl. The manual can be printed on 66 line
per page paper on any printer capable of overstriking.
4. Using MS-DOS Perl
The MS-DOS version of perl has most of the functional-
ity of the Unix version. Functions that can not be provided
under MS-DOS like sockets, password and host database
access, fork and wait have been ommited and will terminate
with a fatal error. Care has been taken to implement the
rest. In particular directory access, redirection (includ-
ing pipes, but excluding the pipe function), system, ioctl
and sleep have been provided.
4.1. Interface to the MS-DOS ioctl system call.
The function code of the ioctl function (the second
argument) is encoded as follows:
- The lowest nibble of the function code goes to AL.
- The two middle nibbles go to CL.
- The high nibble goes to CH.
The return code is -1 in the case of an error and if
successful:
- for functions AL = 00, 09, 0a the value of the register DX
- for functions AL = 02 - 08, 0e the value of the register AX
- for functions AL = 01, 0b - 0f the number 0.
See the perl manual for instruction on how to distin-
guish between the return value and the success of ioctl.
Some ioctl functions need a number as the first argu-
ment. Provided that no other files have been opened the
number can be obtained if ioctl is called with
@fdnum[number] as the first argument after executing the
following code:
@fdnum = ("STDIN", "STDOUT", "STDERR");
$maxdrives = 15;
for ($i = 3; $i < $maxdrives; $i++) {
open("FD$i", "nul");
@fdnum[$i - 1] = "FD$i";
}
4.2. Binary file access
Files are opened in text mode by default. This means
that CR LF pairs are translated to LF. If binary access is
needed the `binary' function should be used. There is
currently no way to reverse the effect of the binary func-
tion. If that is needed close and reopen the file.
4.3. Interpreter startup.
The effect of the Unix #!/bin/perl interpreter startup
can be obtained under MS-DOS by giving the script a .bat
extension and using the following lines on its begining:
@REM=("
@perl %0.bat %1 %2 %3 %4 %5 %6 %7 %8 %9
@goto end ") if 0 ;
And the following ones at the end:
@REM=("
:end ") if 0 ;
(Note that you will probably want an absolute path name in
front of %0.bat).
May 1990
Diomidis Spinellis <dds@cc.ic.ac.uk>
Myrsinis 1
GR-145 62 Kifissia
Greece
Newsgroup comp.lang.perl contents
Newsgroup list
Diomidis Spinellis home page
Unless otherwise expressly stated, all original material on this page created by Diomidis Spinellis is licensed under a Creative Commons Attribution-Share Alike 3.0 Greece License.