First implementation, blinks quite a lot due to lcd being disable while updating the automaton
This commit is contained in:
26
Code/utils.inc
Normal file
26
Code/utils.inc
Normal file
@@ -0,0 +1,26 @@
|
||||
SECTION "Utils", ROM0
|
||||
|
||||
MemCopy: MACRO
|
||||
ld hl, \1
|
||||
ld de, \2
|
||||
ld bc, \3
|
||||
.memcpyloop\@
|
||||
ld a, [de]
|
||||
ld [hl+], a
|
||||
inc de
|
||||
dec bc
|
||||
ld a, b
|
||||
or c
|
||||
jr nz, .memcpyloop\@
|
||||
ENDM
|
||||
|
||||
StringCopy: MACRO
|
||||
ld hl, \1
|
||||
ld de, \2
|
||||
.strcpyloop\@
|
||||
ld a, [de]
|
||||
ld [hl+], a
|
||||
inc de
|
||||
and a
|
||||
jr nz, .strcpyloop\@
|
||||
ENDM
|
||||
Reference in New Issue
Block a user