News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

New Editor

Started by Biterider, March 04, 2025, 08:38:50 PM

Previous topic - Next topic

Biterider

Hello
A long time ago I started coding an editor that I wanted to extend with an internal automation engine for addins. My intention was to use LUA. 
Other things got in the way and I only got back to it a few weeks ago.
It was much more complicated than I expected. In particular, synchronising all the editor features is a real challenge. Hats off to those who have managed it. For some features I used RadAsm and Notepad++ as a reference.

At the moment I have a pre-alpha version that looks like this (see attachment).

Current features are:
Caret management
Scrolling
Insertion and deletion
Drag and Drop
Load file
Syntax Highlithing
Configuration (ini-file) and precoded defaults
Multiple synchronized Views of a single file
Zoom in and out
Line numbering

Not yet implemented:
Do/Undo
Interlisense
Save
LUA
Window management
Project management
Addins management
etc.


Regards, Biterider



daydreamer

Good luck Biterider  :thumbsup:
Editors I use has "undo/redo" menu text
Numbers of undo/redo only limited by memory or like image program setting of max memory to use for undo/redo? Or max number of undo/redo limited to 32, 64?
my none asm creations
https://masm32.com/board/index.php?topic=6937.msg74303#msg74303
I am an Invoker
"An Invoker is a mage who specializes in the manipulation of raw and elemental energies."
Like SIMD coding

Biterider

Hi
I have a question for those who have played with UTF-8 as input for ML/UASM.
Is there anything to be aware of?
For this project, I'm coding the editor code buffer using WIDE chars (Unicode/UTF-16). Now, when I save the content, I want to save it as UTF-8 and pass it to the assembler.
Does this work or are there any pitfalls?

Regards, Biterider

jj2007

Quote from: Biterider on March 05, 2025, 08:00:13 AMI have a question for those who have played with UTF-8 as input for ML/UASM

Masm, UAsm & friends don't care what you use, as long as it doesn't have nullbytes in it, like Utf-16 does. So just send Utf-8 without a BOM. No pitfalls. The assembler simply doesn't know about that "encoding" stuff ;-)

Example:
Quoteinclude \masm32\MasmBasic\MasmBasic.inc
  Init
  PrintLine "Введите текст здесь"   ; "Enter text here" in Russian
  PrintLine "Нажмите на эту кнопку"   ; "Click on this button" in Russian
EndOfCode

Now this is RTF, but have a look at the attached plain text source.

zedd151

Quote from: jj2007 on March 05, 2025, 08:08:30 AMUtf-8 without a BOM
That is key. UTF8 without a BOM looks like, tastes like and smells like a plain,  ordinary ANSI ascii text file. You can see this in a hex editor.

On Win 10, Notepad saves as UTF8 (no BOM) by default, and examining the file in a hex editor it looks exactly as if were saved as ANSI ascii. And I spent a lot of time selecting "ANSI" to save with Notepad, until I found this out. Hope this helps...

Saving as UTF8 with BOM in notepad, it appends hex bytes "EF", "BB", BF" to the file. It still opens though with qeditor and when saving, qeditor does not retain the 3 hex bytes.

Now after saving an .asm file as utf8 WITH BOM in notepad, "error A2044: invalid character in file" upon assembling (or trying to) it with ml.exe
For utf8 without BOM, it assembles fine with ml.exe.
¯\_(ツ)_/¯
tictactoe_final is finished    :smiley:

jj2007

Quote from: zedd151 on March 05, 2025, 08:17:53 AMOn Win 10, Notepad saves as UTF8 (no BOM) by default

Indeed, the source above looks right in a Win10 Notepad, but not (yet) in RichMasm and other editors.

Notepad opens both attached files correctly. One is Utf8, the other uses my local codepage. There is no fool-proof way to find out the encoding, so apparently Notepad uses some heuristic method...