0 Members and 2 Guests are viewing this topic.
First of all, the most you can save by making a call inline is 4 bytes. 3 For the call, and 1 for the ret. But many of the routines are better optimized with conditional returns and so you would often save even less than that if you were able to save anything at all. It's a little too small of a savings to justify the complexity of another pass I think.
While A While B If C Break End If D Continue End EndEnd.The above can become:While A sub(LOP)EndLbl LOPWhile B ReturnIf C If D Goto LOP EndEnd
Before I begin, let me clarify something about shadow registers, because I was a bit confused about this myself for a while. When exchanging registers with shadow registers, the processor doesn't move values from the active registers into the shadow registers and vice versa. There is not one specified set of "active" registers and one specified set of "shadow" registers. Instead, the processor uses a mux to simply flip its definition of which set is the active set and which set is the shadow set. So when an interrupt activates, the processor simply designates the set of registers it wasn't previously using as the set that the interrupt will use.
Hello, I was trying to make a Pause screenie that made Shade (10) for a while. After that it made shade 45.However, I want it to make Shade the same number as it was when the program ran, so the user's original shade. I don't see how to do this.If I can, how?If not, could a GetShade() like command be implemented?