diff options
Diffstat (limited to 'home/copy2.asm')
-rw-r--r-- | home/copy2.asm | 28 |
1 files changed, 12 insertions, 16 deletions
diff --git a/home/copy2.asm b/home/copy2.asm index 23e1eca7f..fdf55b2e3 100644 --- a/home/copy2.asm +++ b/home/copy2.asm @@ -1,7 +1,7 @@ -CopyBytes:: ; 0x3026 +CopyBytes:: ; copy bc bytes from hl to de - inc b ; we bail the moment b hits 0, so include the last run - inc c ; same thing; include last byte + inc b ; we bail the moment b hits 0, so include the last run + inc c ; same thing; include last byte jr .HandleLoop .CopyByte: ld a, [hli] @@ -14,7 +14,7 @@ CopyBytes:: ; 0x3026 jr nz, .CopyByte ret -SwapBytes:: ; 0x3034 +SwapBytes:: ; swap bc bytes between hl and de .Loop: ; stash [hl] away on the stack @@ -37,10 +37,10 @@ SwapBytes:: ; 0x3034 jr nz, .Loop ret -ByteFill:: ; 0x3041 +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 - inc c ; same thing; include last byte + inc b ; we bail the moment b hits 0, so include the last run + inc c ; same thing; include last byte jr .HandleLoop .PutByte: ld [hli], a @@ -51,7 +51,7 @@ ByteFill:: ; 0x3041 jr nz, .PutByte ret -GetFarByte:: ; 0x304d +GetFarByte:: ; retrieve a single byte from a:hl, and return it in a. ; bankswitch to new bank ld [hBuffer], a @@ -72,7 +72,7 @@ GetFarByte:: ; 0x304d ld a, [hBuffer] ret -GetFarHalfword:: ; 0x305d +GetFarHalfword:: ; retrieve a halfword from a:hl, and return it in hl. ; bankswitch to new bank ld [hBuffer], a @@ -90,9 +90,8 @@ GetFarHalfword:: ; 0x305d pop af rst Bankswitch ret -; 0x306b -FarCopyWRAM:: ; 306b +FarCopyWRAM:: ld [hBuffer], a ld a, [rSVBK] push af @@ -104,9 +103,8 @@ FarCopyWRAM:: ; 306b pop af ld [rSVBK], a ret -; 307b -GetFarWRAMByte:: ; 307b +GetFarWRAMByte:: ld [hBuffer], a ld a, [rSVBK] push af @@ -118,9 +116,8 @@ GetFarWRAMByte:: ; 307b ld [rSVBK], a ld a, [hBuffer] ret -; 308d -GetFarWRAMWord:: ; 308d +GetFarWRAMWord:: ld [hBuffer], a ld a, [rSVBK] push af @@ -132,4 +129,3 @@ GetFarWRAMWord:: ; 308d pop af ld [rSVBK], a ret -; 309d |