shithub: pokered

ref: 8701ef4d61a6a55ee71aa1a964d4f7d10eded87e
dir: /home/compare.asm/

View raw version
; 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