News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Plain text editor

Started by elegem, September 12, 2009, 11:56:19 PM

Previous topic - Next topic

elegem

I'm looking to write a very very simple text editing program. Its merely an editable textbox(no rich text) and a menu with open/save/exit.Something like a stripped down notepad. Is there any code someone is willing to share to help get me started?

hutch--

 :bg

Yes, its in the MASM32 TOOLS directory, its called "tview" and builds at a disk hogging 3072 bytes.
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php

elegem

Quote from: hutch-- on September 13, 2009, 12:11:27 AM
:bg

Yes, its in the MASM32 TOOLS directory, its called "tview" and builds at a disk hogging 3072 bytes.

Didn't see that one...its a good start...it only shows an editable text box, but not how to save such a file. Do you have an example of how to open and save a standard ANSI text file?

Thnx for the speedy response. :bg

dedndave

Hutch wrote qeditor - a good guy to talk to
maybe he would give up the source

elegem

Quote from: dedndave on September 13, 2009, 12:54:29 AM
Hutch wrote qeditor - a good guy to talk to
maybe he would give up the source
lol...
I don't need anything that complicated, :dazzled:
I'm looking for a simple text editor that I can work off of...does nothing exist? :boohoo:

hutch--

 :bg

Try looking in the MASM32 example code, there is a complete text editor there that you can striip down to do what you need.

HINT: Example05\riched
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php

elegem

Quote from: hutch-- on September 13, 2009, 01:26:19 AM
:bg

Try looking in the MASM32 example code, there is a complete text editor there that you can striip down to do what you need.

HINT: Example05\riched

Ahah...that's what I needed. Thanks a bunch. :cheekygreen: :clap:

jj2007

If you are not scared of wasting a whopping 6k of disk space, try TinyRTF. Source is included - extract all, then launch tiny_rtf.exe


elegem

Both tiny_ide and your links to the tutorial are quite helpful. But is there something like tiny rtf editor (but simpler) for plain ansi encoded text files?

The tutorials are great! (The index seems broken though)=(

jj2007

#10
Quote from: elegem on September 13, 2009, 10:30:50 PM
But is there something like tiny rtf editor (but simpler) for plain ansi encoded text files?

You can use tiny_rtf.ex for plain text *.asm files. Just avoid using the bold, red etc buttons, or disable them in TinyDemo.rtf...

vanjast

Quote from: hutch-- on September 13, 2009, 12:11:27 AM
... its called "tview" and builds at a disk hogging 3072 bytes.
Damm.. more bloatware... :P

elegem

Quote from: jj2007 on September 14, 2009, 01:17:56 PM
Quote from: elegem on September 13, 2009, 10:30:50 PM
But is there something like tiny rtf editor (but simpler) for plain ansi encoded text files?

You can use tiny_rtf.ex for plain text *.asm files. Just avoid using the bold, red etc buttons, or disable them in TinyDemo.rtf...

Ye...that's what I'm using right now...but I'm a newbie to assembly.=P

FORTRANS

Quote from: vanjast on September 14, 2009, 07:04:31 PM
Quote from: hutch-- on September 13, 2009, 12:11:27 AM
... its called "tview" and builds at a disk hogging 3072 bytes.
Damm.. more bloatware... :P

   For jollies, I looked for EDLIN.EXE on this XP system.


Directory of C:\WINDOWS\system32

08/29/2002  07:00 AM            12,642 edlin.exe
               1 File(s)         12,642 bytes

C:\WINDOWS>help edlin
This command is not supported by the help utility.  Try "x /?".

C:\WINDOWS>edlin /?
Starts Edlin, a line-oriented text editor.

EDLIN [drive:][path]filename [/B]

  /B   Ignores end-of-file (CTRL+Z) characters.


   Makes one wonder if it is still in Windows 7?  Maybe they will
update the help facility by that point.

Cheers,

Steve N.

elegem

#14
I found something pretty close to what I'm looking for at http://win32assembly.online.fr/tut12.html
Well actually...both 12 and 33 are fine.
My concern now is that they are rather inefficient when opening a file. According to task manager, memmory usage starts at about 1.6megabytes, but when I open a 5 kb text file, it goes up to 10megabytes...is there some way to make it more efficient?