Quote:
Originally Posted by had
I put a value of 960 in KoboReader.conf and it sleeps after approx 16 hours.
Maybe the patch could load the most significant byte of the word, instead of the least significant byte? Then we could set very large values in increments of approximately 4 hours. That is, if the thumb instruction could put a '6' into the other byte of the word, we'd have approximately 6 x 4 (around 24) hours.
|
There are 32-bit instructions to load constants larger than 255, or to load and shift/rotate small constants in one instruction, but I don't know of any way to do it with a 16-bit instruction.
There are 16-bit instructions to load a value from memory if it is not too far from the location of the loading instruction, but it is a matter of luck whether the value you want to load exists within range.
There are 16-bit instructions that can load one register from another and shift/rotate the value at the same time, but you need to have a register with a known value to start with, which might require re-writing the existing code.
Re-writing the code to make enough room to add some instructions is possible, I did it for the "My 15 line spacing values" patch, but it can be a lot of work.