X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=doc%2Fchoices.txt;h=9fa79244d309fd21e6a9d491a227ded83bbf179e;hb=a9eec7a16461f6c39cbf240a08c001f4eb572b55;hp=2e48bae11eb349abc9a22975ea32588b0c48a401;hpb=a0a51978211d66c4c85456b317f2f2734162676f;p=fw%2Fsdcc diff --git a/doc/choices.txt b/doc/choices.txt index 2e48bae1..9fa79244 100644 --- a/doc/choices.txt +++ b/doc/choices.txt @@ -86,3 +86,24 @@ PlusIncr on pairs: adc a,b ; 4 ld b,a ; 4 = 30 So n <= 5 (1) is better. + +Frame pointer: +It's nice to use HL as the temp register, but what if I used it as the +frame pointer instead of ix? + +Instead of: + ld e,5(ix) ; 19 + ld d,6(ix) ; 19 = 38 + + ld hl,#5 ; 10 + add hl,sp ; 11 + ld e,(hl) ; 7 + inc hl ; 6 + ld d,(hl) ; 7 = 41 + +Things get better when you access the same set over, as you get rid +of the setup. But they get worse when both ops are on the stack/in +direct space. Easiest this way for now. iy may benifit... + + +