News:

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

Main Menu

replies to 'DrawBitmap procedure' and other meanderings

Started by NoCforMe, August 30, 2022, 06:30:24 AM

Previous topic - Next topic

zedd151

Quote from: swordfish on September 01, 2022, 01:01:18 PM
So, why aren't you still using it? (Multi-Edit)
If you need an older version than the site offers, have you tried the Wayback Machine?


Ah, I see. It aint cheap. Even on the wayback machine (old old versions), and no way to download a trial version
So nevermind

zedd151

#31
Quote from: fearless on September 01, 2022, 01:04:10 PM
Just use Notepad++ it has column selection and editing, proper, upper and lower case conversion, lines sorting and other stuff.
I just downloaded Notepad++ to see if it selects the way you want it to, NoCforMe.
Yes, indeed it does. Have to hold down the ALT key, make the selection release ALT key right click the selected text or use menu to copy. [SOLVED]
Thank you fearless :thumbsup: , saved me and NoCforMe countless hours of trying to code that type of function. :cool:


Example of column(vertical) text selection below

NoCforMe

Quote from: swordfish on September 01, 2022, 01:01:18 PM
So, why aren't you still using it? (Multi-Edit)

As I said earlier, it no longer runs under (modern) Windows. I think it still works under W2K, but I no longer use that machine for editing.

Messing with the "compatibility" settings does no good.
Assembly language programming should be fun. That's why I do it.

NoCforMe

Quote from: fearless on September 01, 2022, 01:04:10 PM
Just use Notepad++ it has column selection and editing, proper, upper and lower case conversion, lines sorting and other stuff.

Where is Notepad++? Is it part of Masm32? I looked but couldn't find it.
Assembly language programming should be fun. That's why I do it.

zedd151


Quote from: NoCforMe on September 01, 2022, 02:23:49 PM
Where is Notepad++?

direct link to Notepadd++ version 6.2.3.0 (for compatibility):
https://notepad-plus-plus.org/downloads/v6.2.3/

NoCforMe

OK, got it. I'll play around with it.
Assembly language programming should be fun. That's why I do it.


jj2007

Quote from: NoCforMe on September 01, 2022, 10:30:34 AMIt's a bitch of a problem. But Multi-Edit did it, so I know it's possible.

Yes, would work best with a monospaced font.

- copy the block of text you want to edit
- launch the attached exe
- select the text of the first row according to your needs
- use the menu

daydreamer

Quote from: NoCforMe on September 01, 2022, 04:09:19 AM
Quote from: swordfish on September 01, 2022, 02:07:55 AM
I shall start posting all my code using cmp/jmp style coding  :badgrin: 

You laugh, but some of us (me) actually prefer the cmp/jxx style. Here's how I like to lay out my message dispatchers:


MOV EAX, uMsg
CMP EAX, WM_COMMAND
JE do_command
CMP EAX, WM_LBUTTONDOWN
JE do_lbuttondown
CMP EAX, WM_NOTIFY
JE do_notify
CMP EAX, WM_PAINT
JE do_paint
. . .

do_command:
MOV AX, WORD PTR wParam
CMP AX, IDOK
JE do_processing
CMP AX, IDCANCEL
JE do_close
. . .

do_lbuttondown:
; (big block of code here)

do_notify:
; (another big block o'code)

do_paint:
; (more big blox of code)


have you tried use SETZ/SETNZ/SETGE/SETLS reg/mem instead of J**?
sets 0(false) or 1(true) to destination reg/mem
simpler version of SIMD packed compares resulting in mask 0(FALSE) or (TRUE) FFh(bytes),FFFFh(words),FFFFFFFh(dwords) depending on size
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

zedd151

lol.
After the first 3 posts in this thread, the discussion took a hard left. (Off on a tangent far from original topic)
Funny how threads take on a life of their own. I gave up, and joined in the madness.

@daydreamer:
cmp/j?? combinations have their place imo, but not preferred by many. Same with push/call syntax.

NoCforMe

Quote from: swordfish on September 02, 2022, 02:07:33 AM
Same with push/call syntax.

[opinion ON] Push-push-call, in my view, is just plain demented. All pain, no gain. What's the advantage of it? It does exactly what INVOKE does, but in a much less clear way. Way to obfuscate your code. Don't use it. [opinion OFF]
Assembly language programming should be fun. That's why I do it.

zedd151

Sometimes with multiple calls to the same function a register is used. That's when its kinda appropriate as well as other addressing schemes involving registers. The output would start resembling Delphi code at that stage.  :tongue:  invoke eax does'nt work. I've tried :toothy:  But that style does have its uses, say for high performance functions without stack frame for instance. But other than with registers yes push/push/call is kinda lame.

NoCforMe

What are you talking about? Something like this situation?


INVOKE SomeFunction, EBX, ESI, EDI

MOV ESI, somePtr
MOV EDI, someOtherPtr

INVOKE SomeFunction, EBX, ESI, EDI


How would push-push-call make this any clearer or more effective? The answer is it couldn't. Unless I'm missing something in your point ...

Registers or memory variables, makes no never-mind.
Assembly language programming should be fun. That's why I do it.

NoCforMe

OK, you're talking about indirect calling through a register. Very very useful technique. No, I'm not familiar with Delphi (don't really even know what it is), but I've used this technique myself. I have a program that has a long list of "properties" for an item. Each property has two small functions, one for getting the property, the other for setting it. The addresses of these little stub functions are in a structure. Here's the code for getting these properties, inside a loop in a function that fills the property list for an item:


LEA ESI, CtrlProps

; Add this property to listbox:
MOV EDX, ctrlPtr
CALL [ESI].$pr.getFunPtr ;Call "get data" function.
MOV propValue, EAX
. . .
ADD ESI, SIZEOF $pr ;Next property.



ESI points to a structure whose elements contain members which are pointers to functions (getFunPtr and setFunPtr). Each function expects a pointer to be passed in EDX and returns its value in EAX. Makes it really really easy to add properties without massively rewriting a lot of code. (Shows my preference for what I call "data-driven programming"; instead of further complicating your code with a lot of conditionals and junk, put everything into a data structure and use that for expansion. Works great.)

You're right about one thing: if those functions needed any parameters passed on the stack, you'd need to use push-push-call for them. Here everything is just passed through a couple registers.

And ackshooly, this example uses indirect calling through a memory variable, not a register, but same difference.

This thread is already totally distorted, so a little more won't hurt, will it?
Assembly language programming should be fun. That's why I do it.

NoCforMe

QuoteDelphi has its origin from Pascal and is often referred to as Delphi Pascal.

Ugh. I hate it already.

Didn't realize it was a Borland product. Small claim to fame: A friend from back in the Beige Area used to work for Philippe Kahn.
Assembly language programming should be fun. That's why I do it.