You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If we denote (e.g., ex_de_hl_next: ) one of them, we can put "JP ex_de_hl_next" instead of the others. This saves 1 byte per combination with no loss of speed.
For example,
over:
POP DE
PUSH DE
PUSH HL
ex_de_hl_next:
EX DE, HL
JP next
And then modify:
minus_rot:
POP DE
POP AF
PUSH HL
PUSH AF
JP ex_de_hl_next
Modify other locations in the same way.
In addition, we can aslo put another label:
over:
POP DE
PUSH DE
dup_ex_de_hl_next:
PUSH HL
ex_de_hl_next:
EX DE, HL
JP next
Then replace the combination
PUSH HL
EX DE, HL
JP next
by "JP dup_ex_de_hl_next"
For example,
rot:
POP AF
POP DE
PUSH AF
JP dup_ex_de_hl_next
There are other places for JP dup_ex_de_hl_next. This saves 2 bytes without losing speed.
Added: I guess I'm wrong about same speed. Certainly "JP ex_de_hl_next" is a bit slower than the original code.
The text was updated successfully, but these errors were encountered:
The system has several combinations
If we denote (e.g., ex_de_hl_next: ) one of them, we can put "JP ex_de_hl_next" instead of the others. This saves 1 byte per combination with no loss of speed.
For example,
And then modify:
Modify other locations in the same way.
In addition, we can aslo put another label:
Then replace the combination
by "JP dup_ex_de_hl_next"
For example,
There are other places for JP dup_ex_de_hl_next. This saves 2 bytes without losing speed.
Added: I guess I'm wrong about same speed. Certainly "JP ex_de_hl_next" is a bit slower than the original code.
The text was updated successfully, but these errors were encountered: