Split copy and serial functions out of home.asm.

This commit is contained in:
yenatch 2014-08-12 00:01:04 -07:00
parent 1cf79b6f15
commit cf399a8c86
5 changed files with 563 additions and 569 deletions

24
home/copy.asm Normal file
View file

@ -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