News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests

Main Menu

Another ASM editor

Started by NoCforMe, September 03, 2022, 06:54:23 AM

Previous topic - Next topic

hutch--

Z,

Be a bit more ambitious, conversion from ascii to unicode will only handle the same characters set as ascii, see if you can add the capacity for real unicode which would be a lot more useful.

zedd151

Quote from: hutch-- on September 04, 2022, 12:00:22 AM
see if you can add the capacity for real unicode which would be a lot more useful.
For a one-off like in NoCforMe's example, this method is fine - which brings to mind...


NoCforMe, why on earth do you need a single Unicode string, if you don't mind my asking??

daydreamer

Quote from: swordfish on September 03, 2022, 07:30:07 PM

Here's your unicode string:ButtonClassname DW 'b','u','t','t','o','n', 0, 0  ; UNICODE == unicorn. :biggrin:
DW instead of DB. edit to add --> I just tested it, it works.
I prefer editor that can keep this in source:
"一二三四五六七八九十百千萬"
VS editor detects unicode characters asks if save as Unicode source file or not and losing it
you can use only numbers,but its easier to debug when cjk unicode is many thousands to see if its the right character and not wrong because of typo when entering 16bit hexadecimal number
also I dislike need to use the annoying syntax 'a','b','c','d','e','f',0 when I want good old string syntax "abcdef",0 indepent of ascii or unicode

otherwise I like use Qeditor,but I doubt I need to use 700mb,maybe open a video file in hex?
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

jj2007

Quote from: daydreamer on September 04, 2022, 12:28:32 AM
I prefer editor that can keep this in source:
"一二三四五六七八九十百千萬"

Me too :thumbsup:

Vortex

Quote from: swordfish on September 03, 2022, 07:30:07 PM

Here's your unicode string:ButtonClassname DW 'b','u','t','t','o','n', 0, 0  ; UNICODE == unicorn. :biggrin:
DW instead of DB. edit to add --> I just tested it, it works.

I like "cubby holes". It sounds better than "pigeon holes", for instance.

Hi swordfish,

You can try the WSTR macro to easily define Unicode strings.

include \masm32\include\masm32rt.inc

.data

WSTR    mystr,"This is a UNICODE string."

.code

start:

    invoke  crt_wprintf,ADDR mystr
    invoke  ExitProcess,0

END start

zedd151

Thank you, Vortex. I knew there was a macro for that, somewhere. But it's not really for me but for NoCforMe.
Thanks again.
I just slapped together that piece of code on the fly, as an example. I rarely if ever had the need for Unicode.

NoCforMe

Quote from: swordfish on September 04, 2022, 12:23:07 AM
For a one-off like in NoCforMe's example, this method is fine - which brings to mind...
NoCforMe, why on earth do you need a single Unicode string, if you don't mind my asking??

Don't mind at all. In order to display Unicode characters in some controls (buttons), I had to do two things: encode the character strings as Unicode, and encode the class name ("button") as Unicode, since I was using CreateWindowExW() instead of CreateWindowEx(). Unicode window to handle Unicode text. See, when you travel to the Unicode world, everything has to be in that "language", every string and character.
Assembly language programming should be fun. That's why I do it.

zedd151

@NoCforMe, ok.
But why W version instead of A? Or was that just a coding exercise on your part?


Vortex posted a Unicode macro couple of posts above this one if you missed it.

NoCforMe

Jochen, in your reply #7 you were going to give us a link to a "COM interface plugin", but the link wasn't given. Curious minds want to see it ...
Assembly language programming should be fun. That's why I do it.

NoCforMe

Quote from: swordfish on September 04, 2022, 04:48:11 AM
But why W version instead of A? Or was that just a coding exercise on your part?

Because you need a Unicode ("W") window to display Unicode characters.
Assembly language programming should be fun. That's why I do it.

zedd151

Somewhere I missed that part, where you wanted to display unicode. Sorry.  :undecided:
I should've gone back and reread everything.

jj2007

Quote from: NoCforMe on September 04, 2022, 04:48:59 AM
Jochen, in your reply #7 you were going to give us a link to a "COM interface plugin", but the link wasn't given. Curious minds want to see it ...

Oops


hutch--

 :biggrin:

OOP(s) versus HOP (Hardware oriented programming).  :tongue:

NoCforMe

#29
Here's the latest version (about 3 day's work so far) that can load and save files. (Be careful! don't want anyone to lose anything valuable because of this. It did work fine for me, but I'm still testing it.) Few more features added. A loooooong way to go before it's a real editor, if that ever happens ...

Let me know whatcha think. JJ, I smallerized it so it might fit your screen; your advice about getting the monitor work area is good, but it was all I could do at this point to make it resize reasonably. (You'll notice that you can shrink it vertically so that the listbox on the right disappears; not good.)

Note: I replaced the .zip with a version that increases the maximum text limit to 2 Mb.
Assembly language programming should be fun. That's why I do it.