summaryrefslogtreecommitdiff
path: root/home/compare.asm
blob: e2da785779a79d5e0e71f72c5640e6127b8ba176 (plain)
1
2
3
4
5
6
7
8
9
10
11
; Compare strings, c bytes in length, at de and hl.
; Often used to compare big endian numbers in battle calculations.
StringCmp::
	ld a, [de]
	cp [hl]
	ret nz
	inc de
	inc hl
	dec c
	jr nz, StringCmp
	ret