MemCpy.asm
aaronjohnsabu1999_IITB-EE-Sem05/EE337/Labwork/Q2/Reading_Material/Codes/MemCpy.asm
org 0000h
ljmp main
org 0050h

memcpy:
		mov  R0, 0x51
		mov  R1, 0x52
		mov  R2, 0x50
		
CP1:	mov  A, @R0
		mov @R1, A
		inc  R0
		inc  R1
		djnz R2, CP1
ret

init:
		mov 0x50, #0x0A
		mov 0x51, #0x60
		mov 0x52, #0x70
		
		mov 0x60, #0x74
		mov 0x61, #0x4A
		mov 0x62, #0x57
		mov 0x63, #0x74
		mov 0x64, #0x47
		mov 0x65, #0xCD
		mov 0x66, #0x7E
		mov 0x67, #0x69
		mov 0x68, #0x13
		mov 0x69, #0x50
		mov 0x6A, #0x16
		mov 0x6B, #0x2F
ret

main: 	lcall init
		lcall memcpy
here: 	sjmp  here
end