05/31/2026
chastext editing itself on DOS
What you saw in this video is a demonstration of how the program I wrote, chastext, can read itself, make changes, and send a copy to another file.
I made some changes to the code to allow it to correctly output even zero bytes when changes are being made. The search and replacement strings must be the same length, but if they are, it is possible to have a new executable file with the replaced text that will have it every time it runs.
The implications of this are astounding because it means that I can use it to change text for binary files of any sort and use it along with chastehex, which is meant for editing bytes to specific values.
And by using the power of batch or shell scripts, as I showed in a previous video, I can make changes to files automatic. This power is what I had in mind when I started assembly language. I have learned more than I thought possible. The key is the master of system calls, and I will be documenting these more as I write the Linux version of my book. Perhaps a comparison of DOS and Linux calls would be helpful.