@ r0 = destination
@ r1 = source
@ r2 = length, derived from source
	.section	.text
	.global	strcpy
	.global	fpc_chararray_to_ansistr
	.syntax	divided
strcpy:
fpc_chararray_to_ansistr:
	ldr	r2, [r1, #-8]		@ Capacity
	str	r2, [r0, #-8]		@ Set capacity of destination
	ldr	r2, [r1, #-4]		@ Length
	str	r2, [r0, #-4]		@ Set length of destination
	add	r2, r2, #1		@ length = length + 1
	b	strcpy.loop
strcpy.copy_byte:
	ldrb	r3, [r1]		@ source, dereferenced
	strb	r3, [r0]		@ copy to destination, dereferenced
	sub	r2, r2, #1		@ length = length - 1
	add	r0, r0, #1		@ destination = destination + 1
	add	r1, r1, #1		@ source = source + 1
strcpy.loop:
	cmp	r2, #0
	bne	strcpy.copy_byte	@ length <> 0
	mov	pc, lr			@ Return
