https://github.com/DigitalMars/me
and translated to D:
https://github.com/DigitalMars/me
and translated to D:
The first thing I do with a new system is port ME to it. I'll use vi to do what's necessary to get there (usually get ssh working so I can edit the files with ME on another machine).
I've worked out how to do syntax highlighting on it, but never got around to doing it.
Back in the 80s, I handled configuration by having ME directly patch the ME executable. (This was a trick I learned from the old ADVENT Fortran game.) It was marvelously simple and bulletproof to do that.
Unfortunately, programs that patched their own executables became huge no-nos as malware took off, and I had to abandon that.
Mine was a matter of grouping the global variables for configuration together. Take the address of it, compute the offset of that address in the .exe file, and write.