Funny how from time to time things like this come about. Was poking through some links and found the full source code for MS DOS. Yes, the same.
Pretty crazy to see the way they compliled all this together. I’m not a C programmer, but like any good language the logic is universal, in this case it’s just madness. Check out this snip from FDISK:
/* Now try to get it using GET MEDIA ID */
if (get_fs_and_vol(part_table[j][i].drive_letter))
BEGIN
for (k=u(0); k < u(8); k++)
BEGIN
if (dx_buff.file_system[k] != ‘ ‘)
length = k+1;
END
strncpy(part_table[j][i].system,&dx_buff.file_system[0],u(length));
END
else
BEGIN
if (part_table[j][i].num_sec > (unsigned long)FAT16_SIZE)
strcpy(part_table[j][i].system,FAT16);
else
strcpy(part_table[j][i].system,FAT12);
END
END
else
BEGIN
/* set up to no file system or volume label */
strcpy(part_table[j][i].vol_label,NOVOLUME);
strcpy(part_table[j][i].system,NOFORMAT);
END
return;
if (get_fs_and_vol(part_table[j][i].drive_letter))
BEGIN
for (k=u(0); k < u(8); k++)
BEGIN
if (dx_buff.file_system[k] != ‘ ‘)
length = k+1;
END
strncpy(part_table[j][i].system,&dx_buff.file_system[0],u(length));
END
else
BEGIN
if (part_table[j][i].num_sec > (unsigned long)FAT16_SIZE)
strcpy(part_table[j][i].system,FAT16);
else
strcpy(part_table[j][i].system,FAT12);
END
END
else
BEGIN
/* set up to no file system or volume label */
strcpy(part_table[j][i].vol_label,NOVOLUME);
strcpy(part_table[j][i].system,NOFORMAT);
END
return;
yikes, and I thought my AJAX spinny-loader thingy was tech. hehe.
Post Tags: