Discussion about this post

User's avatar
Ben Myers's avatar

To redirect the output generated by MEM /D into a single contiguous text file, simply run:

MEM /D >MEMD.TXT

Expand full comment
Steve's avatar

Wow.. Lots of stuff I haven't thought about in years, and a reminder of why I stopped programming in Assembly when protected mode became common!! I love that you reference using the video memory space for programs. It reminds me of a trick I used once long ago when using an ADA compiler that was only capable of making .COM files (not .EXE) which were limited to 64k.. We ran out of room in our 64k memory space, and in trying anything and everything to optimize, we realized that while our monochrome video card had 2k of RAM onboard, it was only 80x25 which was 2000 bytes, leaving 48 bytes of precious RAM available and unused. We decided to start using those bytes for variable storage. It worked great until one day our boss decided to upgrade our demo system to a new VGA card and monitor which he just bought.. Removing the old monochrome adapter the night before an important customer demo and installing the VGA, our program began to fail in interesting ways we had never seen before. It took us some debugging time but finally realized that the 48 bytes we had long since forgotten we were using for variables was now gone. Reinstalling the old monochrome card just for it's 2k of memory had us working again though, and were still able to use the new VGA card for primary display.. Gotta love the old days before page faults!!

Expand full comment
16 more comments...

No posts