How does edit.exe work?

On system 32, there is an exe called edit.com. This is an old text editor. I am wondering how they created a console application with gui and work with the mouse? Thanks

+5
source share
4 answers

No shortcuts.
The mouse must be paired using assembly code.
You must call interrupt 33 to have access to several functions, such as reading mouse counts and button states. Then you must read the processor registers to get these numbers. From there, you could do the rest in C, including a GUI-like interface. There is no shortcut for this - it must be done manually, each individual square must be painted in the correct color.

+3
source

edit.com is REALLY old. This was written before the Windows GUI was really popular. They probably use special DOS features to create graphics and mouse recognition.

0
source

Windows 3.1 DOS, , DOS 5.0 DOS 4.0.

0

The best way to add mouse and color support to the console is to use some TextArea control and create your own console instead of using the DOS console. You can also look at ncurses for Windows, but I do not recommend it. If you just want the color, you can also look at this tutorial .

0
source

All Articles