Changeset 446 in xtideuniversalbios for trunk/Assembly_Library/Src


Ignore:
Timestamp:
Aug 31, 2012, 5:43:21 PM (12 years ago)
Author:
aitotat@…
google:author:
aitotat@gmail.com
Message:

Changes to Assembly Library:

  • File Library can now create files.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Assembly_Library/Src/File/FileIO.asm

    r376 r446  
    2323
    2424;--------------------------------------------------------------------
     25; FileIO_CreateWithPathInDSSIandAttributesInCX
     26;   Parameters:
     27;       CX:     File attribute flags
     28;       DS:SI:  Ptr to NULL terminated path or file name
     29;   Returns:
     30;       AX:     DOS error code if CF set
     31;       BX:     File handle if CF cleared
     32;       CF:     Clear if file opened successfully
     33;               Set if error
     34;   Corrupts registers:
     35;       AX, BX
     36;--------------------------------------------------------------------
     37ALIGN JUMP_ALIGN
     38FileIO_CreateWithPathInDSSIandAttributesInCX:
     39    xchg    dx, si      ; Path now in DS:DX
     40    mov     ah, CREATE_OR_TRUNCATE_FILE
     41    jmp     SHORT CreateOrOpenFile
     42
     43
     44;--------------------------------------------------------------------
    2545; FileIO_OpenWithPathInDSSIandFileAccessInAL
    2646;   Parameters:
     
    3959    xchg    dx, si      ; Path now in DS:DX
    4060    mov     ah, OPEN_EXISTING_FILE
     61CreateOrOpenFile:
    4162    int     DOS_INTERRUPT_21h
    4263    xchg    si, dx
Note: See TracChangeset for help on using the changeset viewer.