Skip to content

mpower-codeworks/Daves-Tiny-Editor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

178 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dave's Tiny Editor (DTE) v2.0.9

A working Windows text editor in 981 bytes.

DTE executable properties showing 890 bytes D.T. Mascot
DTE executable virus scan clean

Compiles with: MASM and Crinkler.

DTE is an extension of tiny.asm HelloAssembly by Dave Plummer https://github.com/davepl. The idea is to make a working windowed text editor in the sub-1KB category. It uses Crinkler https://github.com/runestubbe/Crinkler compression at build time.

DTE is basically a wrapper around the RICHEDIT50W control from the WinAPI. Versions 1.0+ use the EDIT control with Crinkler cranked and were built-up from tiny.asm then worked down to 890 bytes with Win Defender quite unhappy. Versions 2.0+ have Crinkler backed-off a bit and use RICHEDIT to gain cheaper access to Courier font and much larger files. 2.0+ was then worked down from 995 to 981 bytes.

Important: Programs using Crinkler can be flagged as a false positive by antivirus, including Windows Defender. You may need to make an antivirus exception folder to build this (especially for 1.0+), or Windows may delete the EXE as soon as the build completes. Therefore, try this out AT YOUR OWN RISK - NO WARRANTIES / NO GUARANTEES. You can accomplish this with PowerShell, but I am not going to tell you how. Sorry. You're on your own when messing with antivirus.

  • MASM version used: Microsoft (R) Macro Assembler Version 14.44.35224.0

        In masm32\include\winextra.inc change:

    STD_ALERT struct<br>
        alrt_timestamp dd ?<br>
        alrt_eventname WCHAR  [EVLEN + 1] dup(?)<br>
        alrt_servicename WCHAR [SNLEN + 1] dup(?)<br>
    STD_ALERT ends

        to:

    STD_ALERT struct<br>
        alrt_timestamp dd ?<br>
        alrt_eventname WCHAR  (EVLEN + 1) dup(?)<br>
        alrt_servicename WCHAR (SNLEN + 1) dup(?)<br>
    STD_ALERT ends<br>

        The brackets on lines 13,14 were changed to parens.

  • Build.bat contains: /LIBPATH:"C:\Program Files (x86)\Windows Kits\10\Lib\10.0.20348.0\um\x86"
    You may need to change to fit your system: /LIBPATH:"....\Windows Kits\10\Lib\(your version)\um\x86"
  • You need to have Crinkler installed in a directory that has been added to PATH.
    Example: C:\utils\Crinkler.exe

Contents:

Folder Description
1_0 Version 1.0 aggressive 890 bytes build. Needs AV exception to be usable.
2_0_BACKUPS Version 2.0 more features, 981 bytes build from RICHEDIT to release.
File Description
build.bat Builds DTE from command line.
DRAG ME ONTO DTE.txt How to use DTE.
DTE ABOUT.txt Explains some design decisions.
dte.asm The program. Version 2.0.9
LICENSE Usage permissions.

DTE in use:

DTE in action

About

The idea is to make a working text editor in the sub 1kb category. It uses Crinkler compression at build time. winapi, masm, crinkler, richedit, sub-1kb, text-editor, assembly

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors