SendMessage.exe: Access to advanced Windows features

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Message
Author
Aacini
Expert
Posts: 1885
Joined: 06 Dec 2011 22:15
Location: México City, México
Contact:

Re: SendMessage.exe: Access to advanced Windows features

#16 Post by Aacini » 20 Dec 2016 11:17

In the Keyboard shortcuts link I gave above there are the descriptions of all Calculator keys. The character for factorial is ! (as expected).

Antonio

Thor
Posts: 43
Joined: 31 Mar 2016 15:02

Re: SendMessage.exe: Access to advanced Windows features

#17 Post by Thor » 20 Dec 2016 13:29

Thank you very much, I didn't know about that page.
It works as expected now. :P

Aacini
Expert
Posts: 1885
Joined: 06 Dec 2011 22:15
Location: México City, México
Contact:

Re: SendMessage.exe: Access to advanced Windows features

#18 Post by Aacini » 30 Dec 2016 22:25

aGerman wrote:
Aacini wrote:This is what I call "small code" and is the reason because I don't include help screens nor error messages in my assembly programs...


Seems that we have a different approach :lol:
It's quite seldom that I share one of my own utilities because there are tools like NirCmd out there that already cover a range of applications that we reinvented.
Whenever I share a utility I push myself hard in order to be at least as descriptive as Microsoft and have more stable and a more predictable tools than Microsofts are. That includes a reasonable error handling especially for the user input / passed arguments. And yes, sometimes the actual code for the main task is only a fraction.
Anyway, including a help message will for sure increase the size of the code and the binary but has nothing to do with the performance of the tool. Loading some bytes more or less into memory doesn't make a difference. Waiting for the OS to start the new process takes much more time. Having a help message included is just a matter of usability and comfort (imho :wink:).


These comments (and the end of the year) inspired me to write the following:


[OFF TOPIC Lecture]

I learned assembly language in 1975, in an IBM-1130 computer. Some time after, I learned Z-80 assembly language in a TRS-80 Radio Shack micro-computer. About 1983, when the first IBM-PC clones were introduced at low prices in México, I was able to bought the first computer of my own: a Columbia VP "luggable" computer (that I still keep in working condition!). Such computer have a 4.77 MHz Intel 8088 CPU, two 5 1/4" floppy disk units and included MS-DOS 2.11. I bought Borland's Turbo-Pascal 3.0, Turbo-C 1.5 and Turbo-Assembler 1.0, and started to write small auxiliary .COM programs as aid for Batch files since then.

There were two main reasons at that time to write such programs in assembly language: the first one was to have access to features not available in high-level programming languages. For example, I achieved to get an additional screen line, the number 26, reprogramming the controller chip of the CGA or MDA video cards; I used this additional line to display the output of a clock/stopwatch/timer application.

The other reason to use assembly language was to make these programs as small and fast as possible, because the execution of Batch files in floppy disks was really slow. Was at that time when the trick to use double-colons instead of REM commands was introduced; the difference in time using these two methods in a large Batch file was very noticeable!

I also used other devices that required a very efficient programming. The HP-25, my first Hewlett-Packard calculator, have just 8 memory registers and 49 programming steps, but it was capable of solve a wide range of problems (with the proper programming). All this speech means that I have into the bones the concept of write "small and fast" programs!

______________________________________________________________________________________________

First computing times was marked by clever people that made interesting developments using very limited resources with great doses of ingenuity. One of these cases was Clive Sinclair, that designed the Sinclair Scientific, a calculator that performed logarithms and trigonometric functions using a chipset intended to support just the 4 basic arithmetic operations (according to Texas Instruments, the chipset manufacturer).

Today, this situation had totally changed. Perhaps was Bill Gates the person that started the business model based on create every time larger and resource-demanding programs, so the people needs to buy every time more expensive computers to run them, and chip companies keeps busy developing every time faster CPU's. This is what is called "PROGRE$$"! (I miss you, Unix, but I also want to participate in the progress).


[OK, perhaps this is becoming "Off topic" too much!]


The last time I did a test about this matter was when I received my brand new Panasonic CF-W4 "ToughBook" notebook with Windows XP. When I added a 1600-2000 bytes help description to a two or three 300-400 bytes .COM programs, the slowness in the execution of a Batch file that used such programs was noticeable; the Batch program executed an animation with as many iterations per second as possible. However, it seems that the present situation is different.

Perhaps is time that I leave my "old ideas" (?) aside and include a help screen in all my auxiliary .exe programs (and that the rest of you forget the 35 years old double-colon trick and revert to use REM commands).

Antonio

PS - I was born on 1955, if you are wondering that. This means that foxidrive and I were the "two grumpy old men" of this site. However, I was lately tired of give advice to beginners about be clearer in their questions. Perhaps it is just seasonal depression...

aGerman
Expert
Posts: 4654
Joined: 22 Jan 2010 18:01
Location: Germany

Re: SendMessage.exe: Access to advanced Windows features

#19 Post by aGerman » 31 Dec 2016 06:45

Very interesting read, Antonio!

I was born in 1972. I remember the DOS times, the lack of memory, and the slowness of operations. Altough for sure I don't have your programming experiences.

As to my comment that you quoted - I didn't want to convince you to subscribe to my view. That was just my opinion. Thanks for providing an insight into your programming background.

Wish you a happy new year 2017!
Steffen

Aacini
Expert
Posts: 1885
Joined: 06 Dec 2011 22:15
Location: México City, México
Contact:

Re: SendMessage.exe: Access to advanced Windows features

#20 Post by Aacini » 04 Jan 2017 16:26

I know that help screens is something good and convenient for any program. I was just explaining the reasons because I never included help screens in my small assembly language programs...

Antonio

OFF TOPIC PS - I can't resist the temptation of invite all of you to read this article that include a Sinclair Scientific calculator emulator that was developed via reverse engineering from the calculator ROM, and also this site that talks about previous article and include some interesting comments from Nigel Searle himself, the person that wrote the Sinclair Scientific ROM code.

Post Reply