⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dosmac.doc

📁 还是一个词法分析程序
💻 DOC
📖 第 1 页 / 共 4 页
字号:
Output
    If function successful:
        Carry flag - clear
        DTA is initialized with file information
    If function failed
        Carry flag - set
        ax - error code:
          12h - No matching entry found
Registers modified: ax, Flags
Syntax: FindNext

GetVerifyFlag
-------------
Function: Gets the current value of the system's verify flag.
DOS Function: 54h
DOS Versions: 2, 3
Input
    none
Output
    al  - current value
        0 = verify off
        1 = verify on
Registers modified: ax, flags
Syntax: GetVerifyFlag

RenameFile
----------
Function: Renames a file.
DOS Function: 56h
DOS Versions: 2, 3
Input
    OrigSeg - Segment address of the string containing the original filename
    OrigOfs - Offset of the string
    NewSeg  - Segment address of the new filename
    NewOfs  - Offset of the new filename string
Output
    carry flag = clear - operation successful
    carry flag = set - operation unsuccessful
        ax - error code
            2 = File not found
            3 = File couldn't be found
            5 = Access denied
          11h = A different device
Registers modified: ax, dx, di, ds, es, flags
Syntax: RenameFile  OrigSeg, OrigOfs, NewSeg, NewOfs

GetSetFileDateTime
------------------
Function: Will get or set a file's date and time. Note that you only need to
          provide the Time and Date parameters when setting the file's Date and
          Time.
DOS Function: 57h
DOS Versions: 2, 3
Input
    GetSet - 0 = Get the file's date & time, 1 = Set them
    Handle - File handle
    Time - New time(GetSet = 1)
    Date - New date(GetSet = 1)
Output
    carry flag = clear - operation successful
    carry flag = set - operation unsuccessful
        ax - error code
            1 - Invalid function
            6 - Invalid file handle
Registers modified: ax, bx, cx, dx, flags
Syntax: GetSetFileDateTime  GetSet, Handle, Time, Date

GetSetAllocationStrategy
------------------------
Function: Gets or sets DOS's memory allocation strategy.
DOS Function: 58h
DOS Versions: 3
Input
    GetSet - 0 = get, 1 = set
    Strategy - Code as defined below(GetSet = 1)
    STRATEGY        FUNCTION
    ------------------------------
        0           First fit
        1           Best fit
        2           Last fit
Output
    carry flag = clear - operation successful
    carry flag = set - operation unsuccessful
        ax - error code
            1 = Invalid function
Registers modified: ax, bx, flags
Syntax: GetSetAllocationStrategy

GetExtendedErrors
-----------------
Function: Returns extended error information about a DOS error that just
          occurrred.
DOS Function: 59h
DOS Versions: 3
Input
    none
Output
    ax - extended error code as defined below
    CODE    DESCRIPTION
    ----------------------------------------------------
     1      Invalid function #
     2      File not found
     3      Path not found
     4      Too many open files
     5      Access denied
     6      Invalid handle
     7      Memory control blocks destroyed
     8      Insufficient memory
     9      Memory block address invalid
    0Ah     Environment invalid
    0Bh     Invalid format
    0Ch     Invalid access code
    0Dh     Invalid data
    0Fh     Invalid disk drive
    10h     Attempted to delete the current directory
    11h     Not the same device
    12h     No more files
    13h     Disk is write-protected
    14h     Unit unknown
    15h     Drive not ready
    16h     Unknown command
    17h     Data error(CRC value)
    18h     Bad request structure length
    19h     Seek error
    1Ah     Unknown medium type
    1Bh     Sector not found
    1Ch     Printer out of paper
    1Dh     Write fault
    1Eh     Read fault
    1Fh     General failure
    20h     Sharing violation
    21h     Lock violation
    22h     Disk change invalid
    23h     FCB unavailable
    50h     File already exists
    52h     Cannot create the directory
    53h     Int-24(critical error) failed
    --------------------------------------------------------
bh - error class as defined below
    CLASS   DESCRIPTION
    --------------------------------------------------------
    1       Out of a resource
    2       A temporary situation like a locked record
    3       Authorization error
    4       Internal system error
    5       Hardware failure
    6       System software failure
    7       Application software error
    8       File or item not found
    9       Invalid format or type for file or item
    0Ah     File or item is interlocked
    0Bh     Wrong disk or bad disk
    0Ch     Any other error
    --------------------------------------------------------
bl - recommended action as defined below
    ACTION  DESCRIPTION
    ---------------------------------------------------------------
    1       Retry the operation a few times then prompt the user
    2       Retry the operation with a small delay between retries,
            then prompt the user.
    3       Get input from user
    4       Abort the application gracefully
    5       Abort immediately
    6       Ignore the error
    7       Retry the operation after the user corrects the problem
    ----------------------------------------------------------------
ch - location of the error as defined below
    LOCATION    DESCRIPTION
    ----------------------------------------------------------------
        1       Unknown
        2       A block device like a disk or ram disk
        3       Network related error
        4       Serial device error
        5       Memory related error
    ----------------------------------------------------------------
Registers modified: ax, bx, cx, flags
Syntax: GetExtendedErrors

CreateTemporaryFile
-------------------
Function: Creates a temporary file.
DOS Function: 5Ah
DOS Versions: 3
Input
    Attribute - File attribute as defined below
    ATTRIBUTE   DESCRIPTION
    -------------------------------------------
        0       Normal file
        1       Read-only
        2       Hidden
        4       System
    -------------------------------------------
    FilenameSeg - Segment address of filename string
    FilenameOfs - Offset of filename string
Output
    carry flag = clear - operation successful
        ax - file handle
        ds:dx - address of the filename string
    carry flag = set - operation unsuccessful
        ax - error code
            3 = Path not found
            5 = Access denied
Registers modified: ax, dx, ds, flags
Syntax: CreateTemporaryFile Attribute, FilenameSeg, FilenameOfs

CreateNewFile
-------------
Function: Creates a new file. If the specified file already exists, an error is
          returned.
DOS Function: 5Bh
DOS Versions: 3
Input
    Attribute - File attribute as defined below
    ATTRIBUTE   DESCRIPTION
    -------------------------------------------
        0       Normal file
        1       Read-only
        2       Hidden
        4       System
    -------------------------------------------
    FilenameSeg - Segment address of filename string
    FilenameOfs - Offset of filename string
Output
    carry flag = clear - operation successful
        ax - file handle
    carry flag = set - operation unsuccessful
        ax - error code
            3 = Path not found
            4 = No more file handles
            5 = Access denied
          50h = File already exists
Registers modified: ax, cx, dx, ds, flags
Syntax: CreateNewFile   Attribute, FilenameSeg, FilenameOfs

ControlFileAccess
-----------------
Function: Locks or unlocks a record in a file on a networked system.
DOS Function: 5Ch
DOS Versions: 3
Input
    LockUnlock  - 0 = lock, 1 = unlock
    Handle - File handle
    OffsetHigh - High word of record offset
    OffsetLow - Low word of record offset
    LengthHigh - High word of record length
    LengthLow - Low word of record length
Output
    carry flag = cleared - operation successful
    carry flag = set - operation unsuccessful
        ax - error code
            1 = Invalid function
            6 = Invalid file handle
          21h = All or part of the record is already locked
Registers modified: ax, bx, cx, dx, si, di, flags
Syntax: ControlFileAccess   LockUnlock, Handle, OffsetHigh, OffsetLow, LengthHigh, LengthLow

GetMachineName
--------------
Function: Returns the local machine name on a network.
DOS Function: 5Eh   Sub-Function: 00h
DOS Versions: 3
Input
    BufferSeg - Segment address of the string buffer
    BufferOfs - Offset of the buffer
Output
    carry flag = clear - operation successful
        ch = 0 - name not defined
            > 0 - name defined
        cl - NETBIOS name number(ch <> 0)
        ds:dx - address of identifier(ch <> 0)
    carry flag = set - operation unsuccessful
        ax - error code
            1 - Invalid function code
Registers modified: ax, cx, dx, ds, flags
Syntax: GetMachineName  BufferSeg, BufferOfs

SetupPrinter
------------
Function: Sets up a printer attached to the network.
DOS Function: 5Eh   Sub-Function: 02h
DOS Versions: 3
Input
    BufferSeg - Segment address of the setup string
    BufferOfs - Offset of the buffer
    ListIndex - Redirection list index
    StrLength - Length of the setup string
Output
    carry flag = clear - operation successful
    carry flag = set - operation unsuccessful
        ax - error code
            1 - Invalid function code
Registers modified: ax, bx, cx, si, ds, flags
Syntax: SetupPrinter    BufferSeg, BufferOfs, ListIndex, StrLength

GetPrinterSetup
---------------
Function: Returns the local machine name on a network.
DOS Function: 5Eh   Sub-Function: 03h
DOS Versions: 3
Input
    BufferSeg - Segment address of the string buffer
    BufferOfs - Offset of the buffer
    Listindex - Redirection list index(Function = 2-3)
Output
    carry flag = clear - operation successful
        cx - length of the printer setup string
        es:di - address of the buffer holding the setup string
    carry flag = set - operation unsuccessful
        ax - error code
            1 - Invalid function code
Registers modified: ax, bx, cx, di, es, flags
Syntax: GetPrinterSetup BufferSeg, BufferOfs, ListIndex

GetListEntry
------------
Function: Gets a redirection list entry from the network system.
DOS Function: 5Fh       Sub-function: 02h
DOS Versions: 3
Input
    ListIndex - Redirection list index
    DeviceSeg - Segment address of buffer to hold the device name
    DeviceOfs - Offset of buffer
    NetworkSeg - Segment address of buffer to hold the network's name
    NetworkOfs - Offset of buffer
Output
    carry flag = clear - operation successful
        bh - device status flag(0 = valid device, 1 = invalid device)
        bl - Device type(3 = printer, 4 = drive)
        cx - Stored parameter
        ds:si - address of device name
        es:di - address of the network's name
    carry flag = set - operation unsuccessful
        ax - error code
            1 = Invalid function
          12h = No more files
Registers modified: ax, bx, cx, dx, bp, si, di, es, ds, flags
Syntax: GetListEntry    ListIndex, DeviceSeg, DeviceOfs, NetworkSeg, NetworkOfs

GetListEntry
------------
Function: Redirects a device on a network.
DOS Function: 5Fh       Sub-function: 03h
DOS Versions: 3
Input
    Type - The device type as defined below
    TYPE    DESCRIPTION
    ------------------------------------------
    3       Printer
    4       Disk drive
    ------------------------------------------
    Save - A parameter that needs to be saved for the caller
    DeviceSeg - Segment address of buffer to hold the device name
    DeviceOfs - Offset of buffer
    NetworkSeg - Segment address of buffer to hold the network's name
    NetworkOfs - Offset of buffer
Output
    carry flag = clear - operation successful
    carry flag = set - operation unsuccessful
        ax - error code
            1 = Invalid function
            3 = Path not found
            5 = Access denied
            8 - Insufficient memory
Registers modified: ax, bx, cx, si, di, es, ds, flags
Syntax: GetListEntry    Type, Save, DeviceSeg, DeviceOfs, NetworkSeg, NetworkOfs

GetListEntry
------------
Function: Redirects a device on a network.
DOS Function: 5Fh       Sub-function: 04h
DOS Versions: 3
Input
    DeviceSeg - Segment address of buffer to hold the device name
    DeviceOfs - Offset of buffer
Output
    carry flag = clear - operation successful
    carry flag = set - operation unsuccessful
        ax - error code
            1 = Invalid function
          0Fh - Redirection paused on server
Registers modified: ax, si, ds, flags
Syntax: GetListEntry    DeviceSeg, DeviceOfs

GetPSPAddress
-------------
Function: Returns the address of the current PSP.
DOS Function: 62h
DOS Versions: 3
Input
    none
Output
    bx - Segment address of the Program Segment Prefix(PSP)
Registers modified: ah, bx, flags
Syntax: GetPSPAddress

LeadByteTable
-------------
Function: Returns the address of the system table of legal lead bytes or
          gets/sets the value of the interim console flag.
DOS Function: 63h
DOS Versions: 2.25
Input
    Function - The sub-function as defined below:
    FUNCTION    DESCRIPTION
    -----------------------------------------------------------------
        0       Get the address of the system lead byte table
        1       Setting the value of the console flag
        2       Getting the value of the console flag
    -----------------------------------------------------------------
    Console - Indicate if setting/getting the console flag(Function = 1)
Output
    ds:si - Address of the lead byte table(Function = 0)
    dl - Value of the console flag(Function = 2)
Registers modified: ax, dl, flags
Syntax: LeadByteTable   Function, Console

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -