diff options
author | Daniel Harding <33dannye@gmail.com> | 2020-05-16 21:42:24 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-16 21:42:24 -0500 |
commit | 8a924f1f783572ff395f617f99546b4c949c8b04 (patch) | |
tree | 1b6c7de331cb983256651b11b8adf413a3a434f1 /home/copy.asm | |
parent | 88d7e9a34a8b610b358cec1ccc6660634ca9ce80 (diff) | |
parent | ed94962edf1668aba3f60938e8a5ba8040e2a59c (diff) |
Merge pull request #30 from entrpntr/spring-cleaning
Spring Cleaning
Diffstat (limited to 'home/copy.asm')
-rw-r--r-- | home/copy.asm | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/home/copy.asm b/home/copy.asm index 838bb52d..c623d335 100644 --- a/home/copy.asm +++ b/home/copy.asm @@ -17,31 +17,31 @@ CopyBytes:: GetFarByte:: ; retrieve a single byte from a:hl, and return it in a. ; bankswitch to new bank - ld [wBuffer], a + ld [wTempBank], a ldh a, [hROMBank] push af - ld a, [wBuffer] + ld a, [wTempBank] rst Bankswitch ; get byte from new bank ld a, [hl] - ld [wBuffer], a + ld [wFarByte], a ; bankswitch to previous bank pop af rst Bankswitch ; return retrieved value in a - ld a, [wBuffer] + ld a, [wFarByte] ret GetFarHalfword:: ; retrieve a halfword from a:hl, and return it in hl. ; bankswitch to new bank - ld [wBuffer], a + ld [wTempBank], a ldh a, [hROMBank] push af - ld a, [wBuffer] + ld a, [wTempBank] rst Bankswitch ; get halfword from new bank, put it in hl @@ -54,7 +54,6 @@ GetFarHalfword:: rst Bankswitch ret - ByteFill:: ; fill bc bytes with the value of a, starting at hl inc b ; we bail the moment b hits 0, so include the last run |