X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=doc%2Fchoices.txt;h=1442eca452e5bed8306897b5062f5c87fce84d0b;hb=3c3375d0477d692290f05334d4cb858ee1205369;hp=d6fbe90c9b05b3e43273b0616e16ccffae8c351c;hpb=2ceac874f6c59f9a9ff23d72eb06b5c519ea409c;p=fw%2Fsdcc diff --git a/doc/choices.txt b/doc/choices.txt index d6fbe90c..1442eca4 100644 --- a/doc/choices.txt +++ b/doc/choices.txt @@ -218,4 +218,25 @@ Cleaning up the arguments to a call: pop af ; 5/byte -So for 8 bytes and above use the first form. \ No newline at end of file +So for 8 bytes and above use the first form. + +Pointer assign: + ld hl,bc ; 4+4 + ld e,(hl) ; 7 + inc hl ; 6 + ld d,(hl) ; 7 + +vs: + ld a,(bc) ; 7 + ld e,a ; 4 + inc bc ; 6 + ld a,(bc) ; 7 + ld d,a ; 4 + +Same cost. Not worth it, although is does free up HL. + +Shift left signed on HL + sla l + rl h ; 8+8 = 16 + + add hl,hl ; 11