Live data from Hacker News

A jump into the middle of an instruction from nowhere (2023)

devblogs.microsoft.com

11–20 of 112 posts

Re: A jump into the middle of an instruction from nowhere (2023)

#11
There is an interview with Raymond Chen where he is trying to defend the reason why they crippled the taskbar with Windows 11 [1].

Watching that I was just thinking NO NO NO - it worked fine for the last 25 years and there can be absolutely no reason why they had to destroy the taskbar now.

He deserves every headache he gets with these support requests.

Or to quote this comment of the linked article:

> There wouldn’t be as much of a need if the windows shell team was smarter [...] In fact I actively encourage, support, and celebrate efforts like this. Make their life hell and delay them. If they spend more time on investigating issues like this, they’ll have less time to f*k something else up.

[1]: https://www.youtube.com/watch?v=HDicLHBvQQM

Re: A jump into the middle of an instruction from nowhere (2023)

#13
post #6

I know it must be frustrating from Microsoft's standpoint, but those are needed because they keep changing things. Start All Back is one very popular explorer.exe patch that makes the Windows 11 taskbar function a lot like Windows 10. For one thing, it allows you to move the taskbar again. I've also made an explorer.exe in-memory patch to disable flashing taskbar buttons in Windows 10, it injected itself to WndProc a…

Do you have to turn off all system file modification detection to do these hacks? Sounds risky.

These are not applied on disk, they're injected at runtime. Just open the process and write to its memory directly.

Re: A jump into the middle of an instruction from nowhere (2023)

#15
While in this case the jump into the middle of an instruction was not intentional, several decades ago many Microsoft programs for MS-DOS, like their BASIC interpreter, contained frequent intentional jumps into the middle of instructions.

This technique had already been used in many Microsoft programs for CP/M, i.e. for Intel 8080 or Zilog Z80 CPUs.

There were two reasons for the use of such jumps in the middle of instructions. One was to obfuscate the program for disassemblers, which were desynchronized with the instruction stream by such jumps. The other reason is that each such jump usually saved one byte of instruction code in comparison with conventional conditional program structures.

When the program size was still measured in kilobytes, saving even only one hundred bytes by this method was important.

The instruction into the middle of which a jump was performed was usually an instruction that loaded a 16-bit register with an immediate value that happened to be the encoding for some other instruction.

The value loaded into the register was not used. Therefore, when the instruction was entered through its start address, no operation was done, but when it was entered through a jump, some extra instruction was executed.

A typical use case would be at the beginning of a loop, which was entered after initializing a control variable, while whenever the loop was repeated later an extra instruction was executed (corresponding to the immediate value of the register load), to update the control variable. This saved one byte upon the standard loop implementation that uses an unconditional jump for entering the body of the loop in its middle, after the loop initialization.

Re: A jump into the middle of an instruction from nowhere (2023)

#16
post #5

Frankly, it is really annoying when developers working at one of the large closed-source platform oligopolists blame their users for trying to work around the deficiencies (or even outright hostile "business model" optimizations) in their software by whatever scant means are left to them: maybe if Microsoft didn't keep removing good functionality and stopped forcing bad "features" on everyone, fewer people would see…

Well yeah, I mean no one forces you to use Explorer for file management under Windows. I'm an old-time Norton Commander user, and when Windows came around I switched to Total Commander. There are open-source alternatives too, even cross-platform ones, like this one: https://doublecmd.sourceforge.io/.

That being said, no one forces you to use Windows either - except maybe your employer or the software you are using, but this is getting less and less of a problem fortunately (web apps, Proton etc.).

Re: A jump into the middle of an instruction from nowhere (2023)

#18
post #5

Frankly, it is really annoying when developers working at one of the large closed-source platform oligopolists blame their users for trying to work around the deficiencies (or even outright hostile "business model" optimizations) in their software by whatever scant means are left to them: maybe if Microsoft didn't keep removing good functionality and stopped forcing bad "features" on everyone, fewer people would see…

A reply from the article author sort of communicates why they don’t work with the patcher:

> They don’t use the shell extension mechanism to get into the process. They sneak in by nefarious means. Patching is not supported. There is no “correct” way of doing it. Just different levels of bad.

I assume the “nefarious” ways are similar to rootkits in that they exploit vulnerabilities to gain system access they’re not intended to have.

It’s also only really the reason they don’t care that the patcher breaks. The reason I assume they don’t add or retain these features is maintenance and support cost.

Re: A jump into the middle of an instruction from nowhere (2023)

#20

There is an interview with Raymond Chen where he is trying to defend the reason why they crippled the taskbar with Windows 11 [1]. Watching that I was just thinking NO NO NO - it worked fine for the last 25 years and there can be absolutely no reason why they had to destroy the taskbar now. He deserves every headache he gets with these support requests. Or to quote this comment of the linked article: > There wouldn’t…

Unfortunately it's the designers that are screwing up the UI/UX of Windows, not the programmers. If you give more time to the designers then you're just going to get more of a clone of OSX rather than something useful.
Post reply on HN