summaryrefslogtreecommitdiff
path: root/home/copy2.asm
diff options
context:
space:
mode:
authorDaniel Harding <33dannye@gmail.com>2020-05-20 20:17:30 -0500
committerGitHub <noreply@github.com>2020-05-20 20:17:30 -0500
commit500d99c258145d233af8d14cdb5c6e0200dfc1d8 (patch)
tree7dbe7b152dde8a6e9b56664b5b8cdfc0d6be1253 /home/copy2.asm
parentb8954732a3eaa3a784a6e3eaaa68977a9ccd9816 (diff)
parent33456b8fb28ef547a54d04d22baa2313b72fdb1d (diff)
Merge pull request #50 from dannye/master
merge pokered
Diffstat (limited to 'home/copy2.asm')
-rw-r--r--home/copy2.asm30
1 files changed, 15 insertions, 15 deletions
diff --git a/home/copy2.asm b/home/copy2.asm
index ad47c4a0..c14112bb 100644
--- a/home/copy2.asm
+++ b/home/copy2.asm
@@ -1,30 +1,30 @@
FarCopyDataDouble::
; Expand bc bytes of 1bpp image data
; from a:de to 2bpp data at hl.
- ld [wFarCopyDataSavedROMBank],a
- ld a,[H_LOADEDROMBANK]
+ ld [wFarCopyDataSavedROMBank], a
+ ld a, [H_LOADEDROMBANK]
push af
- ld a,[wFarCopyDataSavedROMBank]
+ ld a, [wFarCopyDataSavedROMBank]
call BankswitchCommon
- ld a,h ; swap hl and de
- ld h,d
- ld d,a
- ld a,l
- ld l,e
- ld e,a
- ld a,b
+ ld a, h ; swap hl and de
+ ld h, d
+ ld d, a
+ ld a, l
+ ld l, e
+ ld e, a
+ ld a, b
and a
- jr z,.eightbitcopyamount
- ld a,c
+ jr z, .eightbitcopyamount
+ ld a, c
and a ; multiple of $100
jr z, .expandloop ; if so, do not increment b because the first instance of dec c results in underflow
.eightbitcopyamount
inc b
.expandloop
- ld a,[de]
+ ld a, [de]
inc de
- ld [hli],a
- ld [hli],a
+ ld [hli], a
+ ld [hli], a
dec c
jr nz, .expandloop
dec b