473,473 Members | 2,005 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

making dir or ls command using C interrupts

4 New Member
hello
i have to made a program which show list of folders and files using in interrupt in C language can any buddy help me

Haroon Idrees
Feb 16 '08 #1
4 3085
sicarie
4,677 Recognized Expert Moderator Specialist
I'm sorry, I don't understand what you are trying to do? Are you attempting to create your own version of those commands? Or are you trying to do something else?
Feb 17 '08 #2
haroonob
4 New Member
I want to make simple C Program which show current directories and files like dir or ls .This should be use interrupt for getting current directory and its subdirectories and files.Help me to make this program. I Saw 21h interrupt with its service 47h and 4Eh .

Thanks
Feb 17 '08 #3
ashitpro
542 Recognized Expert Contributor
I want to make simple C Program which show current directories and files like dir or ls .This should be use interrupt for getting current directory and its subdirectories and files.Help me to make this program. I Saw 21h interrupt with its service 47h and 4Eh .

Thanks

ls command belongs to linux,
Do you really believe that it uses DOS interrupts(in linux) to get the output.?
this link will help you
http://www.frontiernet.net/~fys/filedir.htm
Feb 17 '08 #4
haroonob
4 New Member
I made a program for getting current directory but it is not working

#include <stdio.h>
#include <string.h>
#include <dir.h>
#include <dos.h>
union REGS inregs, outregs;
void main(){
inregs.h.ah = 0x47;
int86(0x21,&inregs,&outregs);
printf("%s",outregs.x.si);
}

it prints (null)Null pointer assignment
Feb 17 '08 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

8
by: engsol | last post by:
Has anyone done a script that will rspond to the serial com port(s) receive buffer interrupt, as opposed to polling and timeouts? Win2000 is the main interest right now. Thanks Norm B
6
by: engsol | last post by:
I didn't fully think through my application before posting my question. Async com port routines to handle com port interrups only work well if one has access to the low level operating system. In...
6
by: Larry Woods | last post by:
I have multiple Calendar controls on my page and I want the user to select various dates, then press a Submit button. Is there a way to disable the interrupts from the Calendar controls? TIA, ...
3
by: dsa89 | last post by:
I would like to know if anyone can help me with this. I would like to load a file into a data structure but dont know how. Here is an example file. ;File Example ;Created 03/04/99 name =...
8
by: Cyber | last post by:
Hello ! I want to catch any event on a PC by the interrupts (C++ under Linux). My first step is to catch everything from the keyboard. I have: ...
9
by: Sweety | last post by:
hello, Is there any code using interrupts . bye
43
by: markryde | last post by:
Hello, I saw in some open source projects a use of "!!" in "C" code; for example: in some header file #define event_pending(v) \ (!!(v)->vcpu_info->evtchn_upcall_pending & \...
1
by: Srinivas Reddy Thamma | last post by:
Hi, I would like to know few links that would be helpful for me to learn Interrupt programming in C language..... Thanks in advance. Srinivas
2
by: andychambers2002 | last post by:
I've written a simple Timer class that allows you to extend it and then implement onMinuteChange, onHourChange etc methods which will be executed on each new minute/hour respectively. It works...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.