- Joined
- Oct 4, 2016
- Messages
- 44
- Motherboard
- ASUS PRIME Z370M-PLUS II
- CPU
- i9-9900K
- Graphics
- Radeon VII
Note that the return you refer to is conditional, therefore the code following is not unreachable.
Your mistake was incorrect disassembly procedures.
https://www.tonymacx86.com/threads/guide-patching-dsdt-ssdt-for-laptop-backlight-control.152659/
Im considering the hypotesis of a missunderstanding since it just works. Contrarywise when I applied a wrong patch I got the "stop sign".
Our scenario (Pseudocode)
if (something) {
return 0; // bail, since condition is met
argA
argB
argC
} else {
return 1;
}
If it reaches return, it won't reach the rest of the code up to }, so I deleted argA, argB, argC (or whatever after return, I am at work now). Of course I did not delete the else block.
This is what I meant.
Does this apply to Assembly as well?
I am asking this stuff for my own knowledge and cause it might come in handy in the future knowing the right way to this thing.
Last edited: