home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Power-Programmierung
/
CD1.mdf
/
fortran
/
library
/
fatdos
/
fatd2.doc
< prev
next >
Wrap
Text File
|
1988-04-15
|
9KB
|
395 lines
FAT-DOS 1.0 MKDIR PAGE F-1
MKDIR - This function creates a new sub-directory. You pass it an
asciiz string containing the name, and check Ier on return.
integer*2 Ier
character*n DirName
call MkDir(DirName,Ier)
call with:
DirName = Directory name and path, i.e. 'C:\Mysub'//char(0)
Ier = error code
0-normal return
3-path not found
5-access denied
RMDIR - This function deletes a subdirectory. The function will not
work if you try to delete the current subdirectory, or if the sub-
directory still contains files, or any part of the pathname does
not exist.
integer*2 Ier
character*n DirName
call RmDir(DirName,Ier)
call with:
DirName = Subdirectory path and name, i.e. 'D:\Work\Mysub'//char(0)
returns:
Ier = error code
0-normal return
3-path no found
5-access denied
6-current directory
16-current directory
SETDIR - This function makes the specified directory the current
working directory. The directory name is passed as a
null terminated string(asciiz string). Its usually wise
to use GetDir() first, to save the original directory
before changing it, in case you wish to go back to your
original directory.
integer*2 Ier
character*n DirName
call SetDir(DirName,Ier)
call with:
DirName = Directory name to make current, i.e. 'C:\Work'//char(0)
returns:
Ier = error code
0-function worked
3-path not found
FAT-DOS 1.0 GETDIR PAGE F-2
GETDIR - This function returns an ascii string defining the full
path of the current directory on the drive requested. The
DirName string must be 64 bytes long.
integer*2 Drive,Ier
character*64 DirName
call GetDir(Drive,DirName,Ier)
call with:
Drive = Drive number to return current directory on.
0-default, or current disk drive.
1-A,2-B,3-C,4-D,5-E
returns:
DirName = current working directory
Ier = error code
0 - function worked
Non-zero - drive specified is invalid
FAT-DOS 1.0 COMLIN PAGE G-1
COMLIN - Copy the command line tail to a string.
integer*2 String*127
call ComLin(String)
call with:
nothing.
returns:
String = Command line tail is copied to this string. Redirection
data is filtered by DOS. The command should be called
immediateley after program startup. This will insure that
disk writes don't overwrite the command line data.
The String variable is null terminated, when returned.
GETDOS - Get the version of MS-DOS
integer*2 Major,Minor
call GetDOS(Major,Minor)
call with:
nothing.
returns:
Major = Primary version number 1,2,or 3
Minor = Sub version number 0,10,20,21,3
example: Major=3, Minor =21 yields 3.21
BEEP - Beep the speaker.
call Beep()
GETPSP - Get the segment address of the current programs PSP.
This function only works in DOS 3.0 or above. If called
from a lesser version it returns a zero value.
integer*2 Segment
call GetPSP(Segment)
call with:
nothing
returns:
Segment - The segment address of the PSP
FAT-DOS 1.0 SETNUL PAGE G-2
SETNUL - Replaces a '`' with a char(0) in a character string.
This is useful in versions of Fortran that won't allow the
following. String = 'MyString'//char(0).
character*n String
call SetNul(String)
call with:
String = character string with '`', to be replaced by a
char(0) value.
returns:
String = character string with the '`' replaced by a zero value.
example: String = 'MyString`'
call SetNul(String)
FAT-DOS 1.0 GETTIM PAGE H-1
GETTIM - Get the system time, in Hours,Minutes, Seconds and
Hundredths of a second.
integer*2 Hrs,Min,Sec,Hsec
call GetTim(Hrs,Min,Sec,Hsec)
call with:
nothing.
returns:
Hrs = Hours , 0-23
Min = Minutes,0-59
Sec = Seconds, 0-59
Hsec = Hundredths of Seconds,0-99
SETTIM - Set the system time, in Hours,Minutes, Seconds and
Hundredths of a second. To permanently reset the hardware
clock of many systems, you must use the SETUP program supplied
with your computer system.
integer*2 Hrs,Min,Sec,Hsec
call SetTim(Hrs,Min,Sec,Hsec)
call with:
Hrs = Hours , 0-23
Min = Minutes,0-59
Sec = Seconds, 0-59
Hsec = Hundredths of Seconds,0-99
returns:
nothing.
GETDAT - Gets the system date, in year, month and day format.
integer*2 Yr,Mo,Day
call GetDat(Yr,Mo,Day)
call with:
nothing.
returns:
Yr = Year, 1980 - 2099
Mo = Month, 1 - 12
Day = Day, 1 - 31
FAT-DOS 1.0 SETDAT PAGE H-2
SETDAT - Sets the system date, in year, month and day format.
integer*2 Yr,Mo,Day
call SetDat(Yr,Mo,Day)
call with:
Yr = Year, 1980 - 2099
Mo = Month, 1 - 12
Day = Day, 1 - 31
returns:
nothing.
FAT-DOS 1.0 AUXINP PAGE I-1
AUXINP - Read a character from the Aux port. Also know as the
serial port.
integer*2 Key
call AuxInp(Key)
call with:
nothing.
returns:
Key = character from Aux port is returned in the low byte.
AUXOUT - Send a byte to the Aux port. Also known as the serial port.
integer*2 Key
call AuxOut(Key)
call with:
Key = byte value to send to the Aux port.
returns:
nothing.
PRNOUT - Send a byte to the prn(printer) or LPT1.
integer*2 Key
call PrnOut(Key)
call with:
Key = Byte value to send to the printer.
returns:
nothing.
FAT-DOS 1.0 INPB PAGE I-2
INPB - Input a byte from a port.
integer*2 Port,Value
call InpB(Port,Value)
call with:
Port = Port number to receive input from.
returns:
Value = Byte returned at Port.
INPW - Input a word from a port.
integer*2 Port,Value
call InpW(Port,Value)
call with:
Port = Port number to receive input from.
returns:
Value = Word returned at Port.
OutpB - Ouput a byte to a Port.
integer*2 Port,Value
call OutpB(Port,Value)
call with:
Port = Port number to ouput the value to.
Value = Byte value to send to the Port.
returns: nothing
OutpW - Ouput a word to a Port.
integer*2 Port,Value
call OutpW(Port,Value)
call with:
Port = Port number to ouput the value to.
Value = Word value to send to the Port.
returns: nothing.
FAT-DOS 1.0 GETCBF PAGE J-1
GETCBF - Get the status of extended control-break checking. When
Ctrl-Break checking is on, disk I/O may be abruptly
terminated. When extended Ctrl-Break checking is off
disk I/O is unaffected during a write or read, if a
Ctrl-Break is pressed. This is true of both a Ctrl-Break
and a Ctrl-C press.
integer*2 Flag
call GetCBF(Flag)
call with:
nothing.
returns:
Flag = 0 Extended Ctrl-Break checking off.
1 Extended Ctrl-Break checking on.
SETCBF - Set the status of extended control-break checking.
When Ctrl-Break checking is on, disk I/O may be abruptly
terminated. When Ctrl-Break checking is off, disk I/O
is unaffected during a write or read. This is true of
both a Ctrl-Break and a Ctrl-C press.
integer*2 Flag
call GetCBF(Flag)
call with:
Flag = 0 Turn OFF Extended Ctrl-Break checking.
1 Turn ON Extended Ctrl-Break checking.
returns:
nothing.
FAT-DOS 1.0 TRAPCC PAGE J-2
TRAPCC - Trap all Ctrl-C presses to prevent a user from terminating
a program from a Ctrl-C key-press. This subroutine reroutes the
INT1b interupt away from MS-DOS. When the program is ended
MS-DOS takes over the INT1b interupt again.
Whenever a Ctrl-C is pressed Flag is set to -1. If you just
want Ctrl-C disabled, ignore the value of Flag. If you want
to know if Ctrl-C is pressed, examine Flag once in a while.
And remember to reset it to 0, so a Ctrl-C will change it to -1.
integer*2 Flag
common /MyTrap/Flag Flag- must be in common in MS-Fortran.
call TrapCC(Flag)
call with:
Flag = Flag does not need to be set prior to the call, but must
be passed in the call to TrapCC(Flag).
returns:
nothing
TRAPCB - Trap all Ctrl-Brk presses to prevent a user from terminating
a program from a Ctrl-Brk key-press. This subroutine reroutes the
INT23 interupt away from MS-DOS. When the program is ended
MS-DOS takes over the INT23 interupt again.
Whenever a Ctrl-Brk is pressed Flag is set to -1. If you just
want Ctrl-Brk disabled, ignore the value of Flag. If you want
to know if Ctrl-Brk is pressed, examine Flag once in a while.
And remember to reset it to 0, so a Ctrl-Brk will change it to -1.
integer*2 Flag
common /MyTrap/Flag Flag- must be in common in MS-Fortran.
call TrapCB(Flag)
call with:
Flag = Flag does not need to be set prior to the call, but must
be passed in the call to TrapCB(Flag).
returns:
nothing