www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/07/17/01:17:22

From: xcapnkev AT aol DOT com (XCapnKev)
Newsgroups: comp.os.msdos.djgpp
Subject: Current working directory & at&t assembler
Date: 16 Jul 1997 19:10:11 GMT
Lines: 21
Message-ID: <19970716191000.PAA05698@ladder02.news.aol.com>
NNTP-Posting-Host: ladder02.news.aol.com
Organization: AOL http://www.aol.com
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

I've recently downloaded djgpp, as to be able to easier port the programs
I write in dos to linux.  What I'm doing now is strictly a DOS problem,
which is getting the current directory.  I could have missed a libc
function, but I'm pretty sure I just need to write one.  I've got the
assembler calls to do it, but I haven't the faintest how at&t assembly is
:)  From ralf brown's interrupt list:

--------D-2147-------------------------------
INT 21 - DOS 2+ - "CWD" - GET CURRENT DIRECTORY
    AH = 47h
    DL = drive number (00h = default, 01h = A:, etc)
    DS:SI -> 64-byte buffer for ASCIZ pathname
Return: CF clear if successful
        AX = 0100h (undocumented)
    CF set on error
        AX = error code (0Fh) (see AH=59h)

My attempts to pass regular assembly to the compiler failed miserably, so
could someone help me out?  Thanks in advance,

 - k e v

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019