DiskImager is a tiny (6 KB) MS-DOS application that create image files out of floppy disks, so that you may later restore them or send them to a friend.
This source was originally released 1999 to the public. It was created in Turbo Pascal 6 and inline 286 Assembler. It is provided for inspiration, and not for continued development of DiskImager.
The source code is released under the Creative Commons Attribution-NonCommercial 4.0 International (CC BY-NC 4.0) License. The complete license is also available in license.txt. For custom licensing please contact me. Copyright © 2019 by Fredrik Johansson Robotics AB.
Get a Turbo Pascal compiler (I think that there's still some free compilers on the internet). Load up the source, and start debugging.