hi !

i'm very new to assembly and learning bit by bit but unfortunately i'm asked to write a program which encrypts a string using caesar cipher encryption method and then print that encrypted text and save into the address.

i'm very hopeful that somebody will definitely solve my problem out and that will a good source for me to learn from it aswell.

thanking you guy(s) in advance.


Which part don't you understand?

The part where asking for free homework on a plate doesn't result in an instant happy meal :)

This is my program listing it copies the 1st string into 2nd string.


SWI_WriteC	EQU	&2

	ENTRY			; mark the first instruction
	ADR	r1, srcstr		; pointer to first string	
                ADR	r0, dststr		; pointer to second string
	BL	strcopy		; copy the first into second
	SWI	0x11		; and exit

srcstr	DCB " This is my first (source) string",&0a,&0d,0
dststr	DCB " This is my second (destination) string",&0a,&0d,0

	ALIGN			; realign address to word boundary

	LDRB	r2, [r1], #1	; load byte, then update address
	STRB	r2, [r0], #1	; store byte, then update address
	CMP	r2, #0		; check for zero terminator
	BNE	printout		; branch if not equal, to Printout

	SWINE	SWI_WriteC	; Print the content
	B	strcopy		; branch to strcopy
	MOV	pc, lr		; return

Now i want to modify the above code so that it encrypt the dststr using Caesar cipher method and which of course will be printed out on the screen aswell.

Thanks for ur reply and i hope it makes the point clear if not feel free to ask me.


This article has been dead for over six months. Start a new discussion instead.