Logo 
Search:

Assembly Language Articles

Submit Article
Home » Articles » Assembly Language » Homework HelpRSS Feeds

Program to find the current working directory

Posted By: Ludwig Fischer     Category: Assembly Language     Views: 3234

Write a Program to find the current working directory.

Code for Program to find the current working directory in Assembly Language

printf  macro msg       
        mov ah,09h
        mov dx,offset msg
        int 21h
endm           


data segment
        str db 'current directory is :',10d,13d,'$'
        drive db ':\$'
        buf db 64 dup('$')      
                                
data ends

code segment
        assume cs:code,ds:data
start:
        mov ax,data             
        mov ds,ax               

        printf str              

        mov ah,19h              
        int 21h

        mov ah,02h              
        add al,65
        mov dl,al               
        int 21h

        mov ah,47h
        mov dl,0

        lea si,[buf]
        int 21h

        printf drive
        printf buf

        mov ax,4c00h
        int 21h
code ends
        end start


  
Share: 


Didn't find what you were looking for? Find more on Program to find the current working directory Or get search suggestion and latest updates.

Ludwig Fischer
Ludwig Fischer author of Program to find the current working directory is from Frankfurt, Germany.
 
View All Articles

Related Articles and Code:


 
Please enter your Comment

  • Comment should be atleast 30 Characters.
  • Please put code inside [Code] your code [/Code].

 
No Comment Found, Be the First to post comment!