summaryrefslogtreecommitdiff
path: root/Optimizing-assembly-code.md
diff options
context:
space:
mode:
authornullableVoidPtr <30564701+nullableVoidPtr@users.noreply.github.com>2019-02-18 21:47:50 +0800
committernullableVoidPtr <30564701+nullableVoidPtr@users.noreply.github.com>2019-02-18 21:47:50 +0800
commit015ed30c0162b2ddbbe20183a31abf93d4280f6d (patch)
tree67a43a7eefbea203b8e2b02901fb6e210d72c16b /Optimizing-assembly-code.md
parenteb826276cf7c6a8356f5b8653ae1c9c7fd3a95a3 (diff)
Spaces after Commas
Diffstat (limited to 'Optimizing-assembly-code.md')
-rw-r--r--Optimizing-assembly-code.md22
1 files changed, 11 insertions, 11 deletions
diff --git a/Optimizing-assembly-code.md b/Optimizing-assembly-code.md
index bc8b4e7..c3ca655 100644
--- a/Optimizing-assembly-code.md
+++ b/Optimizing-assembly-code.md
@@ -14,8 +14,8 @@ Most tricks come from either [Jeff's GB Assembly Code Tips v1.0](http://www.devr
### Set A to some constant subtracted by A
```asm
- ld b,a ; 4 bytes, 4 cycles
- ld a,CONST
+ ld b, a ; 4 bytes, 4 cycles
+ ld a, CONST
sub b
;;;
@@ -30,7 +30,7 @@ Most tricks come from either [Jeff's GB Assembly Code Tips v1.0](http://www.devr
ld l, a
ld a, 0
adc h
- ld h,a
+ ld h, a
;;;
@@ -59,18 +59,18 @@ Most tricks come from either [Jeff's GB Assembly Code Tips v1.0](http://www.devr
### Exchanging HE and DL
```asm
- ld a,d ; 6 bytes, 6 cycles
- ld d,h
- ld h,a
- ld a,e
- ld e,l
- ld l,a
+ ld a, d ; 6 bytes, 6 cycles
+ ld d, h
+ ld h, a
+ ld a, e
+ ld e, l
+ ld l, a
;;;
push de ; 4 bytes, 9 cycles
- ld d,h
- ld e,l
+ ld d, h
+ ld e, l
pop hl
```