News:

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

Main Menu

How many work items in a Procedure ?

Started by Shintaro, January 27, 2023, 03:26:35 PM

Previous topic - Next topic

NoCforMe

Sorry, JJ, gotta complain a bit here: what's with your "just drag a file over it" schtick? I find that a pain in the ass. I have to, what, extract your .exe to a folder, then drag my file over it? Why not just put in a file open dialog? or am I missing something here?

Worse, I had to extract it and move it onto my desktop. I hate doing that with throwaway stuff like this.

Anyhow, I did it and here's what I got:

1053 MainWindowProc
0508 WinMain
0310 CubbyProc
0283 BookmarkProc
0220 ViewExtraFile
0219 PrintTheFile
0219 FindTextDlgProc
0207 ParseHdrFtr
0164 ViewExtraProc
0160 GetNextINItoken


There are quite a few blank lines in there ...

OTOH, at the bottom end are these:


0008 ToLower
0007 IniSetExtraWinY
0007 IniSetExtraWinX
0007 CenterDim
0006 IniSetWindowY
0006 IniSetWindowX
0006 IniSetWindowW
0006 IniSetWindowH
0006 IniSetExtraWinW
0006 IniSetExtraWinH
Assembly language programming should be fun. That's why I do it.

NoCforMe

Assembly language programming should be fun. That's why I do it.

jj2007

Quote from: NoCforMe on January 27, 2023, 10:29:07 PMWhy not just put in a file open dialog?
Why waste my time with throwaway stuff like this; CL$() is simpler.

QuoteAnyhow, I did it and here's what I got:

1053 MainWindowProc
0508 WinMain
0310 CubbyProc
0283 BookmarkProc
0220 ViewExtraFile
0219 PrintTheFile
0219 FindTextDlgProc
0207 ParseHdrFtr
0164 ViewExtraProc
0160 GetNextINItoken

Looks pretty close to my coding habits :biggrin:

QuoteThere are quite a few blank lines in there ...

I don't have blank lines in my code, so: sorry for not taking them into account (I do use space before and space after, though; RichMasm can do that).

QuoteOTOH, at the bottom end are these:


0008 ToLower
0007 IniSetExtraWinY
0007 IniSetExtraWinX
0007 CenterDim
0006 IniSetWindowY
0006 IniSetWindowX
0006 IniSetWindowW
0006 IniSetWindowH
0006 IniSetExtraWinW
0006 IniSetExtraWinH


Commonly called "candidates for inlining or macros" ;-)

> Sorry, I just gotta ask you about this one ...
Assemble & Run

hutch--

There is something that this discussion is assuming that is clearly nonsense, the notion that you format code to EITHER one or the other style.

Most of us have seen old style mnemonic code stacked in a vertical line along with push/call notation and no indenting and while you can get it to work, readability is poor as the style is not able to handle complex high level code and you end up with a cluttered mess.

Win 32 and 64 bit code must use OS functions, the Windows API functions and these functions are NOT low level, they are generally high level code that is necessary to interact with the OS. ASM is capable of writing this hack API code in a clear and readable manner and this gets production up to speed rather than wasting development time on clutter.

Save time by distinguishing between hack OS code and the stuff that really matters, puire mnemonic algorithm code. Coding the world's fastest MessageBox() will go over like a gnat breaking wind where a genuinely fast pure mnemonic algorithm is useful and can improve the performance of a finished app.

NoCforMe

Quote from: jj2007 on January 27, 2023, 10:57:34 PM
Quote from: NoCforMe on January 27, 2023, 10:29:07 PMWhy not just put in a file open dialog?
Why waste my time with throwaway stuff like this; CL$() is simpler.

OK, fair enough, I guess. But how is one supposed to use your "drag a file over it" apps? I could only think of 3 ways: put your app on the desktop, put it in the same folder with the file you want to drag, or open 2 Explorer windows. All of which are a PITA to my way of working. How do you do it?

If someone posts li'l apps here, I like the ones where you can just open the .zip and double-click on the .exe and presto! it opens.
Assembly language programming should be fun. That's why I do it.

jj2007

Quote from: NoCforMe on January 28, 2023, 07:04:08 AMHow do you do it?

I simply extract the exe to a folder where a source happens to reside, then I drag that asm file over the exe. Easy peasy.

C:\Users\[your name]\AppData\Roaming\Microsoft\Windows\SendTo\ is a fascinating location, too.

NoCforMe

My current location for such stuff is E:\Programming stuff\Assembly language\sandbox.
Assembly language programming should be fun. That's why I do it.

jj2007

Try the SendTo folder. You can place *.lnk files there, for example a link to OllyDbg. Then, with a right-click on any exe, you can launch Olly from Explorer's (or any other file manager's) context menu. I also have links to Timo's TLPEView64 there, plus several other utilities.

hutch--

I prefer the drag and drop approach, copy a single exe file to a target directory or alternatively copy a source file to the directory that has the tool and its simply faster than a dialog box based tool.

NoCforMe

Quote from: jj2007 on January 28, 2023, 08:36:07 AM
Try the SendTo folder. You can place *.lnk files there, for example a link to OllyDbg. Then, with a right-click on any exe, you can launch Olly from Explorer's (or any other file manager's) context menu. I also have links to Timo's TLPEView64 there, plus several other utilities.

Ah, another "magic" folder thoughtfully provided by the boys (and girls) in Redmond. I'll have to try that sometime.
Assembly language programming should be fun. That's why I do it.

jj2007

Quote from: hutch-- on January 28, 2023, 09:55:42 AM
I prefer the drag and drop approach, copy a single exe file to a target directory or alternatively copy a source file to the directory that has the tool and its simply faster than a dialog box based tool.

Right. I have a two-pane file manager (FreeCommander), so in one pane I keep the tool(s), in the other pane the source folder, so that I can drag the source over the exe without actually moving any files.

Besides, with a simple ; OPT_Arg1 \Masm32\somesource.asm, my editor can be convinced to launch the newly built exe with a commandline argument. Much, much faster and more convenient than a file dialog.