VOGONS


Reply 20 of 22, by idspispopd

User metadata
Rank Oldbie
Rank
Oldbie

That tool sounds useful, but it seems it cannot actually mount images, just view/extract them. Still nice find.

That kind of tool must definitely be possible, the old hd compression tools like Stacker, DoubleSpace (were there more?) did mount a (compressed) image file. I just don't know if this can be done on-the-fly, OTOH in DOS rebooting is not too bad.
Oh, and SHSUCD contains tools to do this with ISO images (source code available), but the driver architecture for CD-ROM drives in DOS is different from hard disks so I don't know how useful this would be.

Reply 21 of 22, by Scali

User metadata
Rank l33t
Rank
l33t
smeezekitty wrote:

There must be a reason why one is not readily available for DOS. My bets are on difficult

Yup, for 640K machines, you can't even mount most floppy images in memory in the first place. So you'll need to do some kind of system that reads/writes sectors to/from HDD on-the-fly.
For systems with EMS/XMS you could load the floppy into memory, so that would be slightly easier.
And then you need to know how to override the DOS/BIOS routines to redirect them to your virtual floppy handling code.
I guess it's a case of "easy when you know how".

http://scalibq.wordpress.com/just-keeping-it- … ro-programming/

Reply 22 of 22, by carlostex

User metadata
Rank l33t
Rank
l33t

A little more ranting:

I mostly would prefer writing code in C++ than in C i think. For someone who just started learning programming the console input/output in C++ is just better to understand and easier to work with IMHO. The way the operators >> and << can be used in C++ make the usage of formatting text and variable values way simpler than in C using scanf.

The STL has some wonderful stuff like Vectors. It's there and simple and ready to use and it's fast enough. One can argue that using malloc to get dynamic arrays in C is faster, but then so is the C++ way of allocating memory with new and delete. Vectors do all of this for you and have wonderful member functions that make them so easy and useful to use.

Now something i HATE in C++:

File streams and file I/O. Seriously, when you get to write and read more complex data it's a nightmare. On my final course project i had to implement all my File I/O in C. The fwrite and fread functions make it easy that i can read the blocks of structs into the program main Vector container. All i have to do is count all the bytes inside the file and with that value resize the Vector to get the data in. Then only one single line of code with fread gets all those nice struct blocks into the Vector. Simple and easy.

With C++? Well ifstream::read is hardly a substitute for fread. It just doesn't work as easy so i haven't been able to port all the code to C++. I don't consider this my fault because the course was a mishmash of C and C++ and the file I/O handling was given us in C rather than C++. In fact i had to learn a lot of C++ all by myself. Then i had my colleagues looking into my code and accusing me of codeing with stuff that was never taught.
Anyway, file I/O for more complex data in C++ is being a pain in the ass for me to learn.