diff options
Diffstat (limited to 'Optimizing-assembly-code.md')
| -rw-r--r-- | Optimizing-assembly-code.md | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/Optimizing-assembly-code.md b/Optimizing-assembly-code.md index 17dbc88..e2afc6f 100644 --- a/Optimizing-assembly-code.md +++ b/Optimizing-assembly-code.md @@ -231,13 +231,12 @@ But do: Or if you really want to optimize for size over speed, then do: ```asm - ; 10 bytes, 59 cycles - ld bc, 8 ; lb bc, 0, 8 + ; 8 bytes, 50 cycles + ld b, $01 ; loop finishes once this 1 shifts to carry .loop rra rl b - dec c - jr nz, .loop + jr nc, .loop ld a, b ``` |
