Archives
- November 2025
- October 2025
- September 2025
- August 2025
- July 2025
- June 2025
- May 2025
- April 2025
- March 2025
- February 2025
- January 2025
- December 2024
- November 2024
- October 2024
- September 2024
- August 2024
- July 2024
- June 2024
- May 2024
- April 2024
- March 2024
- February 2024
- January 2024
- October 2023
- September 2023
- August 2023
- July 2023
- June 2023
- May 2023
- April 2023
- March 2023
- January 2023
- December 2022
- November 2022
- October 2022
- September 2022
- July 2022
- June 2022
- May 2022
- April 2022
- March 2022
- February 2022
- January 2022
- December 2021
- November 2021
- October 2021
- September 2021
- August 2021
- July 2021
- June 2021
- May 2021
- April 2021
- March 2021
- February 2021
- January 2021
- December 2020
- November 2020
- October 2020
- September 2020
- August 2020
- July 2020
- June 2020
- May 2020
- April 2020
- March 2020
- February 2020
- January 2020
- December 2019
- November 2019
- October 2019
- September 2019
- August 2019
- July 2019
- June 2019
- May 2019
- April 2019
- March 2019
- February 2019
- January 2019
- December 2018
- November 2018
- October 2018
- August 2018
- July 2018
- June 2018
- May 2018
- April 2018
- March 2018
- February 2018
- January 2018
- December 2017
- November 2017
- October 2017
- August 2017
- July 2017
- June 2017
- May 2017
- April 2017
- March 2017
- February 2017
- January 2017
- December 2016
- November 2016
- October 2016
- September 2016
- August 2016
- July 2016
- June 2016
- May 2016
- April 2016
- March 2016
- February 2016
- January 2016
- December 2015
- November 2015
- October 2015
- September 2015
- August 2015
- July 2015
- June 2015
- May 2015
- April 2015
- March 2015
- February 2015
- January 2015
- December 2014
- November 2014
- October 2014
- September 2014
- August 2014
- July 2014
- June 2014
- May 2014
- April 2014
- March 2014
- February 2014
- January 2014
- December 2013
- November 2013
- October 2013
- September 2013
- August 2013
- July 2013
- June 2013
- May 2013
- April 2013
- March 2013
- February 2013
- January 2013
- December 2012
- November 2012
- October 2012
- September 2012
- August 2012
- July 2012
- June 2012
- May 2012
- April 2012
- March 2012
- February 2012
- January 2012
- December 2011
- November 2011
- October 2011
- September 2011
- August 2011
- July 2011
- June 2011
- May 2011
- April 2011
- March 2011
- January 2011
- November 2010
- October 2010
- August 2010
- July 2010
Microsoft Editor
(This is a guest post by Antoni Sawicki aka Tenox)
In a recent blog post I lamented the lack of a good console/cmd/PowerShell text editor for Windows. During the process I made a rather interesting discovery, that in a fact there IS a “native” Windows, 32bit, console based text editor and it was available since earliest days of NT or even before. But let’s start from…
…in the beginning there was Z editor . Developed by Steve Wood for TOPS20 operating system in 1981. Some time after that, Steve sold the source code to Microsoft, which was then ported to MS-DOS by Mark Zbikowski (aka the MZ guy) to become the M editor.
M editor
The DOS-based M editor was included and sold as part of Microsoft C 5.1 (March 1988), together with the OS/2 variant, the MEP editor (perhaps M Editor Protected-mode). The official name of M/MEP was simply Microsoft Editor. The same editor was also available earlier (mid-1987) as part of the MS OS/2 SDK under a different name, SDKED. Note that normally SDKED insists in operating in full screen mode. Michal Necasek generously spent his time and patched it up so that it can be run in windowed mode for your viewing pleasure.
SDKED on OS/2
However my primary interest lies with Windows. The NT Design Workbook mentions that an early days self-hosting developer workstation included compiler, some command line tools and a text editor – MEP. In fact these tools including MEP.EXE can be found on Windows NT pre-release CD-ROMs (late 1991) under MSTOOLS. It was available for both MIPS and 386 as a Win32 native console based application.
MEP on Windows NT Pre-Release
MEP.EXE was later also available for Alpha, i386, MIPS, and PowerPC processors on various official Windows NT SDKs from 3.1 to 4.0. It survived up to July 2000 to be last included in Windows 2000 Platform SDK. From time perspective it was rather unfortunate that it was buried in the SDK and overshadowed by Visual Studio instead of being included on Windows NT release media.
MEP from NT SDK on Windows NT 4.0
The Win32 version of MEP also comes with an icon and a file description which calls it Microsoft Extensible Editor.
Z editor Icon
But that’s not the end of the story. The editor of many names survives to this day, at least unofficially. If you dig hard enough you can find it on OpenNT 4.5 build. For convenience, this and other builds including DOS M, OS/2 MEP and SDKED, NT SDK MEP can be downloaded here.
Digging in through the archive I found not one but two copies of the editor code are lurking in the source tree. One under the name MEP inside \private\utils\mep\ folder and a second copy under name Z (which was the original editor for TOPS) in \private\sdktools\z folder. Doing a few diffs I was able to get some insight on he differences. Looks like MEP was initially ported from OS/2 to NT and bears some signs of being an OS/2 app. The Z editor on the other hands is a few years newer and has many improvements and bug fixes over MEP. It also uses some specific NT features.
Sadly it looks like the Z editor for Win32 was never released anywhere outside of Redmond. All the versions outlined so far had copyrights only up to 1990, while Z clearly has copyright from 1995. Being a few years newer and more native to NT I wanted to see if a build could be made. With some effort I was able to separate it from the original source tree and compile stand alone. Being a pretty clean source code I was able to compile it for all NT hardware platforms, including x64, which runs comfortably on Windows 10. You can download Z editor for Windows here.
Z editor on flashy Windows 7 x64
Last but not least there is a modern open source re-implementation of Z editor named K editor. It’s written from scratch in C++ and LUA and has nothing to do with the original MEP source code. K is built only for x64 using Mingw. There are no ready to run binaries so I made a fork and build.
K editor on Windows 10 x64
The author Kevin Goodwin has kindly included copies of original documentation if you actually want to learn how to use this editor.
23 Responses to Microsoft Editor
Pingback: Wanted: Console Text Editor for Windows | OS/2 Museum
You misspeeled Michal’s name!
Haha good catch. It was a spell checker!
Not a .cz one then? π
The reason mespotted it is that me bf happens to have the same name =)
(He’s from the .cz republic, too.)
“You misspeeled Michalβs name!”…”mespotted”
…bizarre…
I wonder if someday we could persuade Microsoft to make another source donation to the Computer History Mueseum. A lot of early OS code and associated tools would be fascinating insight into that period, and help dramatically with digital archeologists.
Now *you* mispeeled ‘Museum’!
Seriously, though, when it’s intentional, it ain’t a tyop.
As a longtime subscriber to the OS/2 developer program I remember a really great editor available for Dos and OS/2 called “T”. It was only 10 KB in size (plus an external help file for keys) and could easily fit on each of my boot and emergency disks. The OS/2 version was called “T2” but I always renamed it to “T” for simplicity.
It was a bit similar to vi in that it had a “command” and “edit” mode and a mode-switching keystroke; it had a visible command line all time and some very useful features. Obviously it was written by people who had the same requirements as I π
With an external configuration program it was possible to change every key’s function and patch the executable.
Of course I also loved “EPM” for programming cmd and Rexx but I switched to emacs for programming in C since it integrated emx+gcc and the gdb debugger quite nicely.
T think T/T2 was closely related to E.EXE shipped with PC DOS 6.x/7.0 and also TEDIT (OS/2 Warp and later). These editors were all related to something internally used at IBM, much like the folks at Microsoft used the Z editor and its offshoots.
Personal Editor PE32/PE64 mentioned in the first article is yet another relative of the IBM editor.
With OS/2 there’s an obvious legal problem — Microsoft wasn’t the sole owner of the OS/2 source code (neither was IBM). I don’t think either company can publish the source code without the other agreeing to it as well.
But yes, it’s not like the source code for OS/2 1.0 has any real commercial value nowadays. Publishing the source code would be great.
Now Tenox will require a NT kernel mode editor like the clock that I remeber he do. ;-).
The executable of the editor that came with Windows NT pre-release CD-ROMs would run in any modern Windows?.
Honestly, medoesn’t think tenox and me are the only people who would
prefer to have the option of not running windoze even when running NT.
In fact, NT having windoze plastered all over it made me finally switch
permanently to UNIX-like stuff, many moons ago.
Yeah this is on my TODO. Instead of doing it in kernel mode I’m thinking of writing an ANSI/vt100 driver for the console that would allow user mode NtDisplayString() to manipulate cursor position and other states. This way you could easily port some apps to run on the blue screen.
Unfortunately the editor from pre-release cdrom does not run on modern Windows. However the editor from NT SDK does, you can try it. https://github.com/tenox7/ntutils/raw/master/mep/MEP-x86.EXE
Yeah, writing a terminal emulator would appear to be a good first step.
T/T2 definitely followed in the path of a whole series of similar editors inside (and some outside) IBM. PE/PE2 were the originals as I remember and released as part of IBM’s Personally Developed Software program where IBM sold programs written by employees. If the software was developed on personal time then the employee got royalties. I don’t know how much in common the source code was but the operation and default key bindings were very similar among all of them. There were also editors called E/E2 that were used internally, and T was referred to as Tiny Editor. VE/VE95 were windowed versions of the editor as well. My understanding was that Slickedit was descended from the same line of editors when one of the author(s) left IBM to start that company. The same key bindings are not the default but available as an option last I checked.
@tenox: I wonder with the CSRSS, win32k, etc source can a Win32 console be created?
So why didn’t Microsoft package their command-line editor with the released NT versions?
It’s nice to see I’m not the only one who still keeps a copy of MEP on my PC machines as a part of my regular utilities. I still have all the helpfile dll files and .hlp files to go with it, which come in handy.
The fact that it’s so fast to load and supports macros makes it a great utility, even today.
Hi,
I came across the z-x64 editor and have been using it under windows 10. However I would like to report one issue I have found with it, as downloaded from this site:
When using alt-a, setfile(F2), filename.x to switch to a new file the editor momentarily hangs and exits. I need to put c: ahead of filename.x for it to successfully open the file in the current C drive working directory.
Example:
alt-a,F2,filename.c FAILS
alt-a,F2,c:filename.c WORKS
Leaving the file extension (.c in the above cases) out in order to access a recently opened file works just fine without the root directory prefix being needed.
Not a fatal problem, but it will result in data loss when switching files, as the original m editor would save the current file upon doing a switch whereas when the error occurs z-x64 does not. The issue affects operation when accessed directly from Windows 10 or via a DOS command shell. The Windows 7 version z-x84 seems fine.
Also, I have played around with tools.ini and the help files and the environment but they appear to be not being found by the app. I have tried variations on the names but to no avail. Any thoughts?
Thank You!
It was great to find this article! I was actually the Program Manager for “M” back in the day. The Editor was written by Mark Zbikowski–who also led the creation of the DOS 2.0 filesystem and made many important contributions to Microsoft File systems through the years (you might know that each .EXE in DOS begins with “MZ”. Z was originally written by “Zibo” when he was a student at Yale. We decided we needed with our professional compilers to include a real programmer’s editor; and since Z was floating around internally; we used it as the base–it became the editor underlying the Programmer’s Workbench in C 6.0 where we layered on a menuing and build system. I realized because of the linage; I had only one other choice than Z as the name; and that was—M!
Thanks for the explanation of the ‘M’ editor name, that makes perfect sense π
I believe the ‘MZ’ EXE signature goes back to Mark Zbikowski’s days of working on the Microsoft linker, probably circa 1980. I’m also pretty sure the original variant was ‘ZM’ (DOS recognizes both).
Mep-x86.exe and z-x64.exe are incompatible with Windows Terminal – You can’t copy a line of text and paste it. What happens is the Windows paste buffer somehow gets involved and that is what is pasted. I use to copy but when I use insert to past all I get is the windows paste buffer.
Great article! What a find!
I gave up coding back in 1993 – fallen USSR did not need much of programmers then. But between 1988 and 1993 I used M for everything that could be compiled and built as a program, including assembler! We have had reprogrammed many keys and written a lot of our own context specific macros. By the time, for DOS, it seemed to us M was only meaningful editor and IDE (we tuned and used it to fire batches to compile, build, and debug our opuses as well)))).
Many thanks for preserving history and for the links to builds!
It might make some sense to try to launch and see if it can be used in windows cmd and powershell )))))
With greetings from Kazakhstan,
Serikjan Utegen
This site uses Akismet to reduce spam. Learn how your comment data is processed.