diff options
| author | yenatch <yenatch@gmail.com> | 2014-08-12 00:01:04 -0700 |
|---|---|---|
| committer | yenatch <yenatch@gmail.com> | 2014-08-12 00:01:04 -0700 |
| commit | cf399a8c86a7340a8c3162400657dca1c5d3ba0a (patch) | |
| tree | 919c5c8c0b2fd2fed1eaa7fd4d876ac99d4fd077 /home/copy.asm | |
| parent | Fix static banks passed into GetName. (diff) | |
| download | pokeyellow-cf399a8c86a7340a8c3162400657dca1c5d3ba0a.tar.gz pokeyellow-cf399a8c86a7340a8c3162400657dca1c5d3ba0a.tar.xz pokeyellow-cf399a8c86a7340a8c3162400657dca1c5d3ba0a.zip | |
Split copy and serial functions out of home.asm.
Diffstat (limited to 'home/copy.asm')
| -rw-r--r-- | home/copy.asm | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/home/copy.asm b/home/copy.asm new file mode 100644 index 00000000..a6c298e4 --- /dev/null +++ b/home/copy.asm @@ -0,0 +1,24 @@ +FarCopyData:: +; Copy bc bytes from a:hl to de. + ld [wBuffer], a + ld a, [H_LOADEDROMBANK] + push af + ld a, [wBuffer] + ld [H_LOADEDROMBANK], a + ld [MBC3RomBank], a + call CopyData + pop af + ld [H_LOADEDROMBANK], a + ld [MBC3RomBank], a + ret + +CopyData:: +; Copy bc bytes from hl to de. + ld a, [hli] + ld [de], a + inc de + dec bc + ld a, c + or b + jr nz, CopyData + ret |
