VOGONS

Common searches


First post, by ncmark

User metadata
Rank Oldbie
Rank
Oldbie

If anyone's interested, I have been fooling around with programming in assembly

The first one, written a while back, reads and displays sectors off a floppy disk

The second one, which I have been working on now, reads the FAT and gives you a visual display in hex code - shows you which ones are available, which are assigned, which are bad

The third, also currently working on, reads the root directory and displays the entries (not just the ones DOS wants you to see, but all of them)

I am thinking of combining the second and third programs - once you select a file it follows the chain and gives you a visual display of the sectors used

Reply 2 of 11, by Joey_sw

User metadata
Rank Oldbie
Rank
Oldbie

i mostly use Norton Utilities' DiskEdit ...

though i'm looking for Directory Compactor for FAT16/32.
whats that?

consider this:
1. create a directory,
2. fill that directory with about 2000 small-files (let say group A),
3. add another 1 file to that directory (let say group B)
4. delete the group A files, but leaves the Group B
5. If you look cluster usages of that directory, its obvious that it using more than 1 cluster.
Under slow system, the performace degradation were quite noticeable.

Directory Compactor that i'm looking for is to optimize the cluster usages of directories to minimum required.
Its done by removing directory entries that marked as deleted, and adjusting the cluster chain in FAT entries.

comparable to PACK command on dbase, somewhat.

You know, most defragmenter doesn't do this 'Directory Compactor', they just leave it as is.
Even Defraggler working under FAT32 partiion doesn't do that.

-fffuuu

Reply 3 of 11, by ncmark

User metadata
Rank Oldbie
Rank
Oldbie

yeah as far as I can tell nothing re-organizes the (root) directory entries - when you delete a a file, all it does is change the first character - the rest of the filename, as well as the starting cluster, are still there. I guess that is why undelete must ask for the first character of the filename.

I haven't got to reading subdirectories yet. I can tell when something is a subdirectory, but to read it I am going to have to switch logical sectors into physical sectors, as I have been using BIOS calls (not DOS calls) to access the disk........

Reply 4 of 11, by leileilol

User metadata
Rank l33t++
Rank
l33t++

Assembly scares me

my motivation for assembly? A x86 ASM version of these D_DrawSurfaceBlock8RGBHQ functions using deltas so colored dynamic lighting could be a lot faster

apsosig.png
long live PCem

Reply 8 of 11, by VileR

User metadata
Rank l33t
Rank
l33t

Been messing around with x86 assembly as of late, trying to learn as I go. For now I'm just using the DOSBox debugger, the 8086 opcode map, and a hex editor to poke around the innards of really old games and see how they like being patched for enhanced / unintended behavior. ;)

Certainly seems to require an intimate knowledge of PC hardware architecture, and coming from higher-level languages, it's far from being trivial. But it's rather rewarding when you get down to the bare metal and achieve unprecedented control of what the machine can do.

[ WEB ] - [ BLOG ] - [ TUBE ] - [ CODE ]

Reply 9 of 11, by megatron-uk

User metadata
Rank Oldbie
Rank
Oldbie

The thing is, these days most compilers can generate machine code that is much more efficient than most people could write in assembler 😀

My collection database and technical wiki:
https://www.target-earth.net

Reply 10 of 11, by ncmark

User metadata
Rank Oldbie
Rank
Oldbie
megatron-uk wrote:

The thing is, these days most compilers can generate machine code that is much more efficient than most people could write in assembler 😀

I am not sure I agree with this........

Reply 11 of 11, by Joey_sw

User metadata
Rank Oldbie
Rank
Oldbie

i'm not also unsure about compiler can generate better code than hand writen assembly though.

I can attest that even with -O option to optimize,
more efficient/better code in hand writen assembly can be made,
this especially true if the non-assembly codes using stuff like bloated-OOP (class derivates, polymorphism, even opertator overloading, etc...)

anyway, some proponent assembly for windows apps: http://www.grc.com/smgassembly.htm

-fffuuu