Hello.
I'm a newbie in c programming.
I'd like to make a program for creating an image file from a floppy disk.
Is there anyone with agood point of start in doing this?
Thanks. 6 2267
helpless newbie <ks***@libero.i t> scribbled the following: Hello. I'm a newbie in c programming. I'd like to make a program for creating an image file from a floppy disk. Is there anyone with agood point of start in doing this?
Thanks.
This can't be done in ISO standard C, which does not have the concept of
floppy disks. Please ask in a newsgroup dedicated to your own operating
system.
--
/-- Joona Palaste (pa*****@cc.hel sinki.fi) ------------- Finland --------\
\-- http://www.helsinki.fi/~palaste --------------------- rules! --------/
"That's no raisin - it's an ALIEN!"
- Tourist in MTV's Oddities
helpless newbie said the following, on 07/06/04 10:18: Hello. I'm a newbie in c programming. I'd like to make a program for creating an image file from a floppy disk. Is there anyone with agood point of start in doing this?
Thanks.
This is not something that can be done in standard C. The language
standard was developed with the idea that it would be implemented on
multiple platforms, so it does not include platform- or device-specific
ideas like "floppy disk" (or "clearing the screen" or "hit any key", to
pick two perennial favorites).
You need to ask this question in a group specific to the platform you
will be using. (For example, 'comp.unix.prog rammer' for Unix.)
--
Rich Gibbs rg****@alumni.p rinceton.edu
In <_w************ *****@news4.tin .it> "helpless newbie" <ks***@libero.i t> writes: I'm a newbie in c programming. I'd like to make a program for creating an image file from a floppy disk. Is there anyone with agood point of start in doing this?
Figure out if your operating system provides a way for accessing the
floppy drive as a file (e.g. /dev/fd0 under Linux). Open the file
associated to the device (if any) with fopen(), in binary read mode, and
keep reading until you reach the end of the file. You may need
administrator privileges in order to be allowed to access the device file.
If this approach doesn't work (no way to access the floppy device as an
ordinary file), you have to ask in a newsgroup dedicated to programming
on your particular OS.
Dan
--
Dan Pop
DESY Zeuthen, RZ group
Email: Da*****@ifh.de
In <cc**********@o ravannahka.hels inki.fi> Joona I Palaste <pa*****@cc.hel sinki.fi> writes: helpless newbie <ks***@libero.i t> scribbled the following: Hello. I'm a newbie in c programming. I'd like to make a program for creating an image file from a floppy disk. Is there anyone with agood point of start in doing this?
Thanks.
This can't be done in ISO standard C, which does not have the concept of floppy disks.
It can be done in standard C, despite the lack of the concept of floppy
disks, as long as the implementation allows accessing the floppy disk
as an ordinary file. Simply ask the user to provide the "magic" file
name and the name of the image file and write code that copies data
from one file to another. Quite doable in standard C, methinks. Whether
the approach actually works on the OP's platform is a different story...
Dan
--
Dan Pop
DESY Zeuthen, RZ group
Email: Da*****@ifh.de
helpless newbie wrote: Hello. I'm a newbie in c programming. I'd like to make a program for creating an image file from a floppy disk. Is there anyone with agood point of start in doing this?
Thanks.
In some literary circles, an image file of a floppy disk
is the entire contents of the floppy stored as a file
on another device. This is a mechanism often used when
duplicating floppies.
Yes, this can be done using the C language and a lot of
platform specific functions. For example, you will need
to access the floppy as sectors of data and write that
data into a floppy. Writing out is easy and can be
done using standard C. However, accessing the sectors
of a floppy requires platform specific functionality
which is best discussed in a newsgroup about your
platform.
I don't suggest you do this as a newbie. You will need
to read up on your operating system's functions, determine
the type of floppy and how to access it. A lot of work
as a newbie function. I'd rather purchase a product
to duplicate floppies than write my own. I have better
things to do with my time.
--
Thomas Matthews
C++ newsgroup welcome message: http://www.slack.net/~shiva/welcome.txt
C++ Faq: http://www.parashift.com/c++-faq-lite
C Faq: http://www.eskimo.com/~scs/c-faq/top.html
alt.comp.lang.l earn.c-c++ faq: http://www.raos.demon.uk/acllc-c++/faq.html
Other sites: http://www.josuttis.com -- C++ STL Library book
helpless newbie wrote: Hello. I'm a newbie in c programming. I'd like to make a program for creating an image file from a floppy disk. Is there anyone with agood point of start in doing this?
It depends on your O/S.
Under *nix, you could probably do something like:
FILE *floppy = fopen("/dev/fd0","r");
(Replacing "/dev/fd0" as needed for your particular platform.)
For other O/S's, you might be able to do the same thing, if you are able
to determine the proper name to pass to fopen().
--
+-------------------------+--------------------+-----------------------------+
| Kenneth J. Brody | www.hvcomputer.com | |
| kenbrody at spamcop.net | www.fptech.com | #include <std_disclaimer .h> |
+-------------------------+--------------------+-----------------------------+ This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Peter D |
last post by:
In my access 97 program i transfer my data in a DATA.mdb tot a floppy
( i know there are better ways, but tell that to my boss) So far no
problems.
But i would like a button on my program that i just click and the code
behind it reads my floppy and updates my records on another computer
with my program ( no we have not yet a network at the office).
If anyone know a simple code to read from a floppy and update the
|
by: Peter D |
last post by:
I have a database in ACCESS 97 and i have a routine that copies the
tables to a database onto a floppy.
What i would like is a routine to transfer the data from the floppy
into the tables in a database on a laptop. ( i can not replace all the
tables because in those tables are the records from the laptop
itself). Is there a way to append the records from the floppy into
the database from the laptop????
If so, can you help me because...
|
by: noe |
last post by:
Hello all devs!!
I’m a student and I’m developing my Final Project in the University. I
have to develop a driver for Windows XP that work so:
I have a file in the HD (NTFS file system) of my PC and I want to copy it
to the floppy disk (FAT16 file system). But I need that the file data in
the floppy disk is modified (added 1 respect to the original value).
For example:
I have-> HD file data: ‘hello’
|
by: googler |
last post by:
I'm trying to read from an input text file and print it out. I can do
this by reading each character, but I want to implement it in a more
efficient way. So I thought my program should read one line at a time
and print it out. How can I do this? I wrote the code below but it's
not correct since the fscanf reads one word (terminating in whitespace
or newline) at a time, instead of reading the whole line.
#include <stdio.h>
void...
|
by: thomasp |
last post by:
Wrong title should be File Save Dialog.
I have a VB2005 program that has to import data from a 3.5 floppy drive and
USB drives. I use a file open dialog to choose the file, works great. The
problem occurs the next time I wish to open a file. If the last import was
done from a floppy drive the program looks for a floppy drive first and if
it has been removed I get an error. While I could just catch the error, I
would rather know how...
| |
by: googler |
last post by:
Is there any C library function that returns the size of a given file?
Otherwise, is there a way in which file size can be determined in a C
program? I need to get this for both Linux and Windows platforms, so a
generic solution is what I am looking for.
Thanks for your help.
|
by: Otie |
last post by:
Hi,
Is there a way for VB5 to determine exactly where on a hard drive a .exe
file is stored upon the .exe file's first copying to the hard drive? What I
need to know is the exact hard drive sector, cluster, partition, etc.
information so I can use it later on to determine if the file was ever
deleted and restored or moved elsewhere.
Thank you.
|
by: Marin Brkic |
last post by:
Not commercial distribution, but an academic kind of sorts - giving
the exe file to coleagues, so they can use it in their work. Giving
..py file is not an option, since due to centralized computer
maintenance, they don't (and cannot) have installed python (except the
ones that bring their own computer at work, but those are an
exception).
As far as I know py2exe is the only option which can do such a thing
(make exe files from...
|
by: Debadatta Mishra |
last post by:
Introduction
In this article I will provide you an approach to manipulate an image file. This article gives you an insight into some tricks in java so that you can conceal sensitive information inside an image, hide your complete image as text ,search for a particular image inside a directory, minimize the size of the image. However this is not a new concept, there is a concept called Steganography which enables to conceal your secret...
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
| |
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |