home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD2.mdf / gnu / djgpp / libsrc / c / sys / getwd.s < prev    next >
Encoding:
Text File  |  1993-07-24  |  952 b   |  43 lines

  1. /* This is file GETWD.S */
  2. /*
  3. ** Copyright (C) 1993 DJ Delorie, 24 Kirsten Ave, Rochester NH 03867-2954
  4. **
  5. ** This file is distributed under the terms listed in the document
  6. ** "copying.dj", available from DJ Delorie at the address above.
  7. ** A copy of "copying.dj" should accompany this file; if not, a copy
  8. ** should be available from where this file was obtained.  This file
  9. ** may not be distributed without a verbatim copy of "copying.dj".
  10. **
  11. ** This file is distributed WITHOUT ANY WARRANTY; without even the implied
  12. ** warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  13. */
  14.  
  15.     .text
  16.     .globl _getwd
  17. _getwd:
  18.     pushl    %ebx
  19.     pushl    %esi
  20.     pushl    %edi
  21.     
  22.     movb    $0x19,%ah
  23.     int    $0x21
  24.     addb    $0x61,%al
  25.  
  26.     movl    16(%esp),%esi
  27.     movb    %al,(%esi)
  28.     incl    %esi
  29.  
  30.     movb    $58,(%esi)
  31.     incl    %esi
  32.     movb    $47,(%esi)
  33.     incl    %esi
  34.  
  35.     movb    $0,%dl
  36.     movb    $0x47,%ah
  37.     int    $0x21
  38.     movl    16(%esp),%eax
  39.     popl    %edi
  40.     popl    %esi
  41.     popl    %ebx
  42.     ret
  43.